Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] mmalloc Makefile patch
@ 2002-11-24 17:09 Elena Zannoni
  2002-11-25 13:31 ` Andrew Cagney
  2002-11-27 12:12 ` David Carlton
  0 siblings, 2 replies; 5+ messages in thread
From: Elena Zannoni @ 2002-11-24 17:09 UTC (permalink / raw)
  To: gdb-patches


Turns out that the mmalloc.info file sufeered from the same problesm
as the gdb info files.

Elena

2002-11-24  Elena Zannoni  <ezannoni@redhat.com>

	* Makefile.in (INFO_DEPS): Define.
	(all): Add install-info to the rule.
	(info): Unse INFO_DEPS.
	(install-info): Rewrite.
	(uninstall-info): New.
	(uninstall): New.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/mmalloc/Makefile.in,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile.in
--- Makefile.in	17 May 2000 11:45:56 -0000	1.3
+++ Makefile.in	25 Nov 2002 01:07:37 -0000
@@ -64,6 +64,9 @@ MAKEINFO=makeinfo
 
 SET_TEXINPUTS = TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$$TEXINPUTS
 
+# Files which should be generated via 'info' and installed by 'install-info'
+INFO_DEPS = mmalloc.info
+
 # The TeX formatter
 TEX = tex
 
@@ -94,9 +97,9 @@ TARGETOBJS =	mm.o
 
 STAGESTUFF =	$(TARGETLIB) *.o
 
-all:		$(TARGETLIB)
+all:		$(TARGETLIB) install-info
 
-info: mmalloc.info
+info: $(INFO_DEPS)
 dvi: mmalloc.dvi
 clean-info:
 installcheck:
@@ -110,14 +113,41 @@ mmalloc.dvi: mmalloc.texi
 	rm -f mmalloc.?? mmalloc.??s mmalloc.log mmalloc.aux mmalloc.toc
 
 install-info: info
-	$(SHELL) $(srcdir)/../mkinstalldirs $(infodir)
-	if test ! -f mmalloc.info ; then cd $(srcdir); fi; \
-	$(INSTALL_DATA) mmalloc.info $(infodir)/mmalloc.info
+	@list='$(INFO_DEPS)'; \
+	for file in $$list; do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+	    if test -f $$d/$$ifile; then \
+	      echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+	      $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
+	    else : ; fi; \
+	  done; \
+	done
+	$(POST_INSTALL)
 	@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
-	  echo " install-info --info-dir=$(infodir) $(infodir)/mmalloc.info";\
-	  install-info --info-dir=$(infodir) $(infodir)/mmalloc.info || :;\
+	  list='$(INFO_DEPS)'; \
+	  for file in $$list; do \
+	    echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+	    install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+	  done; \
 	else : ; fi
 
+uninstall-info:
+	$(PRE_UNINSTALL)
+	@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+	  ii=yes; \
+	else ii=; fi; \
+	list='$(INFO_DEPS)'; \
+	for file in $$list; do \
+	  test -z "$$ii" \
+	    || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
+	done
+	$(NORMAL_UNINSTALL)
+	list='$(INFO_DEPS)'; \
+	for file in $$list; do \
+	  (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+	done
+
 check: test1.c
 #	$(CC) -g $(srcdir)/test1.c libmmalloc.a
 # This loses for Canadian cross (building mmalloc with a cross-compiler).
@@ -129,6 +159,8 @@ install:	all
 		$(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB)n
 		$(RANLIB) $(libdir)/$(TARGETLIB)n
 		mv -f $(libdir)/$(TARGETLIB)n $(libdir)/$(TARGETLIB)
+
+uninstall:	uninstall-info
 
 $(TARGETLIB):	$(TARGETOBJS)
 		$(RM) -rf $@


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFA] mmalloc Makefile patch
  2002-11-24 17:09 [RFA] mmalloc Makefile patch Elena Zannoni
