Makefile.inc1 (30d46e454a04a76c2e82b68474b6c622777c2ef5) Makefile.inc1 (75766799863334570acf7a65510361f470ce3b3e)
1#
2# $FreeBSD$
3#
4# Make command line options:
5# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
6# -DNO_CLEAN do not clean at all
7# -DDB_FROM_SRC use the user/group databases in src/etc instead of
8# the system database when installing.

--- 427 unchanged lines hidden (view full) ---

436.if make(installworld) || make(install)
437SUBDIR+=.WAIT
438.endif
439SUBDIR+=etc
440
441.endif # !empty(SUBDIR_OVERRIDE)
442
443.if defined(NOCLEAN)
1#
2# $FreeBSD$
3#
4# Make command line options:
5# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
6# -DNO_CLEAN do not clean at all
7# -DDB_FROM_SRC use the user/group databases in src/etc instead of
8# the system database when installing.

--- 427 unchanged lines hidden (view full) ---

436.if make(installworld) || make(install)
437SUBDIR+=.WAIT
438.endif
439SUBDIR+=etc
440
441.endif # !empty(SUBDIR_OVERRIDE)
442
443.if defined(NOCLEAN)
444.warning NOCLEAN option is deprecated. Use NO_CLEAN instead.
445NO_CLEAN= ${NOCLEAN}
444.warning The src.conf WITHOUT_CLEAN option can now be used instead of NOCLEAN.
445MK_CLEAN:= no
446.endif
446.endif
447.if defined(NO_CLEAN)
448.info The src.conf WITHOUT_CLEAN option can now be used instead of NO_CLEAN.
449MK_CLEAN:= no
450.endif
447.if defined(NO_CLEANDIR)
448CLEANDIR= clean cleandepend
449.else
450CLEANDIR= cleandir
451.endif
452
453.if defined(WORLDFAST)
451.if defined(NO_CLEANDIR)
452CLEANDIR= clean cleandepend
453.else
454CLEANDIR= cleandir
455.endif
456
457.if defined(WORLDFAST)
454NO_CLEAN= t
458MK_CLEAN:= no
455NO_OBJWALK= t
456.endif
457
458.if ${MK_META_MODE} == "yes"
459# If filemon is used then we can rely on the build being incremental-safe.
460# The .meta files will also track the build command and rebuild should
461# it change.
462.if empty(.MAKE.MODE:Mnofilemon)
459NO_OBJWALK= t
460.endif
461
462.if ${MK_META_MODE} == "yes"
463# If filemon is used then we can rely on the build being incremental-safe.
464# The .meta files will also track the build command and rebuild should
465# it change.
466.if empty(.MAKE.MODE:Mnofilemon)
463NO_CLEAN= t
467MK_CLEAN:= no
464.endif
465.endif
466.if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes"
467NO_OBJWALK= t
468NO_KERNELOBJ= t
469.endif
470.if !defined(NO_OBJWALK)
471_obj= obj

--- 360 unchanged lines hidden (view full) ---

832_LIBCOMPAT= SOFT
833.include "Makefile.libcompat"
834.endif
835
836# META_MODE normally ignores host file changes since every build updates
837# timestamps (see NO_META_IGNORE_HOST in sys.mk). There are known times
838# when the ABI breaks though that we want to force rebuilding WORLDTMP
839# to get updated host tools.
468.endif
469.endif
470.if defined(NO_OBJWALK) || ${MK_AUTO_OBJ} == "yes"
471NO_OBJWALK= t
472NO_KERNELOBJ= t
473.endif
474.if !defined(NO_OBJWALK)
475_obj= obj

--- 360 unchanged lines hidden (view full) ---

836_LIBCOMPAT= SOFT
837.include "Makefile.libcompat"
838.endif
839
840# META_MODE normally ignores host file changes since every build updates
841# timestamps (see NO_META_IGNORE_HOST in sys.mk). There are known times
842# when the ABI breaks though that we want to force rebuilding WORLDTMP
843# to get updated host tools.
840.if ${MK_META_MODE} == "yes" && defined(NO_CLEAN) && \
844.if ${MK_META_MODE} == "yes" && ${MK_CLEAN} == "no" && \
841 !defined(NO_META_IGNORE_HOST) && !defined(NO_META_IGNORE_HOST_HEADERS) && \
842 !defined(_MKSHOWCONFIG)
843# r318736 - ino64 major ABI breakage
844META_MODE_BAD_ABI_VERS+= 1200031
845
846.if !defined(OBJDIR_HOST_OSRELDATE)
847.if exists(${OBJTOP}/host-osreldate.h)
848OBJDIR_HOST_OSRELDATE!= \

