ports/86309: Mk/bsd.autotools.mk: split run-autotools: into sub-targets.

Thierry Thomas thierry at pompo.net
Sun Sep 18 20:50:15 UTC 2005

>Number:         86309
>Category:       ports
>Synopsis:       Mk/bsd.autotools.mk: split run-autotools: into sub-targets.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 18 20:50:13 GMT 2005
>Originator:     Thierry Thomas
>Release:        FreeBSD 6.0-BETA4 i386
Kabbale Eros
System: FreeBSD graf.pompo.net 6.0-BETA4 FreeBSD 6.0-BETA4 #0: Thu Sep 8 19:32:50 CEST 2005 thierry at graf.pompo.net:/usr/obj/usr/src/sys/GRAF050907 i386

	By default, the order of autotools targets is: patch-autotools
	run-autotools; This seems OK with all the ports currently in the
	tree, but there is a problem with a new submitted port:
	please see PR ports/77359 (graphics/gephex)

	Autotools patches old ${WRKSRC}/aclocal.m4 from distribution and
	then executes aclocal, automake and so on. But executing aclocal
	rewrites patched version of aclocal.m4, so we have aclocal.m4
	unpatched again.

	The following patch (seen with aDe and Igor Pokrovsky) allows to
	split the existing run-autotools: into sub-targets, which can be
	overwritten by the port. For example, graphics/gephex could set:

# patch aclocal.m4 after aclocal to use correct libtool
run-autotools: run-autotools-aclocal patch-autotools run-autotools-automake \
	run-autotools-autoconf run-autotools-autoheader

	Build the submitted PR ports/77359 and check wich libtool is used.

	Please apply the following patch:

--- bsd.autotools.mk.diff begins here ---
--- bsd.autotools.mk.orig	Sat Jul  2 09:02:24 2005
+++ bsd.autotools.mk	Tue Sep 13 23:00:36 2005
@@ -324,21 +324,39 @@
 # Part of the configure set - run appropriate programs prior to
 # the actual configure target if autotools are in use
+# If needed, this target could then be overridden, for example to
+# change the order of aclocal / patch-autotools.
 .if !target(run-autotools)
+run-autotools:: run-autotools-aclocal run-autotools-automake run-autotools-autoconf run-autotools-autoheader
+.if !target(run-autotools-aclocal)
 . if defined(AUTOTOOL_aclocal)
 . endif
+.if !target(run-autotools-automake)
 . if defined(AUTOTOOL_automake)
 . endif
+.if !target(run-autotools-autoconf)
 . if defined(AUTOTOOL_autoconf)
 . endif
+.if !target(run-autotools-autoheader)
 . if defined(AUTOTOOL_autoheader)
--- bsd.autotools.mk.diff ends here ---

More information about the freebsd-ports-bugs mailing list