xref: /freebsd/targets/pseudo/bootstrap-packages/Makefile (revision b64c5a0ace59af62eff52bfe110a521dc73c937b)
1# SPDX-License-Identifier: BSD-2-Clause
2#
3# Compensate (a bit) for the lack of per package makefiles or other means
4# of knowing what goes in each package in the base system.
5# We can derive some of the information we want from the makefiles that
6# set PACKAGE.
7
8all:
9.if ${.MAKE.LEVEL} > 0
10all: packages
11.endif
12
13PACKAGES?= ${.CURDIR:H:H}/packages
14
15packages: package-makefile.list
16	@${.CURDIR}/bootstrap-packages.sh ${BOOTSTRAP_PACKAGES_FLAGS} \
17	PACKAGES=${PACKAGES} ${.ALLSRC}
18
19package-makefile.list:
20	@(cd ${SRCTOP} && \
21	find ${TOPS:U*bin etc lib*} -name 'Makefile' | \
22	xargs grep '^PACKAGE[[:space:]]*=' ) | \
23	sed 's/[[:space:]]*=[[:space:]]*/=/' > ${.TARGET}
24
25