diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -3,19 +3,14 @@ OSNAME?= FreeBSD SUBDIR= distextract distfetch partedit runconsoles scripts SUBDIR_PARALLEL= +SUBDIR_DEPEND_distfetch = distextract +SUBDIR_DEPEND_partedit = distextract SCRIPTS= bsdinstall MAN= bsdinstall.8 PACKAGE= bsdinstall -GENHDRS= opt_osname.h -SRCS+= ${GENHDRS} -CLEANFILES+= ${GENHDRS} SCRIPTS+= startbsdinstall SCRIPTSDIR_startbsdinstall= ${LIBEXECDIR}/bsdinstall -opt_osname.h: .PHONY - if ! grep -q "^#define OSNAME \"${OSNAME}\"$"" ${.TARGET}; then \ - echo "#define OSNAME \"${OSNAME}\"" > ${.TARGET}; \ - fi .include diff --git a/usr.sbin/bsdinstall/distextract/Makefile b/usr.sbin/bsdinstall/distextract/Makefile --- a/usr.sbin/bsdinstall/distextract/Makefile +++ b/usr.sbin/bsdinstall/distextract/Makefile @@ -2,9 +2,18 @@ BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distextract -CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/.. +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I. LIBADD= archive bsddialog m +SRCS= distextract.c MAN= +GENHDRS= opt_osname.h +SRCS+= ${GENHDRS} +CLEANFILES+= ${GENHDRS} + +opt_osname.h: .PHONY + if ! grep -q "^#define OSNAME \"${OSNAME}\"$"" ${.TARGET}; then \ + echo "#define OSNAME \"${OSNAME}\"" > ${.TARGET}; \ + fi .include diff --git a/usr.sbin/bsdinstall/distfetch/Makefile b/usr.sbin/bsdinstall/distfetch/Makefile --- a/usr.sbin/bsdinstall/distfetch/Makefile +++ b/usr.sbin/bsdinstall/distfetch/Makefile @@ -2,7 +2,7 @@ BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distfetch -CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/.. +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/../distextract LIBADD= fetch bsddialog MAN= diff --git a/usr.sbin/bsdinstall/partedit/Makefile b/usr.sbin/bsdinstall/partedit/Makefile --- a/usr.sbin/bsdinstall/partedit/Makefile +++ b/usr.sbin/bsdinstall/partedit/Makefile @@ -5,7 +5,7 @@ LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \ ${BINDIR}/partedit ${BINDIR}/scriptedpart SYMLINKS= ../libexec/bsdinstall/partedit /usr/sbin/sade -CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/.. +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/../distextract LIBADD+= geom util bsddialog PARTEDIT_ARCH= ${MACHINE}