--- 15 unchanged lines hidden (view full) ---

864.endif
865.endfor
866.if defined(_meta_mode_need_rebuild)
867.info META_MODE: Rebuilding host tools due to ABI breakage in __FreeBSD_version ${_meta_mode_need_rebuild}.
868NO_META_IGNORE_HOST_HEADERS= 1
869.export NO_META_IGNORE_HOST_HEADERS
870.endif # defined(_meta_mode_need_rebuild)
871.endif # defined(OBJDIR_HOST_OSRELDATE)
845 !defined(NO_META_IGNORE_HOST) && !defined(NO_META_IGNORE_HOST_HEADERS) && \
846 !defined(_MKSHOWCONFIG)
847# r318736 - ino64 major ABI breakage
848META_MODE_BAD_ABI_VERS+= 1200031
849
850.if !defined(OBJDIR_HOST_OSRELDATE)
851.if exists(${OBJTOP}/host-osreldate.h)
852OBJDIR_HOST_OSRELDATE!= \

--- 15 unchanged lines hidden (view full) ---

868.endif
869.endfor
870.if defined(_meta_mode_need_rebuild)
871.info META_MODE: Rebuilding host tools due to ABI breakage in __FreeBSD_version ${_meta_mode_need_rebuild}.
872NO_META_IGNORE_HOST_HEADERS= 1
873.export NO_META_IGNORE_HOST_HEADERS
874.endif # defined(_meta_mode_need_rebuild)
875.endif # defined(OBJDIR_HOST_OSRELDATE)
872.endif # ${MK_META_MODE} == "yes" && defined(NO_CLEAN) ...
876.endif # ${MK_META_MODE} == "yes" && ${MK_CLEAN} == "no" ...
873# This is only used for META_MODE+filemon to track what the oldest
874# __FreeBSD_version is in WORLDTMP. This purposely does NOT have
875# a make dependency on /usr/include/osreldate.h as the file should
876# only be copied when it is missing or meta mode determines it has changed.
877# Since host files are normally ignored without NO_META_IGNORE_HOST
878# the file will never be updated unless that flag is specified. This
879# allows tracking the oldest osreldate to force rebuilds via
880# META_MODE_BADABI_REVS above.

--- 127 unchanged lines hidden (view full) ---

1008.endif
1009.endfor
1010
1011_worldtmp: .PHONY
1012 @echo
1013 @echo "--------------------------------------------------------------"
1014 @echo ">>> Rebuilding the temporary build tree"
1015 @echo "--------------------------------------------------------------"
877# This is only used for META_MODE+filemon to track what the oldest
878# __FreeBSD_version is in WORLDTMP. This purposely does NOT have
879# a make dependency on /usr/include/osreldate.h as the file should
880# only be copied when it is missing or meta mode determines it has changed.
881# Since host files are normally ignored without NO_META_IGNORE_HOST
882# the file will never be updated unless that flag is specified. This
883# allows tracking the oldest osreldate to force rebuilds via
884# META_MODE_BADABI_REVS above.

--- 127 unchanged lines hidden (view full) ---

1012.endif
1013.endfor
1014
1015_worldtmp: .PHONY
1016 @echo
1017 @echo "--------------------------------------------------------------"
1018 @echo ">>> Rebuilding the temporary build tree"
1019 @echo "--------------------------------------------------------------"
1016.if !defined(NO_CLEAN)
1020.if ${MK_CLEAN} == "yes"
1017 rm -rf ${WORLDTMP}
1018.else
1019# Note: for delete-old we need to set $PATH to also include the host $PATH
1020# since otherwise a partial build with missing symlinks in ${WORLDTMP}/legacy/
1021# will fail to run due to missing binaries. $WMAKE sets PATH to only ${TMPPATH}
1022# so we remove that assingnment from $WMAKE and prepend the new $PATH
1023 ${_+_}@if [ -e "${WORLDTMP}" ]; then \
1024 echo ">>> Deleting stale files in build tree..."; \

--- 8 unchanged lines hidden (view full) ---

