Magellan Linux

Annotation of /tags/init-0_5_5/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 694 - (hide annotations) (download)
Sat Mar 22 19:59:32 2008 UTC (16 years, 1 month ago) by niro
Original Path: trunk/magellan-initscripts/Makefile
File size: 2994 byte(s)
-respect /lib/udev-state /lib/udev/state location change

1 niro 362 # Magellan Initscripts
2 niro 694 # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/Makefile,v 1.8 2008-03-22 19:59:32 niro Exp $
3 niro 362
4     CC=gcc
5     CFLAGS=-Os -Wall
6     LDFLAGS=-s
7    
8     DESTDIR=
9    
10     sysconfdir=/etc
11     libdir=/lib
12     sbindir=/sbin
13     rcdir=$(sysconfdir)/rc.d
14     initdir=$(rcdir)/init.d
15    
16     all: start-stop-daemon
17    
18     start-stop-daemon: src/start-stop-daemon.o
19     $(CC) $(CFLAGS) -o start-stop-daemon src/start-stop-daemon.o $(LDFLAGS)
20    
21     src/start-stop-daemon.o: src/start-stop-daemon.c src/headers.h
22    
23     clean:
24     rm -f src/*.o
25     if [ -f start-stop-daemon ]; then rm start-stop-daemon; fi
26    
27     create-dirs:
28     install -d -m 0755 $(DESTDIR)$(sysconfdir)
29     install -d -m 0755 $(DESTDIR)$(sysconfdir)/conf.d
30     install -d -m 0755 $(DESTDIR)$(sysconfdir)/modules.d
31     install -d -m 0755 $(DESTDIR)$(sysconfdir)/sysconfig
32     install -d -m 0755 $(DESTDIR)$(rcdir)/rc0.d
33     install -d -m 0755 $(DESTDIR)$(rcdir)/rc1.d
34     install -d -m 0755 $(DESTDIR)$(rcdir)/rc2.d
35     install -d -m 0755 $(DESTDIR)$(rcdir)/rc3.d
36     install -d -m 0755 $(DESTDIR)$(rcdir)/rc4.d
37     install -d -m 0755 $(DESTDIR)$(rcdir)/rc5.d
38     install -d -m 0755 $(DESTDIR)$(rcdir)/rc6.d
39     install -d -m 0755 $(DESTDIR)$(rcdir)/rcsysinit.d
40     install -d -m 0755 $(DESTDIR)$(initdir)
41 niro 694 install -d -m 0755 $(DESTDIR)$(libdir)/udev/state
42 niro 362 install -d -m 0755 $(DESTDIR)$(sbindir)
43    
44     install-etc:
45     for file in DIR_COLORS \
46     fstab \
47     group \
48     hostname \
49     hosts \
50     inittab \
51     inputrc \
52     issue \
53     passwd \
54     profile \
55     protocols \
56     rc.config \
57     services \
58 niro 454 shells \
59     sysctl.conf; \
60 niro 362 do \
61     install -m 0644 etc/$${file} $(DESTDIR)$(sysconfdir); \
62     done
63     echo "$$(date +%Y%m%d)-cvs" > $(DESTDIR)$(sysconfdir)/mageversion
64    
65    
66     install-confd:
67     install -m 0644 etc/conf.d/kernel $(DESTDIR)$(sysconfdir)/conf.d
68 niro 509 install -m 0644 etc/conf.d/net.routes $(DESTDIR)$(sysconfdir)/conf.d
69 niro 579 install -m 0644 etc/conf.d/net.sample $(DESTDIR)$(sysconfdir)/conf.d
70 niro 362 install -m 0644 etc/sysconfig/rc $(DESTDIR)$(sysconfdir)/sysconfig
71    
72     install-modulesd:
73 niro 693 install -m 0644 etc/modules.autoload $(DESTDIR)$(sysconfdir)
74 niro 362 install -m 0644 etc/modules.d/aliases $(DESTDIR)$(sysconfdir)/modules.d
75     install -m 0644 etc/modules.d/i386 $(DESTDIR)$(sysconfdir)/modules.d
76    
77     install-initd:
78     for script in checkfs \
79     cleanfs \
80     consolefont \
81     functions \
82     halt \
83     hwdetect \
84     loadkeys \
85     localnet \
86     modules \
87     mountfs \
88     network \
89     rc \
90     reboot \
91     sendsignals \
92     setclock \
93     swap \
94 niro 367 sysctl \
95 niro 362 template; \
96     do \
97     install -m 0755 etc/rc.d/init.d/$${script} $(DESTDIR)$(initdir)/${script}; \
98     done
99    
100    
101     install-udevd:
102 niro 694 install -m 0644 lib/udev-state/devices.tar.bz2 $(DESTDIR)$(libdir)/udev/state
103 niro 362
104     install-bins:
105     install -m 0755 start-stop-daemon $(DESTDIR)$(sbindir)
106     install -m 0755 sbin/modules-update $(DESTDIR)$(sbindir)
107     install -m 0755 sbin/rc-config $(DESTDIR)$(sbindir)
108    
109 niro 365 install-symlinks:
110     ln -snf rc.d/init.d $(DESTDIR)$(sysconfdir)/init.d
111    
112 niro 362 install: create-dirs \
113     install-etc \
114     install-confd \
115     install-modulesd \
116     install-initd \
117     install-udevd \
118 niro 365 install-bins \
119     install-symlinks
120 niro 362
121     .PHONY: all install