- 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.)
This commit is contained in:
Pav Lucistnik 2009-05-11 17:35:18 +00:00
parent 5694ed37e0
commit a0f6c077ab
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=233710

View File

@ -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