xref: /freebsd/targets/pseudo/bootstrap-packages/Makefile (revision 2bdd404abe2cdf9f52ddc45202afbde637f97292)
187b759f0SSimon J. Gerraty# SPDX-License-Identifier: BSD-2-Clause
287b759f0SSimon J. Gerraty#
387b759f0SSimon J. Gerraty# Compensate (a bit) for the lack of per package makefiles or other means
487b759f0SSimon J. Gerraty# of knowing what goes in each package in the base system.
587b759f0SSimon J. Gerraty# We can derive some of the information we want from the makefiles that
687b759f0SSimon J. Gerraty# set PACKAGE.
787b759f0SSimon J. Gerraty
887b759f0SSimon J. Gerratyall:
987b759f0SSimon J. Gerraty.if ${.MAKE.LEVEL} > 0
1087b759f0SSimon J. Gerratyall: packages
1187b759f0SSimon J. Gerraty.endif
1287b759f0SSimon J. Gerraty
1387b759f0SSimon J. GerratyPACKAGES?= ${.CURDIR:H:H}/packages
1487b759f0SSimon J. Gerraty
1587b759f0SSimon J. Gerratypackages: package-makefile.list
16*2bdd404aSSimon J. Gerraty	@${.CURDIR}/bootstrap-packages.sh ${BOOTSTRAP_PACKAGES_FLAGS} \
17*2bdd404aSSimon J. Gerraty	PACKAGES=${PACKAGES} ${.ALLSRC}
1887b759f0SSimon J. Gerraty
1987b759f0SSimon J. Gerratypackage-makefile.list:
2087b759f0SSimon J. Gerraty	@(cd ${SRCTOP} && \
2187b759f0SSimon J. Gerraty	find ${TOPS:U*bin etc lib*} -name 'Makefile' | \
2287b759f0SSimon J. Gerraty	xargs grep '^PACKAGE[[:space:]]*=' ) | \
2387b759f0SSimon J. Gerraty	sed 's/[[:space:]]*=[[:space:]]*/=/' > ${.TARGET}
2487b759f0SSimon J. Gerraty
25