Annotation of /trunk/mkinitrd-magellan/Makefile
Parent Directory | Revision Log
Revision 546 -
(hide annotations)
(download)
Sat Sep 1 23:54:23 2007 UTC (17 years, 2 months ago) by niro
File size: 1645 byte(s)
Sat Sep 1 23:54:23 2007 UTC (17 years, 2 months ago) by niro
File size: 1645 byte(s)
-compress docs
1 | niro | 532 | 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 | niro | 544 | mandir = usr/share/man |
17 | docdir = usr/share/doc/mkinitrd-$(VERSION) | ||
18 | niro | 532 | |
19 | all: | ||
20 | for n in $(SUBDIRS); do make -C $$n; done | ||
21 | make -C klibc | ||
22 | make -C busybox defconfig | ||
23 | make -C busybox | ||
24 | |||
25 | |||
26 | test: all | ||
27 | cd grubby; make test | ||
28 | |||
29 | install: | ||
30 | for n in $(SUBDIRS); do make -C $$n install DESTDIR=$(DESTDIR); done | ||
31 | niro | 545 | for i in etc/conf.d sbin usr/sbin $(mandir)/man8 $(docdir)/busybox $(docdir)/klibc; do \ |
32 | niro | 532 | if [ ! -d $(DESTDIR)/$$i ]; then \ |
33 | mkdir -p $(DESTDIR)/$$i; \ | ||
34 | fi; \ | ||
35 | done | ||
36 | sed 's/%VERSIONTAG%/$(VERSION)/' < mkinitrd > $(DESTDIR)/sbin/mkinitrd | ||
37 | install -m755 installkernel $(DESTDIR)/sbin/installkernel | ||
38 | chmod 755 $(DESTDIR)/sbin/mkinitrd | ||
39 | install -m644 mkinitrd.8 $(DESTDIR)/$(mandir)/man8/mkinitrd.8 | ||
40 | install -m644 mkinitrd.confd $(DESTDIR)/etc/conf.d/mkinitrd | ||
41 | install -m755 busybox/busybox $(DESTDIR)/usr/sbin/busybox.mkinitrd | ||
42 | niro | 546 | zcat busybox/LICENSE | gzip -9 > $(DESTDIR)/$(docdir)/busybox |
43 | zcat busybox/README | gzip -9 > $(DESTDIR)/$(docdir)/busybox | ||
44 | zcat busybox/TODO | gzip -9 > $(DESTDIR)/$(docdir)/busybox | ||
45 | niro | 532 | install -m755 klibc/usr/kinit/run-init/static/run-init $(DESTDIR)/usr/sbin/run-init.mkinitrd |
46 | niro | 546 | zcat klibc/usr/klibc/README | gzip -9 > $(DESTDIR)/$(docdir)/klibc |
47 | zcat klibc/usr/klibc/LICENSE | gzip -9 > $(DESTDIR)/$(docdir)/klibc | ||
48 | niro | 532 | |
49 | clean: | ||
50 | for n in $(SUBDIRS) busybox klibc isolinux; do make -C $$n clean; done | ||
51 | |||
52 | mrproper: clean | ||
53 | make -C busybox mrproper | ||
54 | make -C klibc mrproper |