Makefile.inc1 (7e1b7636c894be9d1130c284089ce1ea0786ecec) Makefile.inc1 (6d75a7a852fe046e3866858ff995447498904e95)
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.

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

305.if ${MK_META_MODE} == "yes"
306# If filemon is used then we can rely on the build being incremental-safe.
307# The .meta files will also track the build command and rebuild should
308# it change.
309.if empty(.MAKE.MODE:Mnofilemon)
310NO_CLEAN= t
311.endif
312.endif
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.

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

305.if ${MK_META_MODE} == "yes"
306# If filemon is used then we can rely on the build being incremental-safe.
307# The .meta files will also track the build command and rebuild should
308# it change.
309.if empty(.MAKE.MODE:Mnofilemon)
310NO_CLEAN= t
311.endif
312.endif
313.if defined(NO_OBJ) || ${MK_AUTO_OBJ} == "yes"
314NO_OBJ= t
315NO_KERNELOBJ= t
316.endif
317.if !defined(NO_OBJ)
318_obj= obj
319.endif
313
314LOCAL_TOOL_DIRS?=
315PACKAGEDIR?= ${DESTDIR}/${DISTDIR}
316
317.if empty(SHELL:M*csh*)
318BUILDENV_SHELL?=${SHELL}
319.else
320BUILDENV_SHELL?=/bin/sh

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

823 @echo "--------------------------------------------------------------"
824 ${_+_}cd ${.CURDIR}; _PARALLEL_SUBDIR_OK=1 ${WMAKE} all
825
826WMAKE_TGTS=
827WMAKE_TGTS+= _worldtmp _legacy
828.if empty(SUBDIR_OVERRIDE)
829WMAKE_TGTS+= _bootstrap-tools
830.endif
320
321LOCAL_TOOL_DIRS?=
322PACKAGEDIR?= ${DESTDIR}/${DISTDIR}
323
324.if empty(SHELL:M*csh*)
325BUILDENV_SHELL?=${SHELL}
326.else
327BUILDENV_SHELL?=/bin/sh

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

830 @echo "--------------------------------------------------------------"
831 ${_+_}cd ${.CURDIR}; _PARALLEL_SUBDIR_OK=1 ${WMAKE} all
832
833WMAKE_TGTS=
834WMAKE_TGTS+= _worldtmp _legacy
835.if empty(SUBDIR_OVERRIDE)
836WMAKE_TGTS+= _bootstrap-tools
837.endif
831WMAKE_TGTS+= _cleanobj _obj _build-tools _cross-tools
838WMAKE_TGTS+= _cleanobj
839.if !defined(NO_OBJ)
840WMAKE_TGTS+= _obj
841.endif
842WMAKE_TGTS+= _build-tools _cross-tools
832WMAKE_TGTS+= _compiler-metadata
833WMAKE_TGTS+= _includes _libraries
834WMAKE_TGTS+= everything
835.if defined(LIBCOMPAT) && empty(SUBDIR_OVERRIDE)
836WMAKE_TGTS+= build${libcompat}
837.endif
838
839buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .PHONY

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

1605.if ${BOOTSTRAPPING} < ${MINIMUM_SUPPORTED_OSREL} && ${BOOTSTRAPPING} != 0
1606 @echo "ERROR: Source upgrades from versions prior to ${MINIMUM_SUPPORTED_REL} are not supported."; \
1607 false
1608.endif
1609
1610.for _tool in tools/build ${_elftoolchain_libs}
1611 ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \
1612 cd ${.CURDIR}/${_tool}; \
843WMAKE_TGTS+= _compiler-metadata
844WMAKE_TGTS+= _includes _libraries
845WMAKE_TGTS+= everything
846.if defined(LIBCOMPAT) && empty(SUBDIR_OVERRIDE)
847WMAKE_TGTS+= build${libcompat}
848.endif
849
850buildworld: buildworld_prologue ${WMAKE_TGTS} buildworld_epilogue .PHONY

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