@ 2002-11-25 13:31 ` Andrew Cagney
  2002-11-26 14:34   ` Elena Zannoni
  2002-11-27 12:12 ` David Carlton
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2002-11-25 13:31 UTC (permalink / raw)
  To: Elena Zannoni; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 106 bytes --]

(Hmm, a host maintainer should be looking for this problem).

I think yes and yes for 5.3 branch.

Andrew

[-- Attachment #2: mailbox-message://ac131313@movemail/fsf/gdb/patches#11269760 --]
[-- Type: message/rfc822, Size: 6213 bytes --]

From: Elena Zannoni <ezannoni@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] mmalloc Makefile patch
Date: Sun, 24 Nov 2002 20:05:13 -0500
Message-ID: <15841.30537.977839.406061@localhost.redhat.com>


Turns out that the mmalloc.info file sufeered from the same problesm
as the gdb info files.

Elena

2002-11-24  Elena Zannoni  <ezannoni@redhat.com>

	* Makefile.in (INFO_DEPS): Define.
	(all): Add install-info to the rule.
	(info): Unse INFO_DEPS.
	(install-info): Rewrite.
	(uninstall-info): New.
	(uninstall): New.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/mmalloc/Makefile.in,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile.in
--- Makefile.in	17 May 2000 11:45:56 -0000	1.3
+++ Makefile.in	25 Nov 2002 01:07:37 -0000
@@ -64,6 +64,9 @@ MAKEINFO=makeinfo
 
 SET_TEXINPUTS = TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$$TEXINPUTS
 
+# Files which should be generated via 'info' and installed by 'install-info'
+INFO_DEPS = mmalloc.info
+
 # The TeX formatter
 TEX = tex
 
@@ -94,9 +97,9 @@ TARGETOBJS =	mm.o
 
 STAGESTUFF =	$(TARGETLIB) *.o
 
-all:		$(TARGETLIB)
+all:		$(TARGETLIB) install-info
 
-info: mmalloc.info
+info: $(INFO_DEPS)
 dvi: mmalloc.dvi
 clean-info:
 installcheck:
@@ -110,14 +113,41 @@ mmalloc.dvi: mmalloc.texi
 	rm -f mmalloc.?? mmalloc.??s mmalloc.log mmalloc.aux mmalloc.toc
 
 install-info: info
-	$(SHELL) $(srcdir)/../mkinstalldirs $(infodir)
-	if test ! -f mmalloc.info ; then cd $(srcdir); fi; \
-	$(INSTALL_DATA) mmalloc.info $(infodir)/mmalloc.info
+	@list='$(INFO_DEPS)'; \
+	for file in $$list; do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+	    if test -f $$d/$$ifile; then \
+	      echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+	      $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
+	    else : ; fi; \
+	  done; \
+	done
+	$(POST_INSTALL)
 	@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
-	  echo " install-info --info-dir=$(infodir) $(infodir)/mmalloc.info";\
-	  install-info --info-dir=$(infodir) $(infodir)/mmalloc.info || :;\
+	  list='$(INFO_DEPS)'; \
+	  for file in $$list; do \
+	    echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+	    install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+	  done; \
 	else : ; fi
 
+uninstall-info:
+	$(PRE_UNINSTALL)
+	@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+	  ii=yes; \
+	else ii=; fi; \
+	list='$(INFO_DEPS)'; \
+	for file in $$list; do \
+	  test -z "$$ii" \
+	    || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
+	done
+	$(NORMAL_UNINSTALL)
+	list='$(INFO_DEPS)'; \
+	for file in $$list; do \
+	  (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
+	done
+
 check: test1.c
 #	$(CC) -g $(srcdir)/test1.c libmmalloc.a
 # This loses for Canadian cross (building mmalloc with a cross-compiler).
@@ -129,6 +159,8 @@ install:	all
 		$(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB)n
 		$(RANLIB) $(libdir)/$(TARGETLIB)n
 		mv -f $(libdir)/$(TARGETLIB)n $(libdir)/$(TARGETLIB)
+
+uninstall:	uninstall-info
 
 $(TARGETLIB):	$(TARGETOBJS)
 		$(RM) -rf $@


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFA] mmalloc Makefile patch
  2002-11-25 13:31 ` Andrew Cagney
