Slight change to /usr/src/etc/Makefile?

Dave Hayes dave at jetcafe.org
Tue Mar 4 17:13:38 PST 2008


I'd like to propose the following change to /usr/src/etc/Makefile
as part of "make upgrade". What this does is allow one to say

  make upgrade ETC_UPGRADE_ONLY=1

so that the upgrade process only affects files in /etc and doesn't
try to do anything else.

RCS file: /home/DragonFly/cvs-mirror/src/etc/Makefile,v
retrieving revision 1.211
diff -u -u -r1.211 Makefile
--- Makefile    2 Feb 2008 18:24:00 -0000       1.211
+++ Makefile    5 Mar 2008 01:09:00 -0000
@@ -127,9 +127,11 @@
                pw -V ${DESTDIR}/etc groupadd _sdpd -g 70
 
 upgrade_etc:   preupgrade remove-obsolete-files
+.if !defined(ETC_UPGRADE_ONLY)
 .if !defined(BINARY_UPGRADE) # binary upgrade just copies these files
        cd ${UPGRADE_SRCDIR}/../share/mk; ${MAKE} install
 .endif
+.endif
        cd ${UPGRADE_SRCDIR}; \
            ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
                ${BINUPDATE} ${DESTDIR}/etc; \
@@ -169,6 +171,8 @@
 .endif
 .endfor
 .endif
+.if !defined(ETC_UPGRADE_ONLY)
+# Counting on the fact that no other ETC upgrade stuff appears below this line
 .if !defined(BINARY_UPGRADE) # binary upgrade just copies these files
        cd ${UPGRADE_SRCDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
            ${FREEBSD} ${DESTDIR}/
@@ -269,6 +273,8 @@
 .endif
 .endif
 .endif
+# the below line matches .if defined(ETC_UPGRADE_ONLY)
+.endif
 
 distribution:
        cd ${.CURDIR}; \

-- 
Dave Hayes - Consultant - Altadena CA, USA - dave at jetcafe.org 
>>> The opinions expressed above are entirely my own <<<

"There is someone willing to argue about any point." 
           --I don't know, but I'll argue any attribution







More information about the Submit mailing list