Subject: bug#12549: closed (Re: bug#12549: 24.2; Makefiles in lwlib and oldXMenu subdirs hardcode ar call)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 06 Oct 2012 00:44:02 +0000

Your bug report

#12549: 24.2; Makefiles in lwlib and oldXMenu subdirs hardcode ar call

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
12549: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12549
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#12549: 24.2; Makefiles in lwlib and oldXMenu subdirs hardcode ar call
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Fri, 05 Oct 2012 20:43:09 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 24.3

OK, applied to trunk. (Did this cause any actual problem?)

Subject: 24.2; Makefiles in lwlib and oldXMenu subdirs hardcode ar call
From: Ulrich Mueller <[email-masked]>
To: [email-masked]
Date: Mon, 1 Oct 2012 15:35:54 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

Forwarding downstream bug: <https://bugs.gentoo.org/show_bug.cgi?id=436758>

The Makefiles in subdirectories lwlib and oldXMenu don't use AR and
ARFLAGS from configure, but hardcode "ar cq":

   ar cq libXMenu11.a Activate.o AddPane.o AddSel.o ChgPane.o ChgSel.o Create.o DelPane.o DelSel.o Destroy.o Error.o EvHand.o FindPane.o FindSel.o InsPane.o InsSel.o Internal.o Locate.o Post.o Recomp.o SetAEQ.o SetFrz.o SetPane.o SetSel.o XDelAssoc.o XLookAssoc.o XCrAssoc.o XDestAssoc.o XMakeAssoc.o insque.o
   x86_64-pc-linux-gnu-ranlib libXMenu11.a

Attached patch should fix it.

--- emacs-orig/lwlib/ChangeLog
+++ emacs/lwlib/ChangeLog
@@ -1,3 +1,7 @@
+2012-10-01  Ulrich Müller  <[email-masked]>
+
+	* Makefile.in (AR, ARFLAGS): Get values from configure.
+
 2012-08-16  Paul Eggert  <[email-masked]>
 
 	Use ASCII tests for character types.
--- emacs-orig/lwlib/Makefile.in
+++ emacs/lwlib/Makefile.in
@@ -37,7 +37,8 @@
 CPPFLAGS=@CPPFLAGS@
 RANLIB=@RANLIB@
 
-AR = ar cq
+AR = @AR@
+ARFLAGS = @ARFLAGS@
 
 LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o
 MOTIF_OBJS = lwlib-Xm.o
@@ -65,7 +66,7 @@
 
 liblw.a: $(OBJS)
 	rm -f $@
-	$(AR) $@ $(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
 	$(RANLIB) $@
 
 ## Generated files in ../src, non-generated in $(srcdir)/../src.
--- emacs-orig/oldXMenu/ChangeLog
+++ emacs/oldXMenu/ChangeLog
@@ -1,3 +1,7 @@
+2012-10-01  Ulrich Müller  <[email-masked]>
+
+	* Makefile.in (AR, ARFLAGS): Get values from configure.
+
 2012-06-26  Paul Eggert  <[email-masked]>
 
 	* Makefile.in (ALL_CFLAGS): Add -I../lib -I${srcdir}/../lib.
--- emacs-orig/oldXMenu/Makefile.in
+++ emacs/oldXMenu/Makefile.in
@@ -57,8 +57,8 @@
 TAGS = etags
 RM = rm -f
 RANLIB = @RANLIB@
-# Solaris 2.1 ar doesn't accept the 'l' option.
-AR = ar cq
+AR = @AR@
+ARFLAGS = @ARFLAGS@
 
 OBJS =  Activate.o \
 	AddPane.o \
@@ -98,7 +98,7 @@
 
 libXMenu11.a: $(OBJS) $(EXTRA)
 	$(RM) $@
-	$(AR) $@ $(OBJS) $(EXTRA)
+	$(AR) $(ARFLAGS) $@ $(OBJS) $(EXTRA)
 	$(RANLIB) $@
 
 Activate.o: Activate.c XMenuInt.h XMenu.h X10.h