1616.if ${BOOTSTRAPPING} < ${MINIMUM_SUPPORTED_OSREL} && ${BOOTSTRAPPING} != 0
1617 @echo "ERROR: Source upgrades from versions prior to ${MINIMUM_SUPPORTED_REL} are not supported."; \
1618 false
1619.endif
1620
1621.for _tool in tools/build ${_elftoolchain_libs}
1622 ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \
1623 cd ${.CURDIR}/${_tool}; \
1613 ${MAKE} DIRPRFX=${_tool}/ obj; \
1624 if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
1614 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \
1615 ${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no all; \
1616 ${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no \
1617 DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
1618.endfor
1619
1620#
1621# bootstrap-tools: Build tools needed for compatibility. These are binaries that

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

1761 ${_crunchide} \
1762 ${_crunchgen} \
1763 ${_nmtree} \
1764 ${_vtfontcvt} \
1765 usr.bin/localedef
1766${_bt}-${_tool}: .PHONY .MAKE
1767 ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
1768 cd ${.CURDIR}/${_tool}; \
1625 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \
1626 ${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no all; \
1627 ${MAKE} DIRPRFX=${_tool}/ MK_INCLUDES=no \
1628 DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
1629.endfor
1630
1631#
1632# bootstrap-tools: Build tools needed for compatibility. These are binaries that

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

1772 ${_crunchide} \
1773 ${_crunchgen} \
1774 ${_nmtree} \
1775 ${_vtfontcvt} \
1776 usr.bin/localedef
1777${_bt}-${_tool}: .PHONY .MAKE
1778 ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
1779 cd ${.CURDIR}/${_tool}; \
1769 ${MAKE} DIRPRFX=${_tool}/ obj; \
1780 if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
1770 ${MAKE} DIRPRFX=${_tool}/ all; \
1771 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
1772
1773bootstrap-tools: ${_bt}-${_tool}
1774.endfor
1775
1776#
1777# build-tools: Build special purpose build tools

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

1800 usr.bin/awk \
1801 lib/libmagic \
1802 usr.bin/mkesdb_static \
1803 usr.bin/mkcsmapper_static \
1804 usr.bin/vi/catalog
1805build-tools_${_tool}: .PHONY
1806 ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
1807 cd ${.CURDIR}/${_tool}; \
1781 ${MAKE} DIRPRFX=${_tool}/ all; \
1782 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
1783
1784bootstrap-tools: ${_bt}-${_tool}
1785.endfor
1786
1787#
1788# build-tools: Build special purpose build tools

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

1811 usr.bin/awk \
1812 lib/libmagic \
1813 usr.bin/mkesdb_static \
1814 usr.bin/mkcsmapper_static \
1815 usr.bin/vi/catalog
1816build-tools_${_tool}: .PHONY
1817 ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
1818 cd ${.CURDIR}/${_tool}; \
1808 ${MAKE} DIRPRFX=${_tool}/ obj; \
1819 if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
1809 ${MAKE} DIRPRFX=${_tool}/ build-tools
1810build-tools: build-tools_${_tool}
1811.endfor
1812.for _tool in \
1813 ${_gcc_tools}
1814build-tools_${_tool}: .PHONY
1815 ${_+_}@${ECHODIR} "===> ${_tool} (obj,all)"; \
1816 cd ${.CURDIR}/${_tool}; \
1820 ${MAKE} DIRPRFX=${_tool}/ build-tools
1821build-tools: build-tools_${_tool}
1822.endfor
1823.for _tool in \
1824 ${_gcc_tools}
1825build-tools_${_tool}: .PHONY
1826 ${_+_}@${ECHODIR} "===> ${_tool} (obj,all)"; \
1827 cd ${.CURDIR}/${_tool}; \
1817 ${MAKE} DIRPRFX=${_tool}/ obj; \
1828 if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
1818 ${MAKE} DIRPRFX=${_tool}/ all
1819build-tools: build-tools_${_tool}
1820.endfor
1821
1822#
1823# kernel-tools: Build kernel-building tools
1824#
1825kernel-tools: .PHONY

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

1894 ${_binutils} \
1895 ${_elftctools} \
1896 ${_dtrace_tools} \
1897 ${_gcc} \
1898 ${_btxld} \
1899 ${_usb_tools}
1900 ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
1901 cd ${.CURDIR}/${_tool}; \
1829 ${MAKE} DIRPRFX=${_tool}/ all
1830build-tools: build-tools_${_tool}
1831.endfor
1832
1833#
1834# kernel-tools: Build kernel-building tools
1835#
1836kernel-tools: .PHONY

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

1905 ${_binutils} \
1906 ${_elftctools} \
1907 ${_dtrace_tools} \
1908 ${_gcc} \
1909 ${_btxld} \
1910 ${_usb_tools}
1911 ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
1912 cd ${.CURDIR}/${_tool}; \
1902 ${MAKE} DIRPRFX=${_tool}/ obj; \
1913 if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
1903 ${MAKE} DIRPRFX=${_tool}/ all; \
1904 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install
1905.endfor
1906
1907NXBDESTDIR= ${OBJTREE}/nxb-bin
1908NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \
1909 TOOLS_PREFIX= \
1910 INSTALL="sh ${.CURDIR}/tools/install.sh" \

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

1926# For non-clang enabled targets that are still using the in tree gcc
1927# we must build a gperf binary for one instance of its Makefiles. On
1928# clang-enabled systems, the gperf binary is obsolete.
1929native-xtools: .PHONY
1930.if ${MK_GCC_BOOTSTRAP} != "no"
1931 mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin
1932 ${_+_}@${ECHODIR} "===> ${_gperf} (obj,all,install)"; \
1933 cd ${.CURDIR}/${_gperf}; \
1914 ${MAKE} DIRPRFX=${_tool}/ all; \
1915 ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install
1916.endfor
1917
1918NXBDESTDIR= ${OBJTREE}/nxb-bin
1919NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \
1920 TOOLS_PREFIX= \
1921 INSTALL="sh ${.CURDIR}/tools/install.sh" \

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

1937# For non-clang enabled targets that are still using the in tree gcc
1938# we must build a gperf binary for one instance of its Makefiles. On
1939# clang-enabled systems, the gperf binary is obsolete.
1940native-xtools: .PHONY
1941.if ${MK_GCC_BOOTSTRAP} != "no"
1942 mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin
1943 ${_+_}@${ECHODIR} "===> ${_gperf} (obj,all,install)"; \
1944 cd ${.CURDIR}/${_gperf}; \
1934 ${NXBMAKE} DIRPRFX=${_gperf}/ obj; \
1945 if [ -z "${NO_OBJ}" ]; then ${NXBMAKE} DIRPRFX=${_gperf}/ obj; fi; \
1935 ${NXBMAKE} DIRPRFX=${_gperf}/ all; \
1936 ${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install
1937.endif
1938 mkdir -p ${NXBDESTDIR}/bin ${NXBDESTDIR}/sbin ${NXBDESTDIR}/usr
1939 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
1940 -p ${NXBDESTDIR}/usr >/dev/null
1941 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
1942 -p ${NXBDESTDIR}/usr/include >/dev/null

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

2002 usr.bin/unzip \
2003 usr.bin/xargs \
2004 usr.bin/xinstall \
2005 usr.bin/xz \
2006 usr.bin/yacc \
2007 usr.sbin/chown
2008 ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
2009 cd ${.CURDIR}/${_tool}; \
1946 ${NXBMAKE} DIRPRFX=${_gperf}/ all; \
1947 ${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install
1948.endif
1949 mkdir -p ${NXBDESTDIR}/bin ${NXBDESTDIR}/sbin ${NXBDESTDIR}/usr
1950 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
1951 -p ${NXBDESTDIR}/usr >/dev/null
1952 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
1953 -p ${NXBDESTDIR}/usr/include >/dev/null

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

2013 usr.bin/unzip \
2014 usr.bin/xargs \
2015 usr.bin/xinstall \
2016 usr.bin/xz \
2017 usr.bin/yacc \
2018 usr.sbin/chown
2019 ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
2020 cd ${.CURDIR}/${_tool}; \
2010 ${NXBMAKE} DIRPRFX=${_tool}/ obj; \
2021 if [ -z "${NO_OBJ}" ]; then ${NXBMAKE} DIRPRFX=${_tool}/ obj; fi; \
2011 ${NXBMAKE} DIRPRFX=${_tool}/ all; \
2012 ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install
2013.endfor
2014
2015#
2016# hierarchy - ensure that all the needed directories are present
2017#
2018hierarchy hier: .MAKE .PHONY

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

2264.endif
2265.endif
2266
2267.for _lib in ${_prereq_libs}
2268${_lib}__PL: .PHONY .MAKE
2269.if exists(${.CURDIR}/${_lib})
2270 ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
2271 cd ${.CURDIR}/${_lib}; \
2022 ${NXBMAKE} DIRPRFX=${_tool}/ all; \
2023 ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install
2024.endfor
2025
2026#
2027# hierarchy - ensure that all the needed directories are present
2028#
2029hierarchy hier: .MAKE .PHONY

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

2275.endif
2276.endif
2277
2278.for _lib in ${_prereq_libs}
2279${_lib}__PL: .PHONY .MAKE
2280.if exists(${.CURDIR}/${_lib})
2281 ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
2282 cd ${.CURDIR}/${_lib}; \
2272 ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \
2283 if [ -z "${NO_OBJ}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \
2273 ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \
2274 DIRPRFX=${_lib}/ all; \
2275 ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \
2276 DIRPRFX=${_lib}/ install
2277.endif
2278.endfor
2279
2280.for _lib in ${_startup_libs} ${_prebuild_libs} ${_generic_libs}
2281${_lib}__L: .PHONY .MAKE
2282.if exists(${.CURDIR}/${_lib})
2283 ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
2284 cd ${.CURDIR}/${_lib}; \
2284 ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \
2285 DIRPRFX=${_lib}/ all; \
2286 ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \
2287 DIRPRFX=${_lib}/ install
2288.endif
2289.endfor
2290
2291.for _lib in ${_startup_libs} ${_prebuild_libs} ${_generic_libs}
2292${_lib}__L: .PHONY .MAKE
2293.if exists(${.CURDIR}/${_lib})
2294 ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
2295 cd ${.CURDIR}/${_lib}; \
2285 ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \
2296 if [ -z "${NO_OBJ}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \
2286 ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all; \
2287 ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ install
2288.endif
2289.endfor
2290
2291_prereq_libs: ${_prereq_libs:S/$/__PL/}
2292_startup_libs: ${_startup_libs:S/$/__L/}
2293_prebuild_libs: ${_prebuild_libs:S/$/__L/}

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

2604
2605_xb-bootstrap-tools: .PHONY
2606.for _tool in \
2607 ${_clang_tblgen} \
2608 ${_gperf} \
2609 ${_yacc}
2610 ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
2611 cd ${.CURDIR}/${_tool}; \
2297 ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all; \
2298 ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ install
2299.endif
2300.endfor
2301
2302_prereq_libs: ${_prereq_libs:S/$/__PL/}
2303_startup_libs: ${_startup_libs:S/$/__L/}
2304_prebuild_libs: ${_prebuild_libs:S/$/__L/}

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

2615
2616_xb-bootstrap-tools: .PHONY
2617.for _tool in \
2618 ${_clang_tblgen} \
2619 ${_gperf} \
2620 ${_yacc}
2621 ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
2622 cd ${.CURDIR}/${_tool}; \
2612 ${CDMAKE} DIRPRFX=${_tool}/ obj; \
2623 if [ -z "${NO_OBJ}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \
2613 ${CDMAKE} DIRPRFX=${_tool}/ all; \
2614 ${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install
2615.endfor
2616
2617_xb-build-tools: .PHONY
2618 ${_+_}@cd ${.CURDIR}; \
2619 ${CDBENV} ${MAKE} -f Makefile.inc1 ${NOFUN} build-tools
2620
2621_xb-cross-tools: .PHONY
2622.for _tool in \
2623 ${_binutils} \
2624 ${_elftctools} \
2625 usr.bin/ar \
2626 ${_clang_libs} \
2627 ${_clang} \
2628 ${_gcc}
2629 ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,all)"; \
2630 cd ${.CURDIR}/${_tool}; \
2624 ${CDMAKE} DIRPRFX=${_tool}/ all; \
2625 ${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install
2626.endfor
2627
2628_xb-build-tools: .PHONY
2629 ${_+_}@cd ${.CURDIR}; \
2630 ${CDBENV} ${MAKE} -f Makefile.inc1 ${NOFUN} build-tools
2631
2632_xb-cross-tools: .PHONY
2633.for _tool in \
2634 ${_binutils} \
2635 ${_elftctools} \
2636 usr.bin/ar \
2637 ${_clang_libs} \
2638 ${_clang} \
2639 ${_gcc}
2640 ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,all)"; \
2641 cd ${.CURDIR}/${_tool}; \
2631 ${CDMAKE} DIRPRFX=${_tool}/ obj; \
2642 if [ -z "${NO_OBJ}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ obj; fi; \
2632 ${CDMAKE} DIRPRFX=${_tool}/ all
2633.endfor
2634
2635_xi-mtree: .PHONY
2636 ${_+_}@${ECHODIR} "mtree populating ${XDDESTDIR}"
2637 mkdir -p ${XDDESTDIR}
2638 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \
2639 -p ${XDDESTDIR} >/dev/null

--- 52 unchanged lines hidden ---
2643 ${CDMAKE} DIRPRFX=${_tool}/ all
2644.endfor
2645
2646_xi-mtree: .PHONY
2647 ${_+_}@${ECHODIR} "mtree populating ${XDDESTDIR}"
2648 mkdir -p ${XDDESTDIR}
2649 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \
2650 -p ${XDDESTDIR} >/dev/null

--- 52 unchanged lines hidden ---