From sean@farley.org  Fri Nov 18 18:49:32 2005
Return-Path: <sean@farley.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id CC4FA16A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Nov 2005 18:49:32 +0000 (GMT)
	(envelope-from sean@farley.org)
Received: from mail.farley.org (farley.org [67.64.95.201])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4788C43D46
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Nov 2005 18:49:32 +0000 (GMT)
	(envelope-from sean@farley.org)
Received: from thor.farley.org (thor.farley.org [IPv6:2001:470:1f01:290:1::5])
	by mail.farley.org (8.13.1/8.13.1) with ESMTP id jAIInT0m099531
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Nov 2005 12:49:30 -0600 (CST)
	(envelope-from sean@gw.farley.org)
Received: from thor.farley.org (localhost [127.0.0.1])
	by thor.farley.org (8.13.4/8.13.4) with ESMTP id jAIIovqo090261
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Nov 2005 12:50:57 -0600 (CST)
	(envelope-from sean@thor.farley.org)
Received: (from sean@localhost)
	by thor.farley.org (8.13.4/8.13.4/Submit) id jAIIoui4090260;
	Fri, 18 Nov 2005 12:50:56 -0600 (CST)
	(envelope-from sean)
Message-Id: <200511181850.jAIIoui4090260@thor.farley.org>
Date: Fri, 18 Nov 2005 12:50:56 -0600 (CST)
From: Sen Farley <sean-freebsd@farley.org>
Reply-To: Sen Farley <sean-freebsd@farley.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: autoheader run in wrong order in run-autotools rule
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         89248
>Category:       ports
>Synopsis:       [patch] autoheader run in wrong order in run-autotools rule
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ade
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 18 18:50:26 GMT 2005
>Closed-Date:    Mon Dec 05 22:40:01 GMT 2005
>Last-Modified:  Mon Dec 05 22:40:01 GMT 2005
>Originator:     Sen Farley
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD thor.farley.org 6.0-STABLE FreeBSD 6.0-STABLE #1: Thu Nov 17 14:07:35 CST 2005 root@thor.farley.org:/usr/obj/usr/src/sys/THOR i386

>Description:
Within the run-autotools rule in ports, autoheader is run after automake
and autoconf.  If a port needs to run all four auto* tools, then it will
(at least for me) fail.

>How-To-Repeat:
Run make configure on a port that only has a configure.ac and
Makefile.am.  The output I get:

configure.ac: installing `./install-sh'
configure.ac: installing `./missing'
common/b5c/Makefile.am: installing `./depcomp'
configure.ac:20: installing `./config.guess'
configure.ac:20: installing `./config.sub'
configure.ac:4: required file `config.h.in' not found

autoheader is the one creating the config.h.in.

>Fix:

Just place autoheader before automake in the run-autotools rule.

------------------------------------------
--- bsd.autotools.mk.orig	Fri Nov 18 12:36:20 2005
+++ bsd.autotools.mk	Fri Nov 18 12:36:20 2005
@@ -331,6 +331,10 @@
 	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL} \
 		${ACLOCAL_ARGS})
 . endif
+. if defined(AUTOTOOL_autoheader)
+	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOHEADER} \
+		${AUTOHEADER_ARGS})
+. endif
 . if defined(AUTOTOOL_automake)
 	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOMAKE} \
 		${AUTOMAKE_ARGS})
@@ -338,10 +342,6 @@
 . if defined(AUTOTOOL_autoconf)
 	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOCONF} \
 		${AUTOCONF_ARGS})
-. endif
-. if defined(AUTOTOOL_autoheader)
-	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOHEADER} \
-		${AUTOHEADER_ARGS})
 . endif
 .endif
 
------------------------------------------
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ade 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Nov 18 21:59:16 GMT 2005 
Responsible-Changed-Why:  
Over to maintainer for evaluation. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=89248 
State-Changed-From-To: open->feedback 
State-Changed-By: ade 
State-Changed-When: Fri Nov 18 23:22:28 GMT 2005 
State-Changed-Why:  
ports/86309 (just committed), expands on the run-autotools target to 
allow the order to be overridden.  Can you see if this helps. 

I'm certainly willing to consider changing the default order as you 
have suggested, but that would require a full -exp run to verify there's 
no collatoral damage. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=89248 
State-Changed-From-To: feedback->closed 
State-Changed-By: ade 
State-Changed-When: Mon Dec 5 22:39:44 GMT 2005 
State-Changed-Why:  
Superseded by 89999 

http://www.freebsd.org/cgi/query-pr.cgi?pr=89248 
>Unformatted:
