]> Zhao Yanbai Git Server - minix.git/commitdiff
Make ramdisk location configurable
authorDirk Vogt <dirk@minix3.org>
Tue, 1 May 2012 14:43:09 +0000 (16:43 +0200)
committerThomas Veerman <thomas@minix3.org>
Mon, 18 Jun 2012 10:53:25 +0000 (10:53 +0000)
Also, the ramdisk is now built when the memory driver is compiled.

drivers/memory/Makefile
drivers/ramdisk/Makefile

index 435ea62d423fc2cf01fb03b843b9619b5838f380..b6c3ae43637c97509fa5da4a7272915f0815911b 100644 (file)
@@ -3,6 +3,8 @@ PROG=   memory
 SRCS=  memory.c imgrd.mfs
 OBJS=  ${SRCS:N*.h:R:S/$/.o/g}
 
+RAMDISK_PATH?= ${NETBSDSRCDIR}/drivers/ramdisk
+
 DPADD+=        ${LIBBLOCKDRIVER} ${LIBCHARDRIVER} ${LIBSYS}
 LDADD+=        -lblockdriver -lchardriver -lsys
 
@@ -25,8 +27,11 @@ touch-genfiles:
        ${_MKTARGET_CREATE}
        ${OBJCOPY} -Ibinary -B${ARCH} -Oelf32-${ARCH}-minix $< $@
 
-imgrd.mfs:
-       ln -s ../ramdisk/image $@
+${RAMDISK_PATH}/image: .PHONY
+       ${MAKE} -C ${RAMDISK_PATH} image
+
+imgrd.mfs: ${RAMDISK_PATH}/image
+       ln -fs ${RAMDISK_PATH}/image $@
 CLEANFILES+=   imgrd.mfs
 
 .include <minix.bootprog.mk>
index b67b1218c8393d0b393106bf9656a87ebda09c72..ab2b6aa8e26ff7efc4193c2c09f977140f51b6da 100644 (file)
@@ -2,6 +2,11 @@
 
 .include <bsd.own.mk>
 
+TOOL_PWD_MKDB?= ${NETBSDSRCDIR}/usr.sbin/pwd_mkdb/pwd_mkdb
+install:
+
+all:
+
 PROG_DRIVERS=at_wini floppy pci
 PROG_COMMANDS=cdprobe dev2name loadramdisk mount fsck.mfs sysenv sh \
        service 
@@ -41,7 +46,7 @@ image:        proto.gen mtab rc $(EXTRA) pwd.db spwd.db passwd
 
 .for driver in $(PROG_DRIVERS)
 $(driver): ../$(driver)/$(driver)
-       install $> $@
+       ${INSTALL} $> $@
 
 ../$(driver)/$(driver):
        $(MAKE) -C ../$(driver) $(driver)
@@ -54,7 +59,7 @@ dir.$(cmd)=ash
 dir.$(cmd)=$(cmd)
 .endif
 $(cmd): ../../commands/$(dir.$(cmd))/$(cmd)
-       install $> $@
+       ${INSTALL} $> $@
 
 ../../commands/$(dir.$(cmd))/$(cmd):
        $(MAKE) -C ../../commands/$(dir.$(cmd)) $(cmd)
@@ -62,12 +67,12 @@ $(cmd): ../../commands/$(dir.$(cmd))/$(cmd)
 
 .for etc in $(EXTRA)
 $(etc): ../../etc/$(etc)
-       install $> $@
+       ${INSTALL} $> $@
 .endfor
 
 .for cmd in $(PROG_USRSBIN)
 $(cmd): ../../usr.sbin/$(cmd)/$(cmd)
-       install $> $@
+       ${INSTALL} $> $@
 
 ../../usr.sbin/$(cmd)/$(cmd):
        $(MAKE) -C ../../usr.sbin/$(cmd) $(cmd)
@@ -75,7 +80,7 @@ $(cmd): ../../usr.sbin/$(cmd)/$(cmd)
 
 .for server in $(PROG_SERVERS)
 $(server): ../../servers/$(server)/$(server)
-       install $> $@
+       ${INSTALL} $> $@
 
 ../../servers/$(server)/$(server):
        $(MAKE) -C ../../servers/$(server) $(server)
@@ -85,7 +90,7 @@ pwd.db spwd.db passwd: ../../etc/master.passwd ../../usr.sbin/pwd_mkdb/pwd_mkdb
        rm -f ../../etc/master.passwd.orig ../../etc/passwd.orig
        rm -f ../../etc/pwd.db.tmp ../../etc/spwd.db.tmp
        ../../usr.sbin/pwd_mkdb/pwd_mkdb -V 0 -p -d ../../ ../../etc/master.passwd
-       install ../../etc/$@ $@
+       ${INSTALL} ../../etc/$@ $@
 
 proto.gen: $(PROGRAMS) proto.sh ${PROTO} proto.common.etc proto.common.dynamic proto.sh
        strip $(PROGRAMS)