1033 inum=$$(stat -f %i ${WORLDTMP}/usr/bin/${cc}); \
1034 find ${WORLDTMP}/usr/bin -inum $${inum} -delete; \
1035 fi
1036.endfor
1037.endif # ${USING_SYSTEM_COMPILER} == "yes"
1038.if ${USING_SYSTEM_LINKER} == "yes"
1039 @rm -f ${WORLDTMP}/usr/bin/ld ${WORLDTMP}/usr/bin/ld.lld
1040.endif # ${USING_SYSTEM_LINKER} == "yes"
1021 rm -rf ${WORLDTMP}
1022.else
1023# Note: for delete-old we need to set $PATH to also include the host $PATH
1024# since otherwise a partial build with missing symlinks in ${WORLDTMP}/legacy/
1025# will fail to run due to missing binaries. $WMAKE sets PATH to only ${TMPPATH}
1026# so we remove that assingnment from $WMAKE and prepend the new $PATH
1027 ${_+_}@if [ -e "${WORLDTMP}" ]; then \
1028 echo ">>> Deleting stale files in build tree..."; \

--- 8 unchanged lines hidden (view full) ---

1037 inum=$$(stat -f %i ${WORLDTMP}/usr/bin/${cc}); \
1038 find ${WORLDTMP}/usr/bin -inum $${inum} -delete; \
1039 fi
1040.endfor
1041.endif # ${USING_SYSTEM_COMPILER} == "yes"
1042.if ${USING_SYSTEM_LINKER} == "yes"
1043 @rm -f ${WORLDTMP}/usr/bin/ld ${WORLDTMP}/usr/bin/ld.lld
1044.endif # ${USING_SYSTEM_LINKER} == "yes"
1041.endif # !defined(NO_CLEAN)
1045.endif # ${MK_CLEAN} == "yes"
1042 @mkdir -p ${WORLDTMP}
1043 @touch ${WORLDTMP}/${.TARGET}
1044# We can't use mtree to create the worldtmp directories since it may not be
1045# available on the target system (this happens e.g. when building on non-FreeBSD)
1046 cd ${.CURDIR}/tools/build; \
1047 ${MAKE} DIRPRFX=tools/build/ DESTDIR=${WORLDTMP}/legacy installdirs
1048# In order to build without inheriting $PATH we need to add symlinks to the host
1049# tools in $WORLDTMP for the tools that we don't build during bootstrap-tools

--- 22 unchanged lines hidden (view full) ---

1072.if ${MK_DEBUG_FILES} != "no"
1073 ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
1074 -p ${WORLDTMP}/usr/lib >/dev/null
1075.endif
1076.for _mtree in ${LOCAL_MTREE}
1077 ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null
1078.endfor
1079_cleanobj:
1046 @mkdir -p ${WORLDTMP}
1047 @touch ${WORLDTMP}/${.TARGET}
1048# We can't use mtree to create the worldtmp directories since it may not be
1049# available on the target system (this happens e.g. when building on non-FreeBSD)
1050 cd ${.CURDIR}/tools/build; \
1051 ${MAKE} DIRPRFX=tools/build/ DESTDIR=${WORLDTMP}/legacy installdirs
1052# In order to build without inheriting $PATH we need to add symlinks to the host
1053# tools in $WORLDTMP for the tools that we don't build during bootstrap-tools

--- 22 unchanged lines hidden (view full) ---

1076.if ${MK_DEBUG_FILES} != "no"
1077 ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
1078 -p ${WORLDTMP}/usr/lib >/dev/null
1079.endif
1080.for _mtree in ${LOCAL_MTREE}
1081 ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null
1082.endfor
1083_cleanobj:
1080.if !defined(NO_CLEAN)
1084.if ${MK_CLEAN} == "yes"
1081 @echo
1082 @echo "--------------------------------------------------------------"
1083 @echo ">>> stage 2.1: cleaning up the object tree"
1084 @echo "--------------------------------------------------------------"
1085 # Avoid including bsd.compiler.mk in clean and obj with _NO_INCLUDE_COMPILERMK
1086 # since the restricted $PATH might not contain a valid cc binary
1087 ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t ${CLEANDIR}
1088.if defined(_LIBCOMPAT)
1089 ${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} _NO_INCLUDE_COMPILERMK=t -f Makefile.inc1 ${CLEANDIR}
1090.endif
1091.else
1092 ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t _cleanobj_fast_depend_hack
1085 @echo
1086 @echo "--------------------------------------------------------------"
1087 @echo ">>> stage 2.1: cleaning up the object tree"
1088 @echo "--------------------------------------------------------------"
1089 # Avoid including bsd.compiler.mk in clean and obj with _NO_INCLUDE_COMPILERMK
1090 # since the restricted $PATH might not contain a valid cc binary
1091 ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t ${CLEANDIR}
1092.if defined(_LIBCOMPAT)
1093 ${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} _NO_INCLUDE_COMPILERMK=t -f Makefile.inc1 ${CLEANDIR}
1094.endif
1095.else
1096 ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t _cleanobj_fast_depend_hack
1093.endif # !defined(NO_CLEAN)
1097.endif # ${MK_CLEAN} == "yes"
1094_obj:
1095 @echo
1096 @echo "--------------------------------------------------------------"
1097 @echo ">>> stage 2.2: rebuilding the object tree"
1098 @echo "--------------------------------------------------------------"
1099 ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t obj
1100_build-tools:
1101 @echo

