/[baselayout]/trunk/default.mk
Gentoo

Contents of /trunk/default.mk

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2547 - (hide annotations) (download)
Thu Apr 5 11:18:42 2007 UTC (7 years, 6 months ago) by uberlord
File size: 1945 byte(s)
    Rewrite the core parts in C. We now provide librc so other programs can
    query runlevels, services and state without using bash. We also provide
    libeinfo so other programs can easily use our informational functions.

    As such, we have dropped the requirement of using bash as the init script
    shell. We now use /bin/sh and have strived to make the scripts as portable
    as possible. Shells that work are bash and dash. busybox works provided
    you disable s-s-d. If you have WIPE_TMP set to yes in conf.d/bootmisc you
    should disable find too.
    zsh and ksh do not work at this time.

    Networking support is currently being re-vamped also as it was heavily bash
    array based. As such, a new config format is available like so
    config_eth0="1.2.3.4/24 5.6.7.8/16"
    or like so
    config_eth0="'1.2.3.4 netmask 255.255.255.0' '5.6.7.8 netmask 255.255.0.0'"

    We will still support the old bash array format provided that /bin/sh IS
    a link it bash.

    ChangeLog for baselayout-1 can be found in our SVN repo.
1 uberlord 2547 # Common makefile settings
2     # Copyright 2006-2007 Gentoo Foundation
3    
4     DESTDIR = /
5     ROOT = /
6     LIB = lib
7    
8     #
9     # Recursive rules
10     #
11    
12     SUBDIRS_ALL = $(patsubst %,%_all,$(SUBDIRS))
13     SUBDIRS_CLEAN = $(patsubst %,%_clean,$(SUBDIRS))
14     SUBDIRS_INSTALL = $(patsubst %,%_install,$(SUBDIRS))
15    
16     all:: $(SUBDIRS_ALL)
17     clean:: $(SUBDIRS_CLEAN)
18     install:: $(SUBDIRS_INSTALL)
19    
20     # Hmm ... possible to combine these three and not be ugly ?
21     %_all:
22     $(MAKE) -C $(patsubst %_all,%,$@) all
23     if test -d $(patsubst %_all,%,$@).$(OS) ; then $(MAKE) -C $(patsubst %_all,%,$@).$(OS) all ; fi
24     %_clean:
25     $(MAKE) -C $(patsubst %_clean,%,$@) clean
26     if test -d $(patsubst %_clean,%,$@).$(OS) ; then $(MAKE) -C $(patsubst %_clean,%,$@).$(OS) clean ; fi
27     %_install:
28     $(MAKE) -C $(patsubst %_install,%,$@) install
29     if test -d $(patsubst %_install,%,$@).$(OS) ; then $(MAKE) -C $(patsubst %_install,%,$@).$(OS) install ; fi
30    
31    
32     #
33     # Install rules
34     #
35    
36     INSTALL_DIR = install -m 0755 -d
37     INSTALL_EXE = install -m 0755
38     INSTALL_FILE = install -m 0644
39     INSTALL_SECURE = install -m 0600
40    
41     install:: $(EXES) $(FILES) $(FILES_NOEXIST) $(MANS)
42     test -n $(DIR) && $(INSTALL_DIR) $(DESTDIR)$(DIR)
43     for x in $(EXES) ; do $(INSTALL_EXE) $$x $(DESTDIR)$(DIR) || exit $$? ; done
44     for x in $(FILES) ; do $(INSTALL_FILE) $$x $(DESTDIR)$(DIR) || exit $$? ; done
45     for x in $(FILES_APPEND) ; do if test -e $(DESTDIR)$(DIR)/$$x ; then cat $$x >> $(DESTDIR)$(DIR)/$$x || exit $$? ; else $(INSTALL_FILE) $$x $(DESTDIR)$(DIR) || exit $$? ; fi ; done
46     for x in $(FILES_NOEXIST) ; do if ! test -e $(DESTDIR)$(DIR)/$$x ; then $(INSTALL_FILE) $$x $(DESTDIR)$(DIR) || exit $$? ; fi ; done
47     for x in $(FILES_SECURE) ; do $(INSTALL_SECURE) $$x $(DESTDIR)$(DIR) || exit $$? ; done
48     for x in $(MANS) ; do \
49     ext=`echo $$x | sed -e 's/^.*\\.//'` ; \
50     $(INSTALL_DIR) $(DESTDIR)$(DIR)/man$$ext || exit $$? ; \
51     $(INSTALL_FILE) $$x $(DESTDIR)$(DIR)/man$$ext || exit $$? ; \
52     done
53    
54     .PHONY: all clean install

  ViewVC Help
Powered by ViewVC 1.1.20