# ~jhs/public_html/src/bsd/jhs/etc/Makefile

all:
	@echo "You might want make distrib-dirs"
	@echo "You might want make install"

distrib-dirs:
	@echo dummy label distrib-dirs
	@# later create delivery directories etc, akin to src/etc/Makefile
	@echo "Consider: make install"

FLAGS=
# FLAGS += -d
# -d    Ignore everything except directory type files.
# This breaks fixing modes of /var/log/lpf_berklix_gdi

FLAGS += -e
# -e    Don't complain about files that are in the file hierarchy, but not
#       in the specification.
#	Also protects from mtree killing a system if DESTDIR=/

FLAGS += -x
#	Don't descend below mount points in the file hierarchy.
#	Might cause problems if /usr/local is mounted.

FLAGS += -U
# -U    Modify the owner, group and permissions of existing files to match
#       the specification and create any missing directories or symbolic
#       links.  User, group and permissions must all be specified for miss-
#       ing directories to be created.  Corrected mismatches are not con-
#       sidered errors.

FLAGS += -L
# -L	Follow all symbolic links in the file hierarchy.

FLAGS += -q
# -q
#	Quiet mode.  Do not complain when a "missing"
#	directory cannot be created because it already exists.
#	This occurs when the directory is a symbolic link.

DESTDIR ?= /

clean:	# nothing to do
install mtree:
	@echo "Installing to ${DESTDIR} from ${.CURDIR}"
	mkdir -p ${DESTDIR}
	cd ${DESTDIR} && mtree ${FLAGS} -f ${.CURDIR}/berklix.mtree
	@# mtree doesnt know how to create these below:
	touch ${DESTDIR}/usr/local/www/data/tmp/xearth_mercator_day.gif
	touch ${DESTDIR}/usr/local/www/data/tmp/xearth_mercator_night.gif
	touch ${DESTDIR}/usr/local/www/data/tmp/xearth_orthographic_day.gif
	touch ${DESTDIR}/usr/local/www/data/tmp/xearth_orthographic_night.gif
	touch ${DESTDIR}/var/log/lpd-errs
	touch ${DESTDIR}/var/log/lpf_berklix ; chmod 664 ${DESTDIR}/var/log/lpf_berklix ; chown daemon:bin  ${DESTDIR}/var/log/lpf_berklix
	touch ${DESTDIR}/var/log/lpf_berklix_gdi ; chmod 664 ${DESTDIR}/var/log/lpf_berklix_gdi ; chown daemon:bin ${DESTDIR}/var/log/lpf_berklix_gdi
	touch /usr/local/bin/lpf_berklix
	touch /usr/local/bin/lpf_berklix_gdi
	cd /usr/local/bin; rm -f lpf_berklix_test; ln -s lpf_berklix lpf_berklix_test
	mkdir -p /var/spool/output/lpd.lpf_berklix
	mkdir -p /var/spool/output/lpd.lpf_berklix_gdi
	install -c \
 ${.CURDIR}/../../../../src/bsd/fixes/FreeBSD/src/jhs/share/mk/berklix*.mk \
 ${DESTDIR}/usr/share/mk/
	install -c ${.CURDIR}/../../../../standards/umlauts.rof \
		${DESTDIR}/usr/share/tmac/
	# JJLATER Maybe cd /usr/share; mv tmac Tmac; ln -s Tmac tmac;
	#	echo "avoid rm by src/ObsoleteFiles.inc"

# /usr/ports/Mk/bsd.port.mk:LOCALBASE?=           ${DESTDIR}/usr/local

obj:

.include <berklix.mk>	# Needed to support recursive make html from above.
