From: Dirk Vogt Date: Tue, 1 May 2012 14:43:09 +0000 (+0200) Subject: Make ramdisk location configurable X-Git-Tag: v3.2.1~528 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/expt.png?a=commitdiff_plain;h=a8f6f3ebc91d9745f27eb4df6925cda5f44a7061;p=minix.git Make ramdisk location configurable Also, the ramdisk is now built when the memory driver is compiled. --- diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile index 435ea62d4..b6c3ae436 100644 --- a/drivers/memory/Makefile +++ b/drivers/memory/Makefile @@ -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 diff --git a/drivers/ramdisk/Makefile b/drivers/ramdisk/Makefile index b67b1218c..ab2b6aa8e 100644 --- a/drivers/ramdisk/Makefile +++ b/drivers/ramdisk/Makefile @@ -2,6 +2,11 @@ .include +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)