Re: hardcoded -C argument to ${INSTALL}

From: Lars Eggert <larse_at_ISI.EDU>
Date: Tue, 06 May 2003 14:19:13 -0700
Lars Eggert wrote:
> Hi,
> 
> I'm putting a script together that will remove stale pieces after an 
> installworld, and my find+mtime approach chokes, because some uses of 
> ${INSTALL} in the Makefiles hardcode the -C argument, which will cause 
> file modification times to not be updated if the files are identical.
> 
> For example:
>     include/Makefile
>     share/mk/bsd.incs.mk
>     sys/boot/efi/loader/Makefile
>     sys/boot/alpha/common/Makefile.common
>     ...
> 
> I'm no guru on the buildworld process, so I'm wondering whether this is 
> by design, or an oversight? Can the -C be removed without ill effects?
> 
> If so, I'd be happy to take post a patch; let me know.

FWIW, attached is the patch, if someone's interested. Seems to work OK 
on my test box at least.

Lars
-- 
Lars Eggert <larse_at_isi.edu>           USC Information Sciences Institute

? sys/i386/conf/ALL
? sys/i386/conf/KERNEL-1.16
? sys/i386/conf/KERNEL-1.17
? sys/i386/conf/KERNEL-1.18
? sys/i386/conf/KERNEL-1.19
? sys/i386/conf/KERNEL-1.20
? sys/i386/conf/KERNEL-1.21
? sys/i386/conf/KERNEL-1.22
? sys/i386/conf/NEW
Index: include/Makefile
===================================================================
RCS file: /home/ncvs/src/include/Makefile,v
retrieving revision 1.197
diff -u -r1.197 Makefile
--- include/Makefile	2003/05/05 12:54:26	1.197
+++ include/Makefile	2003/05/06 21:04:35
_at__at_ -101,18 +101,18 _at__at_
 .endfor
 .for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS}
 	cd ${.CURDIR}/../sys; \
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
 	    ${DESTDIR}${INCLUDEDIR}/$i
 .endfor
 	cd ${.CURDIR}/../sys; \
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 opencrypto/*.h \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 opencrypto/*.h \
 	    ${DESTDIR}${INCLUDEDIR}/crypto
 	cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
 	    ${DESTDIR}${INCLUDEDIR}/machine
 .if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc)
 	cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc; \
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
 	    ${DESTDIR}${INCLUDEDIR}/machine/pc
 .endif
 
Index: libexec/rtld-aout/Makefile
===================================================================
RCS file: /home/ncvs/src/libexec/rtld-aout/Makefile,v
retrieving revision 1.31
diff -u -r1.31 Makefile
--- libexec/rtld-aout/Makefile	2001/09/12 10:04:41	1.31
+++ libexec/rtld-aout/Makefile	2003/05/06 21:04:44
_at__at_ -9,7 +9,7 _at__at_
 ASFLAGS+=-k
 DPADD+=	${LIBC:S/c.a/c_pic.a/} ${LIBC:S/c.a/gcc_pic.a/}
 LDADD+=	-lc_pic -lgcc_pic
-INSTALLFLAGS=	-fschg -C	# -C to install as atomically as possible
+INSTALLFLAGS=	-fschg
 MLINKS= rtld.1aout ld.so.1aout
 
 .PATH: ${.CURDIR}/${MACHINE_ARCH}
Index: libexec/rtld-elf/Makefile
===================================================================
RCS file: /home/ncvs/src/libexec/rtld-elf/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- libexec/rtld-elf/Makefile	2003/04/07 16:21:25	1.18
+++ libexec/rtld-elf/Makefile	2003/05/06 21:04:44
_at__at_ -6,7 +6,7 _at__at_
 MAN=		rtld.1
 CFLAGS+=	-Wall -DFREEBSD_ELF -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR}
 LDFLAGS+=	-nostdlib -e .rtld_start
-INSTALLFLAGS=	-fschg -C -b
+INSTALLFLAGS=	-fschg -b
 MLINKS=		rtld.1 ld-elf.so.1.1 \
 		rtld.1 ld.so.1
 
Index: share/mk/bsd.incs.mk
===================================================================
RCS file: /home/ncvs/src/share/mk/bsd.incs.mk,v
retrieving revision 1.3
diff -u -r1.3 bsd.incs.mk
--- share/mk/bsd.incs.mk	2002/07/03 12:28:03	1.3
+++ share/mk/bsd.incs.mk	2003/05/06 21:04:53
_at__at_ -39,7 +39,7 _at__at_
 .endif
 installincludes: _${group}INS_${header:T}
 _${group}INS_${header:T}: ${header}
-	${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \
+	${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \
 	    -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
 	    ${.ALLSRC} \
 	    ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}}
_at__at_ -51,10 +51,10 _at__at_
 installincludes: _${group}INS
 _${group}INS: ${_${group}INCS}
 .if defined(${group}NAME)
-	${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
+	${INSTALL} -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
 	    ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME}
 .else
-	${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
+	${INSTALL} -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
 	    ${.ALLSRC} ${DESTDIR}${${group}DIR}
 .endif
 .endif
Index: share/mk/bsd.lib.mk
===================================================================
RCS file: /home/ncvs/src/share/mk/bsd.lib.mk,v
retrieving revision 1.139
diff -u -r1.139 bsd.lib.mk
--- share/mk/bsd.lib.mk	2003/04/27 21:44:52	1.139
+++ share/mk/bsd.lib.mk	2003/05/06 21:04:53
_at__at_ -256,11 +256,11 _at__at_
 .ORDER: beforeinstall _libinstall
 _libinstall:
 .if defined(LIB) && !empty(LIB) && !defined(NOINSTALLLIB)
-	${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+	${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	    ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR}
 .endif
 .if !defined(NOPROFILE) && defined(LIB) && !empty(LIB)
-	${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+	${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
 	    ${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${LIBDIR}
 .endif
 .if !defined(NOSHLIBS) && defined(SHLIB_NAME)
Index: sys/boot/alpha/common/Makefile.common
===================================================================
RCS file: /home/ncvs/src/sys/boot/alpha/common/Makefile.common,v
retrieving revision 1.17
diff -u -r1.17 Makefile.common
--- sys/boot/alpha/common/Makefile.common	2003/02/26 06:18:52	1.17
+++ sys/boot/alpha/common/Makefile.common	2003/05/06 21:04:56
_at__at_ -63,22 +63,22 _at__at_
 beforeinstall:
 .ifdef INSTALL_HELP
 .if exists(${.OBJDIR}/${BASE}.help)
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.OBJDIR}/${BASE}.help ${DESTDIR}/boot
 .else
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/${BASE}.help ${DESTDIR}/boot
 .endif
 .endif
 .if !exists(${DESTDIR}/boot/loader.rc)
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/../../forth/loader.rc ${DESTDIR}/boot
 .endif
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/../../forth/loader.4th ${DESTDIR}/boot
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/../../forth/support.4th ${DESTDIR}/boot
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/../../forth/loader.conf ${DESTDIR}/boot/defaults
 
 
Index: sys/boot/arc/loader/Makefile
===================================================================
RCS file: /home/ncvs/src/sys/boot/arc/loader/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- sys/boot/arc/loader/Makefile	2002/05/10 09:26:30	1.7
+++ sys/boot/arc/loader/Makefile	2003/05/06 21:04:56
_at__at_ -52,10 +52,10 _at__at_
 
 beforeinstall:
 .if exists(${.OBJDIR}/loader.help)
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.OBJDIR}/${BASE}.help ${DESTDIR}/boot
 .else
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/${BASE}.help ${DESTDIR}/boot
 .endif
 
Index: sys/boot/efi/loader/Makefile
===================================================================
RCS file: /home/ncvs/src/sys/boot/efi/loader/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- sys/boot/efi/loader/Makefile	2003/02/26 06:18:52	1.19
+++ sys/boot/efi/loader/Makefile	2003/05/06 21:04:56
_at__at_ -89,21 +89,21 _at__at_
 
 beforeinstall:
 .if exists(${.OBJDIR}/loader.help)
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.OBJDIR}/${BASE}.help ${DESTDIR}/boot
 .else
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/${BASE}.help ${DESTDIR}/boot
 .endif
 .if !exists(${DESTDIR}/boot/loader.rc)
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/../../forth/loader.rc ${DESTDIR}/boot
 .endif
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/../../forth/loader.4th ${DESTDIR}/boot
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/../../forth/support.4th ${DESTDIR}/boot
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/../../forth/loader.conf ${DESTDIR}/boot/defaults
 
 
Index: sys/boot/ia64/skiload/Makefile
===================================================================
RCS file: /home/ncvs/src/sys/boot/ia64/skiload/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- sys/boot/ia64/skiload/Makefile	2003/02/26 06:18:52	1.10
+++ sys/boot/ia64/skiload/Makefile	2003/05/06 21:04:57
_at__at_ -66,7 +66,7 _at__at_
 
 beforeinstall:
 .if exists(${.OBJDIR}/${PROG}.help)
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 	    ${.OBJDIR}/${PROG}.help ${DESTDIR}/boot
 .endif
 
Index: sys/boot/powerpc/loader/Makefile
===================================================================
RCS file: /home/ncvs/src/sys/boot/powerpc/loader/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- sys/boot/powerpc/loader/Makefile	2002/07/10 12:13:16	1.10
+++ sys/boot/powerpc/loader/Makefile	2003/05/06 21:04:58
_at__at_ -82,21 +82,21 _at__at_
 
 beforeinstall:
 .if exists(${.OBJDIR}/loader.help)
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.OBJDIR}/${BASE}.help ${DESTDIR}/boot
 .else
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/${BASE}.help ${DESTDIR}/boot
 .endif
 .if !exists(${DESTDIR}/boot/loader.rc)
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/../../forth/loader.rc ${DESTDIR}/boot
 .endif
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/../../forth/loader.4th ${DESTDIR}/boot
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/../../forth/support.4th ${DESTDIR}/boot
-	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 		${.CURDIR}/../../forth/loader.conf ${DESTDIR}/boot/defaults
 
 ${PROG}: ${OBJS} ${LIBOFW} ${LIBSTAND} ${LIBFICL} start.o vers.o

Received on Tue May 06 2003 - 12:19:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:06 UTC