remove extra mkfs.1
[minix.git] / drivers / ramdisk / Makefile
blobd5a4ee9f8a01a6958eb06237e0b7b4e4244a8e14
1 # Makefile for ramdisk image
3 .include <bsd.own.mk>
5 TOOL_PWD_MKDB?= ${NETBSDSRCDIR}/usr.sbin/pwd_mkdb/pwd_mkdb
6 install:
8 all:
10 PROG_DRIVERS=at_wini floppy pci
11 PROG_COMMANDS=cdprobe loadramdisk mount fsck.mfs sysenv sh \
12 service
13 PROG_SERVERS=mfs procfs
14 PROG_USRSBIN=pwd_mkdb
15 PROGRAMS=$(PROG_DRIVERS) $(PROG_COMMANDS) $(PROG_SERVERS) $(PROG_USRSBIN)
16 EXTRA=system.conf master.passwd rs.single
18 .if ${MKSMALL} != "yes"
19 PROG_DRIVERS+= ahci
20 PROG_SERVERS+= ext2
21 PROTO= proto
22 .else
23 PROTO= proto.small
24 .endif
26 .if ${MKACPI} != "no"
27 PROG_DRIVERS+= acpi
28 .endif
30 CPPFLAGS+= -I${NETBSDSRCDIR}/servers
31 CLEANFILES += $(PROGRAMS) $(SCRIPTS) $(EXTRA) image image.c t proto.gen
32 CLEANFILES += $(LIBRARIES) pwd.db spwd.db passwd
34 image: proto.gen mtab rc $(EXTRA) pwd.db spwd.db passwd
35 ${TOOL_MKFSMFS} image proto.gen || { rm -f image; false; }
36 # if fsck.mfs -s image | grep -q CLEAN; \
37 # then : ; \
38 # else echo "CLEAN sanity check of image failed." ; \
39 # echo "(Perhaps install current mkfs and fsck.)" ; \
40 # rm -f image; false; \
41 # fi
43 .for driver in $(PROG_DRIVERS)
44 $(driver): ../$(driver)/$(driver)
45 ${INSTALL} $> $@
47 ../$(driver)/$(driver):
48 $(MAKE) -C ../$(driver) $(driver)
49 .endfor
51 .for cmd in $(PROG_COMMANDS)
52 .if $(cmd) == sh
53 dir.$(cmd)=ash
54 .else
55 dir.$(cmd)=$(cmd)
56 .endif
57 $(cmd): ../../commands/$(dir.$(cmd))/$(cmd)
58 ${INSTALL} $> $@
60 ../../commands/$(dir.$(cmd))/$(cmd):
61 $(MAKE) -C ../../commands/$(dir.$(cmd)) $(cmd)
62 .endfor
64 .for etc in $(EXTRA)
65 $(etc): ../../etc/$(etc)
66 ${INSTALL} $> $@
67 .endfor
69 .for cmd in $(PROG_USRSBIN)
70 $(cmd): ../../usr.sbin/$(cmd)/$(cmd)
71 ${INSTALL} $> $@
73 ../../usr.sbin/$(cmd)/$(cmd):
74 $(MAKE) -C ../../usr.sbin/$(cmd) $(cmd)
75 .endfor
77 .for server in $(PROG_SERVERS)
78 $(server): ../../servers/$(server)/$(server)
79 ${INSTALL} $> $@
81 ../../servers/$(server)/$(server):
82 $(MAKE) -C ../../servers/$(server) $(server)
83 .endfor
85 pwd.db spwd.db passwd: ../../etc/master.passwd ../../usr.sbin/pwd_mkdb/pwd_mkdb
86 rm -f ../../etc/master.passwd.orig ../../etc/passwd.orig
87 rm -f ../../etc/pwd.db.tmp ../../etc/spwd.db.tmp
88 ${TOOL_PWD_MKDB} -V 0 -p -d ../../ ../../etc/master.passwd
89 ${INSTALL} ../../etc/$@ $@
91 proto.gen: $(PROGRAMS) proto.sh ${PROTO} proto.common.etc proto.common.dynamic proto.sh
92 strip $(PROGRAMS)
93 sh -e proto.sh ${PROTO} >proto.gen
95 .include <minix.service.mk>