Bug 66808

Summary: bsd.port.mk: bsd.autotools.mk appears too late
Product: Ports & Packages Reporter: Kimura Fuyuki <fuyuki>
Component: Individual Port(s)Assignee: Ade Lovett <ade>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Kimura Fuyuki 2004-05-18 14:10:18 UTC
If USE_XLIB and USE_LIBTOOL_VER are set and GNU_CONFIGURE is not set
explicitly, GNU_CONFIGURE=yes is not properly implied.

How-To-Repeat: 
---- Makefile
USE_XLIB=yes
USE_LIBTOOL_VER=15
#GNU_CONFIGURE=yes
.include <bsd.port.mk>
----

$ make -V CONFIGURE_ARGS
--prefix=/usr/local i386-portbld-freebsd5.2.1
Comment 1 Kirill Ponomarev freebsd_committer freebsd_triage 2004-05-18 20:40:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

Over to portmgr department
Comment 2 Kris Kennaway freebsd_committer freebsd_triage 2004-05-19 05:06:02 UTC
Responsible Changed
From-To: portmgr->ade

Assign to ade for evaluation.  If it's okay, please kick it back.
Comment 3 Ade Lovett freebsd_committer freebsd_triage 2004-05-19 05:22:13 UTC
Supplied patch is incorrect, since it results in bsd.autotools.mk being 
included twice, with Bad Things[tm] happening as a result.

This will fix the issue until all the current autotools-related 
Makefile knobs are replaced with USE_AUTOTOOLS=..., and 
bsd.autotools.mk can be properly split into -pre and -post chunks.

Index: bsd.port.mk
===================================================================
RCS file: /home/FreeBSD/cvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.488
diff -u -1 -r1.488 bsd.port.mk
--- bsd.port.mk 19 Apr 2004 23:39:52 -0000      1.488
+++ bsd.port.mk 19 May 2004 04:17:14 -0000
@@ -1122,3 +1122,3 @@
  # XXX: (not yet): .if defined(USE_AUTOTOOLS)
-# .include "${PORTSDIR}/Mk/bsd.autotools.mk"
+.include "${PORTSDIR}/Mk/bsd.autotools.mk"
  # XXX: (not yet): .endif
@@ -1514,3 +1507,3 @@
  # XXX: (not yet): .if defined(USE_AUTOTOOLS)
-.include "${PORTSDIR}/Mk/bsd.autotools.mk"
+# .include "${PORTSDIR}/Mk/bsd.autotools.mk"
  # XXX: (not yet): .endif

-aDe
Comment 4 Ade Lovett freebsd_committer freebsd_triage 2004-05-19 05:22:43 UTC
Responsible Changed
From-To: ade->portmgr

Just submitted a more correct patch, punting back to portmgr for 
testing/inclusion.
Comment 5 Kimura Fuyuki 2004-05-19 08:07:37 UTC
At Tue, 18 May 2004 21:22:13 -0700,
Ade Lovett <ade@FreeBSD.org> wrote:
> 
> Supplied patch is incorrect, since it results in bsd.autotools.mk being 
> included twice, with Bad Things[tm] happening as a result.

True, my patch was half-baked. Thanks for the correction.
Comment 6 Kris Kennaway freebsd_committer freebsd_triage 2004-06-06 05:33:14 UTC
State Changed
From-To: open->analyzed

Testing on bento for subsequent commit
Comment 7 Kris Kennaway 2004-06-06 06:08:54 UTC
On Tue, May 18, 2004 at 09:30:32PM -0700, Ade Lovett wrote:
> The following reply was made to PR ports/66808; it has been noted by GNATS.
> 
> From: Ade Lovett <ade@FreeBSD.org>
> To: freebsd-gnats-submit@FreeBSD.org, fuyuki@hadaly.org
> Cc: Kris Kennaway <kris@obsecurity.org>, Ade Lovett <ade@FreeBSD.org>
> Subject: Re: ports/66808: bsd.port.mk: bsd.autotools.mk appears too late
> Date: Tue, 18 May 2004 21:22:13 -0700
> 
>  Supplied patch is incorrect, since it results in bsd.autotools.mk being 
>  included twice, with Bad Things[tm] happening as a result.
>  
>  This will fix the issue until all the current autotools-related 
>  Makefile knobs are replaced with USE_AUTOTOOLS=..., and 
>  bsd.autotools.mk can be properly split into -pre and -post chunks.

This patch also causes duplicate targets, e.g. make index complains:

"Makefile", line 57: warning: duplicate script for target "patch-autotools" ignored
"Makefile", line 60: warning: duplicate script for target "run-autotools" ignored
"Makefile", line 56: warning: duplicate script for target "patch-autotools" ignored 
[..]

Kris
Comment 8 Kris Kennaway freebsd_committer freebsd_triage 2004-06-06 08:14:08 UTC
State Changed
From-To: analyzed->suspended

Suspended awaiting new patch
Comment 9 Ade Lovett freebsd_committer freebsd_triage 2004-06-07 05:09:06 UTC
On Jun 05, 2004, at 22:08, Kris Kennaway wrote:
> This patch also causes duplicate targets, e.g. make index complains:
>
> "Makefile", line 57: warning: duplicate script for target 
> "patch-autotools" ignored
> "Makefile", line 60: warning: duplicate script for target 
> "run-autotools" ignored
> "Makefile", line 56: warning: duplicate script for target 
> "patch-autotools" ignored

Hrm.  Doesn't do that here (and I've been running with the patch for 
quite some considerable time here).

Sounds like either I botched the patch, or something else weird is 
going on.

The patch itself is trivial, simply switching over to use the first 
reference to bsd.autotools.mk in bsd.port.mk, and commenting out the 
second.  Here's the patch again:

Index: bsd.port.mk
===================================================================
RCS file: /local/FreeBSD/cvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.490
diff -u -1 -r1.490 bsd.port.mk
--- bsd.port.mk 31 May 2004 18:07:57 -0000      1.490
+++ bsd.port.mk 31 May 2004 19:19:32 -0000
@@ -1124,3 +1124,3 @@
  # XXX: (not yet): .if defined(USE_AUTOTOOLS)
-# .include "${PORTSDIR}/Mk/bsd.autotools.mk"
+.include "${PORTSDIR}/Mk/bsd.autotools.mk"
  # XXX: (not yet): .endif
@@ -1521,3 +1514,3 @@
  # XXX: (not yet): .if defined(USE_AUTOTOOLS)
-.include "${PORTSDIR}/Mk/bsd.autotools.mk"
+# .include "${PORTSDIR}/Mk/bsd.autotools.mk"
  # XXX: (not yet): .endif

As you can see, it's two trivial changes, uncommenting the first 
bsd.autotools.mk inclusion, and commenting out the second (current) 
bsd.autotools.mk inclusion.

Can't see how this would cause the duplicate targets.

*confused*

-aDe
Comment 10 Ade Lovett freebsd_committer freebsd_triage 2005-06-20 03:32:51 UTC
Responsible Changed
From-To: portmgr->ade

Take this one back from portmgr.  Heavy-duty rework of the autotools 
structure is underway, so use this as one of the many nags to keep 
me working at it.
Comment 11 Ade Lovett freebsd_committer freebsd_triage 2005-11-19 06:10:52 UTC
State Changed
From-To: suspended->closed

Closing this one out, mainly because there's too much bad history here. 

I *do* have a proposed patch which I am currently running through a 
barrage of local tests after recent updates to USE_AUTOTOOLS etc, and 
will be submitting it shortly into the care of portmgr for an -exp run.