summaryrefslogtreecommitdiffstats
path: root/share/examples/Makefile
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-12-09 09:35:36 +0000
committermarcel <marcel@FreeBSD.org>1999-12-09 09:35:36 +0000
commit78dcb3a4bcf2f27f6bb93edb5bf282b8943fed56 (patch)
tree9f79e2c38a4300bea7c9890dbdaa0774a5c69f82 /share/examples/Makefile
parentd2ada32bc048622b4dfbb5b651af0154b4821486 (diff)
downloadFreeBSD-src-78dcb3a4bcf2f27f6bb93edb5bf282b8943fed56.zip
FreeBSD-src-78dcb3a4bcf2f27f6bb93edb5bf282b8943fed56.tar.gz
Revert previous commit.
Requested by: bde
Diffstat (limited to 'share/examples/Makefile')
-rw-r--r--share/examples/Makefile18
1 files changed, 16 insertions, 2 deletions
diff --git a/share/examples/Makefile b/share/examples/Makefile
index 1e07279..3591fc6 100644
--- a/share/examples/Makefile
+++ b/share/examples/Makefile
@@ -8,10 +8,14 @@ DDIR= ${DESTDIR}/usr/share/examples
NOOBJ= noobj
+# Define SHARED to indicate whether you want symbolic links to the system
+# source (``symlinks''), or a separate copy (``copies''); (latter useful
+# in environments where it's not possible to keep /sys publicly readable)
+SHARED?= copies
+
all clean cleandir depend lint tags:
-beforeinstall: copies
- (cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
+beforeinstall: etc-examples ${SHARED}
.for dir in ${DIRS}
FILES!= find -L ${dir} \( -name CVS -prune \) -o -type f -print
@@ -21,4 +25,14 @@ copies::
.endfor
.endfor
+.for dir in ${DIRS}
+symlinks::
+ rm -rf ${DDIR}/${dir}; ln -s ${.CURDIR}/${dir} ${DDIR}
+.endfor
+
+etc-examples:
+.if ${SHARED} != "symlinks"
+ (cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
+.endif
+
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud