# ~jhs/public_html/src/bsd/fixes/FreeBSD/src/jhs/sys/i386/conf/Makefile
# ~jhs/public_html/src/bsd/fixes/FreeBSD/src/jhs/sys/amd64/conf/Makefile
SYSTEMS = JENERIC \
BLAK \
DESK \
DUAL \
FILM \
FIRE32 \
FIRE64 \
FLAT \
FLIP \
JOHN32 \
JOHN64 \
KING \
LAPA \
LAPD \
LAPH \
LAPL \
LAPN \
LAPO \
LAPR \
LAPS \
LOFT \
MART \
MINI \
PARK \
RAIN \
SCAN \
SLIM \
SNOW \
SONY \
THIN \
TOWER \
WIND
all: links host small diff
links:
-for i in ${SYSTEMS} ; \
do \
if test ! -h $$i.all; then \
ln -s HOLZ $$i.all ; \
fi ; \
done
-ln -s GENERIC GENERIC.host
@# 5.0 has no LINT
host: GENERIC.host
-for i in ${SYSTEMS} ; \
do \
if test ! -e $$i.host; then \
make $$i.host ; \
fi ; \
done
small: GENERIC.small
-for i in ${SYSTEMS} ; \
do \
if test ! -e $$i.small; then \
make $$i.small ; \
fi ; \
done
BLA != cpp --version
.if ${BLA} == 2.95.3
# 4.5-FreeBSD
SMALL = 4
.elif ${BLA} == 2.95.4
# 4.8-FreeBSD & 4.9-RELEASE
SMALL = 4
.else # 3.2.1 embedded in noisy text # FreeBSD 5.0
SMALL = 5
.endif
.if !exists(GENERIC.host) #{
# When I had no /pub/freebsd/ref/`uname -r`/src/ the make broke after linking
# to the non existant file, hence the if !exist.
GENERIC.host:
ln -s -f /pri/FreeBSD/releases/`uname -r`/src/sys/`uname -m`/conf/GENERIC $@
.endif #}
GENERIC.small: GENERIC.host
JENERIC.host BLAK.host DESK.host DUAL.host FILM.host FIRE32.host \
FIRE64.host FLAT.host FLIP.host JOHN32.host JOHN64.host KING.host LAPA.host \
LAPD.host LAPL.host LAPN.host LAPO.host LAPR.host LAPS.host LOFT.host MART.host MINI.host \
PARK.host RAIN.host SCAN.host SLIM.host SNOW.host SONY.host THIN.host \
TOWER.host WIND.host: HOLZ Makefile
JENERIC.small BLAK.small DESK.small DUAL.small FILM.small FIRE32.small \
FIRE64.small FLAT.small FLIP.small JOHN32.small JOHN64.small KING.small LAPA.small \
LAPD.small LAPL.small LAPN.small LAPO.small LAPR.small LAPS.small LOFT.small MART.small \
MINI.small PARK.small RAIN.small SCAN.small SLIM.small SNOW.small SONY.small \
THIN.small TOWER.small WIND.small: Makefile
JENERIC.small: JENERIC.host
BLAK.small: BLAK.host
DESK.small: DESK.host
DUAL.small: DUAL.host
FILM.small: FILM.host
FIRE32.small: FIRE32.host
FIRE64.small: FIRE64.host
FLAT.small: FLAT.host
FLIP.small: FLIP.host
JOHN32.small: JOHN32.host
JOHN64.small: JOHN64.host
KING.small: KING.host
LAPA.small: LAPA.host
LAPD.small: LAPD.host
LAPL.small: LAPL.host
LAPN.small: LAPN.host
LAPO.small: LAPO.host
LAPR.small: LAPR.host
LAPS.small: LAPS.host
LOFT.small: LOFT.host
MART.small: MART.host
MINI.small: MINI.host
PARK.small: PARK.host
RAIN.small: RAIN.host
SCAN.small: SCAN.host
SLIM.small: SLIM.host
SNOW.small: SNOW.host
SONY.small: SONY.host
THIN.small: THIN.host
TOWER.small: TOWER.host
WIND.small: WIND.host
.SUFFIXES: .small .host .all
.all.host:
cpp -P -Wcomment -D`basename ${.TARGET} .host`=1 \
-Djhsarch_`uname -m`=1 \
-Ui386 \
-DREL_`uname -r|sed "s/\./_/g"|sed "s/-/_/g"`=XX ${.IMPSRC} \
| sed "s/^ #/#/" > ${.TARGET}
@# "s/^ #/#/" Not neeeded for 4.8, just for 5.0
@# -Ui386
@# else I get "machine 1" in JENERIC.all instead of "machine 386"
BLURB = Making a reduced version for comparison, assuming cpp on FreeBSD ${SMALL}
.if ${SMALL} == 4
.host.small: # For 4.8
@echo ${BLURB}
@# --field-separator changed to -F as 5.0 has no --field-separator
cat ${.IMPSRC} |\
awk -F \# '{printf "%s\n",$$1}' | \
sed "s/ $$//g" | sed "s/ $$//g" > ${.TARGET}.tmp
notail ${.TARGET}.tmp
notrail ${.TARGET}.tmp
tab -d ${.TARGET}.tmp
tab -e ${.TARGET}.tmp
-grep -v '^$$' ${.TARGET}.tmp > ${.TARGET}
@rm -f ${.TARGET}.tmp
# The grep \[:print:\] is to erase blank lines,
# see man re_format - POSIX 1003.2 regular expressions
# but it also erases a line with just "111 yes"
.else
.host.small: # For 5.0 cpp that reduces tabs to spaces etc
@echo ${BLURB}
@# --field-separator changed to -F as 5.0 has no --field-separator
cat ${.IMPSRC} |\
awk -F \# '{printf "%s\n",$$1}' | \
sed "s/ $$//g" | sed "s/ $$//g" | \
sed "s/ / /g" |\
sed "s/ / /g" |\
sed "s/ / /g" |\
sed "s/ / /g" |\
sed "s/ / /g" \
> ${.TARGET}.tmp
notail ${.TARGET}.tmp
notrail ${.TARGET}.tmp
-grep -v '^$$' ${.TARGET}.tmp > ${.TARGET}
@rm -f ${.TARGET}.tmp
.endif
diff:
@echo "Differences to be hand edited to LN.HOLZ"
-diff -c JENERIC.small GENERIC.small
clean:
-for i in ${SYSTEMS} ; \
do \
rm -f $$i.all $$i.host $$i.small $$i.small.tmp ; \
done
rm -f GENERIC.host GENERIC.small
# in 5.3 This makefile contains a single line:
# .include "${.CURDIR}/../../conf/makeLINT.mk"
# in all of
# alpha/conf/Makefile
# amd64/conf/Makefile
# i386/conf/Makefile
# ia64/conf/Makefile
# pc98/conf/Makefile
# sparc64/conf/Makefile
# Which in turn contains:
# all:
# @echo "make LINT only"
# clean:
# rm -f LINT
# NOTES= ../../conf/NOTES NOTES
# LINT: ${NOTES} ../../conf/makeLINT.sed
# cat ${NOTES} | sed -E -n -f ../../conf/makeLINT.sed > ${.TARGET}