--- 565 unchanged lines hidden (view full) ---

1667 @echo ">>> stage 1: configuring the kernel"
1668 @echo "--------------------------------------------------------------"
1669 cd ${KRNLCONFDIR}; \
1670 PATH=${TMPPATH} \
1671 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
1672 -I '${KERNCONFDIR}' -I '${KRNLCONFDIR}' \
1673 '${KERNCONFDIR}/${_kernel}'
1674.endif
1098_obj:
1099 @echo
1100 @echo "--------------------------------------------------------------"
1101 @echo ">>> stage 2.2: rebuilding the object tree"
1102 @echo "--------------------------------------------------------------"
1103 ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t obj
1104_build-tools:
1105 @echo

--- 565 unchanged lines hidden (view full) ---

1671 @echo ">>> stage 1: configuring the kernel"
1672 @echo "--------------------------------------------------------------"
1673 cd ${KRNLCONFDIR}; \
1674 PATH=${TMPPATH} \
1675 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \
1676 -I '${KERNCONFDIR}' -I '${KRNLCONFDIR}' \
1677 '${KERNCONFDIR}/${_kernel}'
1678.endif
1675.if !defined(NO_CLEAN) && !defined(NO_KERNELCLEAN)
1679.if ${MK_CLEAN} == "yes" && !defined(NO_KERNELCLEAN)
1676 @echo
1677 @echo "--------------------------------------------------------------"
1678 @echo ">>> stage 2.1: cleaning up the object tree"
1679 @echo "--------------------------------------------------------------"
1680 ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR}
1681.else
1682 ${_+_}cd ${.CURDIR}; ${WMAKE} _cleankernobj_fast_depend_hack
1683.endif

--- 789 unchanged lines hidden (view full) ---

2473.if ${MK_PMC} != "no" && \
2474 (${TARGET_ARCH} == "aarch64" || ${TARGET_ARCH} == "amd64" || \
2475 ${TARGET_ARCH} == "i386")
2476_jevents=lib/libpmc/pmu-events
2477.endif
2478
2479# kernel-toolchain skips _cleanobj, so handle cleaning up previous
2480# build-tools directories if needed.
1680 @echo
1681 @echo "--------------------------------------------------------------"
1682 @echo ">>> stage 2.1: cleaning up the object tree"
1683 @echo "--------------------------------------------------------------"
1684 ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR}
1685.else
1686 ${_+_}cd ${.CURDIR}; ${WMAKE} _cleankernobj_fast_depend_hack
1687.endif

--- 789 unchanged lines hidden (view full) ---

2477.if ${MK_PMC} != "no" && \
2478 (${TARGET_ARCH} == "aarch64" || ${TARGET_ARCH} == "amd64" || \
2479 ${TARGET_ARCH} == "i386")
2480_jevents=lib/libpmc/pmu-events
2481.endif
2482
2483# kernel-toolchain skips _cleanobj, so handle cleaning up previous
2484# build-tools directories if needed.
2481.if !defined(NO_CLEAN) && make(kernel-toolchain)
2485.if ${MK_CLEAN} == "yes" && make(kernel-toolchain)
2482_bt_clean= ${CLEANDIR}
2483.endif
2484
2485.for _tool in \
2486 ${_tcsh} \
2487 bin/sh \
2488 ${LOCAL_TOOL_DIRS} \
2489 ${_jevents} \

--- 978 unchanged lines hidden ---
2486_bt_clean= ${CLEANDIR}
2487.endif
2488
2489.for _tool in \
2490 ${_tcsh} \
2491 bin/sh \
2492 ${LOCAL_TOOL_DIRS} \
2493 ${_jevents} \

--- 978 unchanged lines hidden ---