@ 2002-11-26 14:34   ` Elena Zannoni
  0 siblings, 0 replies; 5+ messages in thread
From: Elena Zannoni @ 2002-11-26 14:34 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Elena Zannoni, gdb-patches

Andrew Cagney writes:
 > (Hmm, a host maintainer should be looking for this problem).
 > 
 > I think yes and yes for 5.3 branch.
 > 

committed

Elena


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFA] mmalloc Makefile patch
  2002-11-24 17:09 [RFA] mmalloc Makefile patch Elena Zannoni
  2002-11-25 13:31 ` Andrew Cagney
@ 2002-11-27 12:12 ` David Carlton
  2002-11-28  8:48   ` Elena Zannoni
  1 sibling, 1 reply; 5+ messages in thread
From: David Carlton @ 2002-11-27 12:12 UTC (permalink / raw)
  To: Elena Zannoni; +Cc: gdb-patches

On Sun, 24 Nov 2002 20:05:13 -0500, Elena Zannoni <ezannoni@redhat.com> said:

> Turns out that the mmalloc.info file sufeered from the same problesm
> as the gdb info files.

> Elena

> 2002-11-24  Elena Zannoni  <ezannoni@redhat.com>

> 	* Makefile.in (INFO_DEPS): Define.
> 	(all): Add install-info to the rule.

Surely this should go in an 'install' target, not in 'all'?

David Carlton
carlton@math.stanford.edu


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFA] mmalloc Makefile patch
  2002-11-27 12:12 ` David Carlton
@ 2002-11-28  8:48   ` Elena Zannoni
  0 siblings, 0 replies; 5+ messages in thread
From: Elena Zannoni @ 2002-11-28  8:48 UTC (permalink / raw)
  To: David Carlton; +Cc: Elena Zannoni, gdb-patches

David Carlton writes:
 > On Sun, 24 Nov 2002 20:05:13 -0500, Elena Zannoni <ezannoni@redhat.com> said:
 > 
 > > Turns out that the mmalloc.info file sufeered from the same problesm
 > > as the gdb info files.
 > 
 > > Elena
 > 
 > > 2002-11-24  Elena Zannoni  <ezannoni@redhat.com>
 > 
 > > 	* Makefile.in (INFO_DEPS): Define.
 > > 	(all): Add install-info to the rule.
 > 
 > Surely this should go in an 'install' target, not in 'all'?
 > 
 > David Carlton
 > carlton@math.stanford.edu


Oh dear! yes. Not clear what I was thinking.
thanks for catching it.

Here is a patch. Committed to mainline and 5.3 branch.

Elena


2002-11-28  Elena Zannoni  <ezannoni@redhat.com>

	* Makefile.in (install): Move install-info to here...
	(all): ...from here.



Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/mmalloc/Makefile.in,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile.in
--- Makefile.in	26 Nov 2002 22:33:21 -0000	1.4
+++ Makefile.in	28 Nov 2002 16:42:52 -0000
@@ -97,7 +97,7 @@ TARGETOBJS =	mm.o
 
 STAGESTUFF =	$(TARGETLIB) *.o
 
-all:		$(TARGETLIB) install-info
+all:		$(TARGETLIB)
 
 info: $(INFO_DEPS)
 dvi: mmalloc.dvi
@@ -155,7 +155,7 @@ check: test1.c
 # for gdb, perhaps).
 #	./a.out
 
-install:	all
+install:	all install-info
 		$(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB)n
 		$(RANLIB) $(libdir)/$(TARGETLIB)n
 		mv -f $(libdir)/$(TARGETLIB)n $(libdir)/$(TARGETLIB)

 	


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-11-28 16:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-24 17:09 [RFA] mmalloc Makefile patch Elena Zannoni
2002-11-25 13:31 ` Andrew Cagney
2002-11-26 14:34   ` Elena Zannoni
2002-11-27 12:12 ` David Carlton
2002-11-28  8:48   ` Elena Zannoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox