Run makewhatis(8) after 'make upgrade' instead of after 'make installworld'.
authorSascha Wildner <saw@online.de>
Sat, 12 Jun 2010 03:07:57 +0000 (05:07 +0200)
committerSascha Wildner <saw@online.de>
Sat, 12 Jun 2010 03:07:57 +0000 (05:07 +0200)
'make upgrade' does (among other things) remove obsolete manual pages. If
makewhatis(8) is run after 'make installworld' (i.e. before upgrade), the
whatis database will still contain them. Therefore, run makewhatis(8)
after 'make upgrade' when the removals are done.

Pointed-out-by: tuxillo
While here, clean up the upgrade target in /usr/src/Makefile a little bit.

Makefile
Makefile.inc1

index 94fc8e3..cb288c9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -173,16 +173,15 @@ make:
                make obj && make depend && make all && make install
 
 #
-# Handle the upgrade of /etc
+# Handle the upgrade of /etc, post-installworld updating of static files
+# and removing obsolete files.
 #
 
 preupgrade:
        @cd ${.CURDIR}/etc; make -m ${.CURDIR}/share/mk preupgrade
 
-upgrade:       upgrade_etc
-
-#
-# Handle post-installworld updating of static files (e.g. like /etc/rc)
-#
-upgrade_etc:
+upgrade:
        @cd ${.CURDIR}/etc; make -m ${.CURDIR}/share/mk upgrade_etc
+.if !defined(NOMAN) && !defined(NO_MAKEDB_RUN)
+       cd ${.CURDIR}/share/man; make makedb
+.endif
index b7ef4b7..105a80d 100644 (file)
@@ -469,13 +469,6 @@ reinstall:
        @echo ">>> Installing everything.."
        @echo "--------------------------------------------------------------"
        cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
-.if !defined(NOMAN) && !defined(NO_MAKEDB_RUN)
-       @echo
-       @echo "--------------------------------------------------------------"
-       @echo ">>> Rebuilding man page indices"
-       @echo "--------------------------------------------------------------"
-       cd ${.CURDIR}/share/man; ${MAKE} makedb
-.endif
 
 #
 # buildkernel, nativekernel, quickkernel, and installkernel