diff options
-rw-r--r-- | share/mk/Makefile | 3 | ||||
-rw-r--r-- | share/mk/bsd.lib.mk | 25 | ||||
-rw-r--r-- | share/mk/bsd.links.mk | 30 | ||||
-rw-r--r-- | share/mk/bsd.prog.mk | 25 |
4 files changed, 34 insertions, 49 deletions
diff --git a/share/mk/Makefile b/share/mk/Makefile index 563bd39..05d0865 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -5,7 +5,8 @@ FILES= bsd.README FILES+= bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.files.mk FILES+= bsd.info.mk bsd.incs.mk bsd.init.mk FILES+= bsd.kern.mk bsd.kmod.mk -FILES+= bsd.lib.mk bsd.libnames.mk bsd.man.mk bsd.nls.mk bsd.obj.mk bsd.own.mk +FILES+= bsd.lib.mk bsd.libnames.mk bsd.links.mk bsd.man.mk bsd.nls.mk +FILES+= bsd.obj.mk bsd.own.mk FILES+= bsd.port.mk bsd.port.post.mk bsd.port.pre.mk bsd.port.subdir.mk FILES+= bsd.prog.mk bsd.subdir.mk bsd.sys.mk FILES+= sys.mk diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 1e1c9ce..9b9c414 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -317,32 +317,9 @@ _libinstall: .endif .endif defined(LIB) && !empty(LIB) && !defined(INTERNALLIB) -realinstall: -.if defined(LINKS) && !empty(LINKS) - @set ${LINKS}; \ - while test $$# -ge 2; do \ - l=${DESTDIR}$$1; \ - shift; \ - t=${DESTDIR}$$1; \ - shift; \ - ${ECHO} $$t -\> $$l; \ - ln -f $$l $$t; \ - done; true -.endif -.if defined(SYMLINKS) && !empty(SYMLINKS) - @set ${SYMLINKS}; \ - while test $$# -ge 2; do \ - l=$$1; \ - shift; \ - t=${DESTDIR}$$1; \ - shift; \ - ${ECHO} $$t -\> $$l; \ - ln -fs $$l $$t; \ - done; true -.endif - .include <bsd.files.mk> .include <bsd.incs.mk> +.include <bsd.links.mk> .if !defined(NOMAN) realinstall: _maninstall diff --git a/share/mk/bsd.links.mk b/share/mk/bsd.links.mk new file mode 100644 index 0000000..a1e84ea --- /dev/null +++ b/share/mk/bsd.links.mk @@ -0,0 +1,30 @@ +# $FreeBSD$ + +.if !target(__<bsd.init.mk>__) +.error bsd.links.mk cannot be included directly. +.endif + +afterinstall: _installlinks +_installlinks: +.if defined(LINKS) && !empty(LINKS) + @set ${LINKS}; \ + while test $$# -ge 2; do \ + l=${DESTDIR}$$1; \ + shift; \ + t=${DESTDIR}$$1; \ + shift; \ + ${ECHO} $$t -\> $$l; \ + ln -f $$l $$t; \ + done; true +.endif +.if defined(SYMLINKS) && !empty(SYMLINKS) + @set ${SYMLINKS}; \ + while test $$# -ge 2; do \ + l=$$1; \ + shift; \ + t=${DESTDIR}$$1; \ + shift; \ + ${ECHO} $$t -\> $$l; \ + ln -fs $$l $$t; \ + done; true +.endif diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 505a5f9..ad44f1a 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -116,30 +116,6 @@ _proginstall: (cd ${DESTDIR}${ORIGBINDIR}; ln -fs dm ${PROG}; \ chown -h ${BINOWN}:${ORIGBINGRP} ${PROG}) .endif - -realinstall: -.if defined(LINKS) && !empty(LINKS) - @set ${LINKS}; \ - while test $$# -ge 2; do \ - l=${DESTDIR}$$1; \ - shift; \ - t=${DESTDIR}$$1; \ - shift; \ - ${ECHO} $$t -\> $$l; \ - ln -f $$l $$t; \ - done; true -.endif -.if defined(SYMLINKS) && !empty(SYMLINKS) - @set ${SYMLINKS}; \ - while test $$# -ge 2; do \ - l=$$1; \ - shift; \ - t=${DESTDIR}$$1; \ - shift; \ - ${ECHO} $$t -\> $$l; \ - ln -fs $$l $$t; \ - done; true -.endif .endif !target(realinstall) .if defined(SCRIPTS) && !empty(SCRIPTS) @@ -171,6 +147,7 @@ _SCRIPTSINS_${script:T}: ${script} .include <bsd.files.mk> .include <bsd.incs.mk> +.include <bsd.links.mk> .if !defined(NOMAN) realinstall: _maninstall |