From 4c6c911fdcc937bb63b4080228063796e3eb9717 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Thu, 17 Jan 2013 15:58:12 +0000 Subject: [PATCH] Replace previous change by different test . so contents always get overwritten in out-of-tree case --- drivers/ramdisk/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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}