diff options
author | pav <pav@FreeBSD.org> | 2009-05-12 01:35:18 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2009-05-12 01:35:18 +0800 |
commit | b3d0157d12cbeeeba3a7dd174da6e2dfa0e15944 (patch) | |
tree | d219c93bb9919233eb8501bc3664ad1bf84d3a20 | |
parent | acecad311052119eb8900caa53344aa1d135cc2a (diff) | |
download | freebsd-ports-graphics-b3d0157d12cbeeeba3a7dd174da6e2dfa0e15944.tar.gz freebsd-ports-graphics-b3d0157d12cbeeeba3a7dd174da6e2dfa0e15944.tar.zst freebsd-ports-graphics-b3d0157d12cbeeeba3a7dd174da6e2dfa0e15944.zip |
- Add a code to drop bsd.port.options.mk into /usr/share/mk if it's missing on
the system (typically FreeBSD prior to 6.3). Allows to continue if the write
fails. This should allow us to start using it widely in the ports tree
(please not just yet, wait for a heads-up, in case this change needs to be
backed out.)
-rw-r--r-- | Mk/bsd.port.mk | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 5558ab6cee9..4bd52e0ef5b 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -2816,6 +2816,19 @@ maintainer: .if !target(check-makefile) check-makefile:: +.if !exists(/usr/share/mk/bsd.port.options.mk) + @${ECHO_CMD} "!!! Detected system without bsd.port.options.mk (probably old FreeBSD version)" + @${ECHO_CMD} "!!! Dropping bsd.port.options.mk into /usr/share/mk" + -@${ECHO_CMD} "USEOPTIONSMK= yes" > /usr/share/mk/bsd.port.options.mk 2>/dev/null + -@${ECHO_CMD} "INOPTIONSMK= yes" >> /usr/share/mk/bsd.port.options.mk 2>/dev/null + -@${ECHO_CMD} ".include <bsd.port.mk>" >> /usr/share/mk/bsd.port.options.mk 2>/dev/null + -@${ECHO_CMD} ".undef INOPTIONSMK" >> /usr/share/mk/bsd.port.options.mk 2>/dev/null +.if exists(/usr/share/mk/bsd.port.options.mk) + @${ECHO_CMD} "!!! Done" +.else + @${ECHO_CMD} "!!! Failed" +.endif +.endif @${DO_NADA} .endif |