Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk Implement LNFILES: a list of two word items:



details:   https://anonhg.NetBSD.org/src/rev/ce84a072726b
branches:  trunk
changeset: 551265:ce84a072726b
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Sep 03 05:38:09 2003 +0000

description:
Implement LNFILES: a list of two word items:
        lnsrc lntgt
For each lnsrc item, create a symlink named lntgt.
The lntgt symlinks are removed by the cleandir target.

diffstat:

 share/mk/bsd.README   |   7 ++++++-
 share/mk/bsd.files.mk |  29 ++++++++++++++++++++++++++++-
 2 files changed, 34 insertions(+), 2 deletions(-)

diffs (61 lines):

diff -r a1584ef656c4 -r ce84a072726b share/mk/bsd.README
--- a/share/mk/bsd.README       Wed Sep 03 03:19:04 2003 +0000
+++ b/share/mk/bsd.README       Wed Sep 03 05:38:09 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.README,v 1.134 2003/08/03 09:23:15 lukem Exp $
+#      $NetBSD: bsd.README,v 1.135 2003/09/03 05:38:09 lukem Exp $
 #      @(#)bsd.README  8.2 (Berkeley) 4/2/94
 
 This is the README file for the new make "include" files for the BSD
@@ -442,6 +442,11 @@
 
 FILESNAME.<fn> Optional name to install <fn> as.
 
+LNFILES                List of two word items:
+                       lnsrc lntgt
+               For each lnsrc item, create a symlink named lntgt.
+               The lntgt symlinks are removed by the cleandir target.
+
 
 =-=-=-=-=   bsd.gcc.mk   =-=-=-=-=
 
diff -r a1584ef656c4 -r ce84a072726b share/mk/bsd.files.mk
--- a/share/mk/bsd.files.mk     Wed Sep 03 03:19:04 2003 +0000
+++ b/share/mk/bsd.files.mk     Wed Sep 03 05:38:09 2003 +0000
@@ -1,4 +1,7 @@
-#      $NetBSD: bsd.files.mk,v 1.21 2003/07/18 08:26:06 lukem Exp $
+#      $NetBSD: bsd.files.mk,v 1.22 2003/09/03 05:38:09 lukem Exp $
+
+.if !defined(_BSD_FILES_MK_)
+_BSD_FILES_MK_=1
 
 .include <bsd.init.mk>
 
@@ -49,3 +52,27 @@
 .undef _FDIR
 .undef _FNAME
 .undef _F
+
+
+#
+# LNFILES
+#
+.if defined(LNFILES)                                           # {
+
+.for _SL _TL in ${LNFILES}
+LNFILES.s+=    ${_SL}
+LNFILES.t+=    ${_TL}
+${_TL}: ${_SL}
+       rm -f ${.TARGET}
+       ln -s ${.ALLSRC} ${.TARGET}
+.endfor
+
+realall: ${LNFILES.t}
+
+cleandir: cleanlnfiles
+cleanlnfiles:
+       rm -f ${LNFILES.t}
+
+.endif                                                         # }
+
+.endif # !defined(_BSD_FILES_MK_)



Home | Main Index | Thread Index | Old Index