[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposal: deprecate scripts/pre-*
no objections here, majority of the time the scripts that are used could
be quite easily integrated into the Makefile anyway.
// Brad
brad@comstyle.com
bsmith@bfmni.com
brad@openbsd.org
>There currently is an infrastructure in bsd.port.mk to allow
>running pre-* and post-* scripts, for fetch, patch, configure...
>
>This infrastructure is actually redundant: we have the pre-*
>targets in the Makefile proper, and if a specific port wants a
>script living outside the Makefile, there is nothing that prevents
>doing:
>
>pre-foo:
> ${SH} ${SCRIPTDIR}/pre-foo
>
>(or whatever).
>
>
>There is one good reason to want to kill it though: efficiency.
>
>Currently, the real-xxx targets go through a _PORT_USE macro that
>triggers new makes for pre-xxx, do-xxx, post-xxx.
>
>With those scripts gone, real-xxx does not really need that macro
>any longer:
>
>real-xxx:
>.if target(pre-xxx)
> @cd ${.CURDIR} && make pre-xxx
>.endif
>.if !target(do-xxx)
># fold here the contents of the separate do-xxx target
>.fi
>.if target(post-xxx)
> @cd ${.CURDIR} && make post-xxx
>.fi
>
>On average, most ports use the common case targets, and thus would not
>need quite a few separate targets, plus not having to start off three makes
>for each stage of the build.
>
>Opinion ? IMHO, the price for removing this is only some veeeery small
>tweaking work when adapting ports from FreeBSD/NetBSD, in exchange for
>some simplicity.