diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1995-12-18 23:45:24 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1995-12-18 23:45:24 +0000 |
commit | 2b1f6f285527e332944cd8a2802f26984978c7a9 (patch) | |
tree | 26fc8811ac7ac80493913ab68ade088c2e0a852d /share/mk | |
parent | 0d76a2c55ae011fcf630a8231a21d35a833728e3 (diff) |
Added support for using a special makefile: Makefile.bsd-wrapper when
available. This will help having imported software in the tree
without needing to munge the standard Makefile.
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.subdir.mk | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 0518d779a9e..553aa8d1958 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -18,9 +18,12 @@ _SUBDIRUSE: .USE else \ _nextdir_="$${_THISDIR_}/$${_newdir_}"; \ fi; \ - echo "===> $${_nextdir_}"; \ + if [ -f $${_nextdir_}/Makefile.bsd-wrapper ]; then \ + _makefile_spec_="-f Makefile.bsd-wrapper"; \ + fi; \ + echo "===> $${_nextdir_}"; \ cd ${.CURDIR}/$${_newdir_}; \ - ${MAKE} _THISDIR_="$${_nextdir_}" \ + ${MAKE} $${_makefile_spec_} _THISDIR_="$${_nextdir_}" \ ${.TARGET:S/realinstall/install/:S/.depend/depend/}); \ done @@ -30,9 +33,12 @@ ${SUBDIR}:: else \ _newdir_=${.TARGET}; \ fi; \ + if [ -f $${_newdir_}/Makefile.bsd-wrapper ]; then \ + _makefile_spec_="-f Makefile.bsd-wrapper"; \ + fi; \ echo "===> $${_newdir_}"; \ cd ${.CURDIR}/$${_newdir_}; \ - ${MAKE} _THISDIR_="$${_newdir_}" all + ${MAKE} $${_makefile_spec_} _THISDIR_="$${_newdir_}" all .endif .if !target(install) |