Fix installing from read-only ${.OBJDIR}
authorYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Fri, 28 Aug 2009 10:06:32 +0000 (19:06 +0900)
committerYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Sat, 29 Aug 2009 05:52:23 +0000 (14:52 +0900)
By default, install command preserves mtime, and files in the source tree
always have older mtime than a file created by touch command, in this case
${.OBJDIR}/openssl/.dummy, even though it's created earlier by dependency.
Since .dummy is newer, header files get created in objdir at install target
and that requires write permission on ${.OBJDIR}.

secure/lib/libcrypto/Makefile.inc

index 0cfa6b7..98b6a28 100644 (file)
@@ -101,12 +101,12 @@ openssl/opensslconf.h: openssl/.dummy ../../lib/libcrypto/opensslconf-${MACHINE_
 .endif
 
 openssl/evp.h: openssl/.dummy ${LCRYPTO_SRC}/crypto/evp/evp.h
-       ${INSTALL} -C -m 444 ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
+       cp ${.ALLSRC:Nopenssl/.dummy} ${.TARGET}
 
 SRCS+= ${HDRS:T:S;^;openssl/;}
 .for h in ${HDRS:S,^,${LCRYPTO_SRC}/,}
 openssl/${h:T}: openssl/.dummy ${h}
-       ${INSTALL} -C -m 444 ${h} openssl
+       cp ${h} openssl
 .endfor
 
 # mkdir the required directory as its own target, so multiple