summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortodd <todd@openbsd.org>2002-01-04 09:34:35 +0000
committertodd <todd@openbsd.org>2002-01-04 09:34:35 +0000
commit2ea7c9938b5e56fc5cf7f3ed95f4c707c0f9da5a (patch)
tree2f464b83c9d3487692e3c5188afba61c02b70812
parentThis is my m4 MAKEDEV generation system. (diff)
downloadwireguard-openbsd-2ea7c9938b5e56fc5cf7f3ed95f4c707c0f9da5a.tar.xz
wireguard-openbsd-2ea7c9938b5e56fc5cf7f3ed95f4c707c0f9da5a.zip
rules to build the MAKEDEV files:
all -> builds 'this' arch (etc.$(uname -m)/MAKEDEV) allarchs -> builds all archs (etc.*/MAKEDEV) clean -> cleans 'this' arch (etc.$(uname -m)/MAKEDEV) cleandirs -> cleans all archs (etc.*/MAKEDEV) also, build the MAKEDEV files during the release process
-rw-r--r--etc/Makefile28
1 files changed, 26 insertions, 2 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 39e2cb80177..a4fdf62cf88 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.135 2001/12/25 01:30:22 deraadt Exp $
+# $OpenBSD: Makefile,v 1.136 2002/01/04 09:34:35 todd Exp $
TZDIR= /usr/share/zoneinfo
LOCALTIME= US/Pacific
@@ -55,7 +55,7 @@ distribution-etc-root-var distribution distrib-dirs release snapshot:
@echo setenv DESTDIR before doing that!
@false
.else
-distribution-etc-root-var: distrib-dirs
+distribution-etc-root-var: distrib-dirs allarchs
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
cat etc.${MACHINE}/ttys ttys.pty > ${DESTDIR}/etc/ttys && \
chown ${BINOWN} ${DESTDIR}/etc/ttys && \
@@ -318,4 +318,28 @@ snap_md:
.endif # DESTDIR check
+MAKEDEVARCHS+=sparc64
+
+all:
+ @make M=${MACHINE} m4
+
+clean:
+ rm -f etc.${MACHINE}/MAKEDEV
+
+cleandir:
+ @cd ${.CURDIR}; for m in ${MAKEDEVARCHS}; do \
+ make MACHINE=$$m clean; done
+
+m4: etc.${M}/MAKEDEV
+
+etc.${M}/MAKEDEV: MAKEDEV.sub MAKEDEV.mi etc.${M}/MAKEDEV.md
+ @echo "==> etc.${M}/MAKEDEV"
+ @m4 -DMACHINE=${M} MAKEDEV.mi > etc.${M}/.MAKEDEV.tmp && \
+ mv etc.${M}/.MAKEDEV.tmp etc.${M}/MAKEDEV || \
+ rm etc.${M}/.MAKEDEV.tmp
+
+allarchs: MAKEDEV.sub MAKEDEV.mi
+ @cd ${.CURDIR}; for m in ${MAKEDEVARCHS}; do \
+ make M=$$m m4; done
+
.include <bsd.prog.mk>