summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2001-12-17 13:59:35 +0000
committerru <ru@FreeBSD.org>2001-12-17 13:59:35 +0000
commitbbef88e1a5535074053d60fa0fa2b5832f7de5ea (patch)
tree7fd7e5683e347709f8bd623688bd94074689c72a /share
parent650091c3142d295b29e3809e946f4d064cc805a4 (diff)
downloadFreeBSD-src-bbef88e1a5535074053d60fa0fa2b5832f7de5ea.zip
FreeBSD-src-bbef88e1a5535074053d60fa0fa2b5832f7de5ea.tar.gz
FILES support for bsd.prog.mk. See bsd.README for details.
Stolen from: NetBSD
Diffstat (limited to 'share')
-rw-r--r--share/dict/Makefile12
-rw-r--r--share/doc/IPv6/Makefile13
-rw-r--r--share/examples/ipfilter/Makefile12
-rw-r--r--share/isdn/Makefile12
-rw-r--r--share/me/Makefile23
-rw-r--r--share/misc/Makefile7
-rw-r--r--share/mk/Makefile3
-rw-r--r--share/mk/bsd.README5
-rw-r--r--share/mk/bsd.prog.mk37
-rw-r--r--share/tabset/Makefile13
-rw-r--r--share/termcap/Makefile14
11 files changed, 70 insertions, 81 deletions
diff --git a/share/dict/Makefile b/share/dict/Makefile
index 399e409..9d756c7 100644
--- a/share/dict/Makefile
+++ b/share/dict/Makefile
@@ -1,13 +1,11 @@
# @(#)Makefile 8.1 (Berkeley) 6/5/93
# $FreeBSD$
-# XXX MISSING: connectives words
-FILES= README propernames web2 web2a
-SYMLINKS= web2 ${BINDIR}/dict/words
-NOOBJ= noobj
+NOOBJ= noobj
-beforeinstall:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${SHAREMODE} ${FILES} \
- ${DESTDIR}${BINDIR}/dict
+# XXX MISSING: connectives words
+FILES= README propernames web2 web2a
+FILESDIR= ${BINDIR}/dict
+SYMLINKS= web2 ${FILESDIR}/words
.include <bsd.prog.mk>
diff --git a/share/doc/IPv6/Makefile b/share/doc/IPv6/Makefile
index 556fe45..4e4f34f 100644
--- a/share/doc/IPv6/Makefile
+++ b/share/doc/IPv6/Makefile
@@ -1,14 +1,7 @@
# $FreeBSD$
-FILES= IMPLEMENTATION
-
-DOCDIR = ${SHAREDIR}/doc/IPv6
-
-NOMAN = noman
-NOOBJ = noobj
-
-install:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${SHAREMODE} ${FILES} \
- ${DESTDIR}${DOCDIR}
+NOOBJ= noobj
+FILES= IMPLEMENTATION
+FILESDIR= ${SHAREDIR}/doc/IPv6
.include <bsd.prog.mk>
diff --git a/share/examples/ipfilter/Makefile b/share/examples/ipfilter/Makefile
index 01a0873..5ddabd3 100644
--- a/share/examples/ipfilter/Makefile
+++ b/share/examples/ipfilter/Makefile
@@ -1,12 +1,12 @@
# $FreeBSD$
NOOBJ= noobj
-BINDIR= /usr/share/examples
FILES= README
# dist sample files
-DISTFILES= BASIC.NAT BASIC_1.FW BASIC_2.FW \
+.PATH: ${.CURDIR}/../../../contrib/ipfilter/rules
+FILES+= BASIC.NAT BASIC_1.FW BASIC_2.FW \
example.1 example.2 example.3 example.4 example.5 \
example.6 example.7 example.8 example.9 example.10 \
example.11 example.12 example.13 example.sr firewall \
@@ -23,12 +23,6 @@ FILES+= ipf-howto.txt
# http://coombs.anu.edu.au/~avalon/ sample files
FILES+= examples.txt rules.txt
-beforeinstall:
- cd ${.CURDIR}/../../../contrib/ipfilter/rules; \
- ${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
- ${DISTFILES} ${DESTDIR}${BINDIR}/ipfilter
- cd ${.CURDIR}; \
- ${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
- ${FILES} ${DESTDIR}${BINDIR}/ipfilter
+FILESDIR= ${SHAREDIR}/examples/ipfilter
.include <bsd.prog.mk>
diff --git a/share/isdn/Makefile b/share/isdn/Makefile
index 99025d8..0999d77 100644
--- a/share/isdn/Makefile
+++ b/share/isdn/Makefile
@@ -5,15 +5,11 @@ FILES= 0.al 1.al 2.al 3.al 4.al 5.al 6.al 7.al 8.al 9.al beep.al msg.al
CLEANFILES+= ${FILES}
-all: ${FILES}
+.SUFFIXES: .uu
-${FILES}:
- uudecode < ${.CURDIR}/${.TARGET}.uu
+.uu:
+ uudecode < ${.IMPSRC}
-depend lint tags:
-
-install:
- ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${SHAREMODE} ${FILES} \
- ${DESTDIR}${BINDIR}/isdn
+FILESDIR= ${BINDIR}/isdn
.include <bsd.prog.mk>
diff --git a/share/me/Makefile b/share/me/Makefile
index 5dc1b06..10f99219 100644
--- a/share/me/Makefile
+++ b/share/me/Makefile
@@ -7,29 +7,24 @@ MESRCS= acm.me chars.me deltext.me eqn.me float.me footnote.me \
index.me letterhead.me local.me null.me refer.me sh.me \
tbl.me thesis.me
TMSRCS= tmac.orig_me
-FILES= ${MESRCS} ${TMSRCS}
-CLEANFILES+= ${FILES:S/$/.tmp/}
+FILES= ${MESRCS:S/$/.tmp/} ${TMSRCS:S/$/.tmp/} revisions
+CLEANFILES+= ${MESRCS:S/$/.tmp/} ${TMSRCS:S/$/.tmp/}
# XXX use groff version
# MAN= me.7
-all: ${FILES:S/$/.tmp/}
-
-.for file in ${FILES}
+.for file in ${MESRCS} ${TMSRCS}
${file}.tmp: ${file}
sed -f ${.CURDIR}/strip.sed < ${.ALLSRC} > ${.TARGET}
.endfor
-beforeinstall:
-.for file in ${MESRCS}
- ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
- ${file}.tmp ${DESTDIR}${MELIB}/${file}
+.for file in ${MESRCS:S/$/.tmp/} revisions
+FILESDIR_${file}= ${MELIB}
+FILESNAME_${file}= ${file:R}
.endfor
-.for file in ${TMSRCS}
- ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
- ${file}.tmp ${DESTDIR}${TMLIB}/${file}
+.for file in ${TMSRCS:S/$/.tmp/}
+FILESDIR_${file}= ${TMLIB}
+FILESNAME_${file}= ${file:R}
.endfor
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
- ${.CURDIR}/revisions ${DESTDIR}${MELIB}/
.include <bsd.prog.mk>
diff --git a/share/misc/Makefile b/share/misc/Makefile
index 6896666..0e1c753 100644
--- a/share/misc/Makefile
+++ b/share/misc/Makefile
@@ -5,11 +5,6 @@ FILES= ascii birthtoken bsd-family-tree eqnchar flowers init.ee \
iso3166 iso639 man.template mdoc.template operator pci_vendors \
scsi_modes usb_hid_usages
NOOBJ= noobj
-
-all clean cleandir depend lint tags:
-
-install:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${SHAREMODE} \
- ${FILES} ${DESTDIR}${BINDIR}/misc
+FILESDIR= ${BINDIR}/misc
.include <bsd.prog.mk>
diff --git a/share/mk/Makefile b/share/mk/Makefile
index e63005c..1c17e9a 100644
--- a/share/mk/Makefile
+++ b/share/mk/Makefile
@@ -8,10 +8,9 @@ FILES+= bsd.port.mk bsd.port.post.mk bsd.port.pre.mk bsd.port.subdir.mk
FILES+= bsd.prog.mk bsd.sgml.mk bsd.subdir.mk bsd.sys.mk
FILES+= sys.mk
NOOBJ= noobj
+FILESDIR= ${BINDIR}/mk
beforeinstall:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${SHAREMODE} ${FILES} \
- ${DESTDIR}${BINDIR}/mk
date '+%Y%m%d' > ${DESTDIR}/var/db/port.mkversion
.include <bsd.prog.mk>
diff --git a/share/mk/bsd.README b/share/mk/bsd.README
index 031d470..9a7140e 100644
--- a/share/mk/bsd.README
+++ b/share/mk/bsd.README
@@ -196,6 +196,11 @@ CLEANDIRS additional directories to remove during clean and cleandir
COPTS Additional flags to the compiler when creating C objects.
+FILES A list of non-executable files.
+ The installation is controlled by the FILESNAME, FILESOWN,
+ FILESGRP, FILESMODE, FILESDIR variables that can be
+ further specialized by FILES<VAR>_<file>.
+
HIDEGAME If HIDEGAME is defined, the binary is installed in
/usr/games/hide, and a symbolic link is created to
/usr/games/dm.
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 670f5a2b..31b3855 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -67,11 +67,11 @@ MAN1= ${MAN}
.endif
.MAIN: all
+all: objwarn ${PROG} ${SCRIPTS} ${FILES}
.if !defined(NOMAN)
-all: objwarn ${PROG} ${SCRIPTS} all-man _SUBDIR
-.else
-all: objwarn ${PROG} ${SCRIPTS} _SUBDIR
+all: all-man
.endif
+all: _SUBDIR
CLEANFILES+= ${PROG} ${OBJS}
@@ -150,8 +150,8 @@ SCRIPTSDIR_${script:T}?= ${SCRIPTSDIR}
SCRIPTSOWN_${script:T}?= ${SCRIPTSOWN}
SCRIPTSGRP_${script:T}?= ${SCRIPTSGRP}
SCRIPTSMODE_${script:T}?= ${SCRIPTSMODE}
-_scriptsinstall: SCRIPTSINS_${script:T}
-SCRIPTSINS_${script:T}: ${script}
+_scriptsinstall: _SCRIPTSINS_${script:T}
+_SCRIPTSINS_${script:T}: ${script}
${INSTALL} ${COPY} -o ${SCRIPTSOWN_${.ALLSRC:T}} \
-g ${SCRIPTSGRP_${.ALLSRC:T}} -m ${SCRIPTSMODE_${.ALLSRC:T}} \
${_INSTALLFLAGS} ${.ALLSRC} \
@@ -159,6 +159,33 @@ SCRIPTSINS_${script:T}: ${script}
.endfor
.endif
+.if defined(FILES) && !empty(FILES)
+realinstall: _filesinstall
+
+FILESDIR?= ${BINDIR}
+FILESOWN?= ${SHAREOWN}
+FILESGRP?= ${SHAREGRP}
+FILESMODE?= ${SHAREMODE}
+
+.for file in ${FILES}
+.if defined(FILESNAME)
+FILESNAME_${file:T}?= ${FILESNAME}
+.else
+FILESNAME_${file:T}?= ${file:T}
+.endif
+FILESDIR_${file:T}?= ${FILESDIR}
+FILESOWN_${file:T}?= ${FILESOWN}
+FILESGRP_${file:T}?= ${FILESGRP}
+FILESMODE_${file:T}?= ${FILESMODE}
+_filesinstall: _FILESINS_${file:T}
+_FILESINS_${file:T}: ${file}
+ ${INSTALL} ${COPY} -o ${FILESOWN_${.ALLSRC:T}} \
+ -g ${FILESGRP_${.ALLSRC:T}} -m ${FILESMODE_${.ALLSRC:T}} \
+ ${_INSTALLFLAGS} ${.ALLSRC} \
+ ${DESTDIR}${FILESDIR_${.ALLSRC:T}}/${FILESNAME_${.ALLSRC:T}}
+.endfor
+.endif
+
install: afterinstall _SUBDIR
.if !defined(NOMAN)
afterinstall: realinstall maninstall
diff --git a/share/tabset/Makefile b/share/tabset/Makefile
index 937f16b..846ef46 100644
--- a/share/tabset/Makefile
+++ b/share/tabset/Makefile
@@ -7,15 +7,10 @@ FILES= 3101 9837 aa aed512 beehive diablo dtc382 hp700-wy ibm3101 std \
CLEANFILES+= ${FILES}
-all: ${FILES}
+.SUFFIXES: .uu
+.uu:
+ uudecode < ${.IMPSRC}
-${FILES}:
- uudecode < ${.CURDIR}/${.TARGET}.uu
-
-depend lint tags:
-
-install:
- ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${SHAREMODE} ${FILES} \
- ${DESTDIR}${BINDIR}/tabset
+FILESDIR= ${BINDIR}/tabset
.include <bsd.prog.mk>
diff --git a/share/termcap/Makefile b/share/termcap/Makefile
index 07733ea..8dfff0e 100644
--- a/share/termcap/Makefile
+++ b/share/termcap/Makefile
@@ -7,10 +7,9 @@
#
MAN= termcap.5
+FILES= map3270 termcap termcap.db
+FILESDIR= ${BINDIR}/misc
CLEANFILES+= termcap termcap.db
-FILES= termcap termcap.db
-
-all: termcap termcap.db
termcap: reorder termcap.src
TERM=dumb ex - ${.CURDIR}/termcap.src < ${.CURDIR}/reorder
@@ -18,14 +17,7 @@ termcap: reorder termcap.src
termcap.db: termcap
cap_mkdb termcap
-beforeinstall:
- ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${SHAREMODE} \
- ${FILES} ${DESTDIR}${BINDIR}/misc
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${SHAREMODE} \
- ${.CURDIR}/map3270 ${DESTDIR}${BINDIR}/misc
-
etc-termcap:
- rm -f ${DESTDIR}/etc/termcap
- ln -s ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap
+ ln -fs ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud