From: Ben Gras Date: Thu, 17 Jan 2013 15:58:12 +0000 (+0000) Subject: Replace previous change by different test X-Git-Tag: v3.2.1~91 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=4c6c911fdcc937bb63b4080228063796e3eb9717;p=minix.git Replace previous change by different test . so contents always get overwritten in out-of-tree case --- diff --git a/drivers/ramdisk/Makefile b/drivers/ramdisk/Makefile index 160458bdd..dc38cf47c 100644 --- a/drivers/ramdisk/Makefile +++ b/drivers/ramdisk/Makefile @@ -97,13 +97,18 @@ ${etc}: ${NETBSDSRCDIR}/etc/${etc} # LSC Force the regeneration of the proto file as it seems sometimes # they are not copied over as needed. -# LSC The test is needed; otherwise install complains about src and dst -# being the same, during in-tree builds # LSC ramdisk rc file != /etc/rc && mtab not empty! +# BJG if ${.CURDIR} == ${.OBJDIR}, we are building in-tree and install +# shouldn't try to install the originals over the originals. Otherwise +# we are building out-of-tree and the contents should be copied +# unconditionally in case the contents have changed after the first copy. +.if ${.CURDIR} != ${.OBJDIR} +CLEANFILES += ${EXTRA} ${PROTO} ${PROTO_FILES} .for file in ${EXTRA} ${PROTO} ${PROTO_FILES} ${file}: ${NETBSDSRCDIR}/drivers/ramdisk/${file} .PHONY - [ -e $@ ] || ${INSTALL} $> $@ + ${INSTALL} $> $@ .endfor +.endif # Generate dependencies rules for dynamic libraries, if needed .for lib in ${PROG_LIBS}