Magellan Linux

Contents of /trunk/mkinitrd-magellan/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (17 years, 2 months ago) by niro
File size: 1253 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 VERSION=$(shell cat VERSION)
2
3 ARCH := $(patsubst i%86,i386,$(shell uname -m))
4 ARCH := $(patsubst sparc%,sparc,$(ARCH))
5
6 SUBDIRS = nash grubby livecd isolinux
7
8 #ifeq ($(ARCH),sparc)
9 #SUBDIRS += loadinitrd
10 #endif
11
12 #ifeq ($(ARCH),i386)
13 #SUBDIRS += loadinitrd
14 #endif
15
16 mandir=usr/share/man
17
18 all:
19 for n in $(SUBDIRS); do make -C $$n; done
20 make -C klibc
21 make -C busybox defconfig
22 make -C busybox
23
24
25 test: all
26 cd grubby; make test
27
28 install:
29 for n in $(SUBDIRS); do make -C $$n install DESTDIR=$(DESTDIR); done
30 for i in etc/conf.d sbin $(mandir)/man8 /usr/lib/mkinitrd; do \
31 if [ ! -d $(DESTDIR)/$$i ]; then \
32 mkdir -p $(DESTDIR)/$$i; \
33 fi; \
34 done
35 sed 's/%VERSIONTAG%/$(VERSION)/' < mkinitrd > $(DESTDIR)/sbin/mkinitrd
36 install -m755 installkernel $(DESTDIR)/sbin/installkernel
37 chmod 755 $(DESTDIR)/sbin/mkinitrd
38 install -m644 mkinitrd.8 $(DESTDIR)/$(mandir)/man8/mkinitrd.8
39 install -m644 mkinitrd.confd $(DESTDIR)/etc/conf.d/mkinitrd
40 install -m755 busybox/busybox $(DESTDIR)/usr/sbin/busybox.mkinitrd
41 install -m755 klibc/usr/kinit/run-init/static/run-init $(DESTDIR)/usr/sbin/run-init.mkinitrd
42
43 clean:
44 for n in $(SUBDIRS) busybox klibc isolinux; do make -C $$n clean; done
45
46 mrproper: clean
47 make -C busybox mrproper
48 make -C klibc mrproper