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
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 18 20:50:13 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Thierry Thomas
>Release:        FreeBSD 6.0-BETA4 i386
>Organization:
Kabbale Eros
>Environment:
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


	
>Description:
	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)
	<http://www.freebsd.org/cgi/query-pr.cgi?pr=77359>.

	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

>How-To-Repeat:
	Build the submitted PR ports/77359 and check wich libtool is used.

>Fix:
	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:: run-autotools-aclocal run-autotools-automake run-autotools-autoconf run-autotools-autoheader
+.endif
+
+.if !target(run-autotools-aclocal)
+run-autotools-aclocal:
 . if defined(AUTOTOOL_aclocal)
 	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL} \
 		${ACLOCAL_ARGS})
 . endif
+.endif
+
+.if !target(run-autotools-automake)
+run-autotools-automake:
 . if defined(AUTOTOOL_automake)
 	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOMAKE} \
 		${AUTOMAKE_ARGS})
 . endif
+.endif
+
+.if !target(run-autotools-autoconf)
+run-autotools-autoconf:
 . if defined(AUTOTOOL_autoconf)
 	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOCONF} \
 		${AUTOCONF_ARGS})
 . endif
+.endif
+
+.if !target(run-autotools-autoheader)
+run-autotools-autoheader:
 . if defined(AUTOTOOL_autoheader)
 	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOHEADER} \
 		${AUTOHEADER_ARGS})
--- bsd.autotools.mk.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list