From 78dcb3a4bcf2f27f6bb93edb5bf282b8943fed56 Mon Sep 17 00:00:00 2001 From: marcel Date: Thu, 9 Dec 1999 09:35:36 +0000 Subject: Revert previous commit. Requested by: bde --- share/examples/Makefile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'share/examples/Makefile') 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 -- cgit v1.1