Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: Support DESTDIR
@ 2003-07-31 22:09 H. J. Lu
  2003-08-04 14:14 ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: H. J. Lu @ 2003-07-31 22:09 UTC (permalink / raw)
  To: GDB

This patch makes "make DESTDIR=foo" to work.


H.J.
---
gdb/

2003-07-31  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.in (FLAGS_TO_PASS): Add DESTDIR.

gdb/doc/

2003-07-31  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.in (install-info): Support DESTDIR.
	(install-html): Likewise.

gdb/gdbserver/

2003-07-31  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.in (install-only): Support DESTDIR.
	(uninstall): Likewise.

mmalloc/

2003-07-31  H.J. Lu  <hongjiu.lu@intel.com>

	* Makefile.in (top_srcdir): New.
	(mkinstalldirs): New.
	(install-info): Support DESTDIR.
	(install): Likewise.

--- gdb/gdb/Makefile.in.install	2003-07-30 09:43:49.000000000 -0700
+++ gdb/gdb/Makefile.in	2003-07-31 14:59:16.000000000 -0700
@@ -430,6 +430,7 @@ FLAGS_TO_PASS = \
 	"datadir=$(datadir)" \
 	"includedir=$(includedir)" \
 	"against=$(against)" \
+	"DESTDIR=$(DESTDIR)" \
 	"AR=$(AR)" \
 	"AR_FLAGS=$(AR_FLAGS)" \
 	"CC=$(CC)" \
--- gdb/gdb/doc/Makefile.in.install	2003-07-30 09:43:55.000000000 -0700
+++ gdb/gdb/doc/Makefile.in	2003-07-31 15:05:54.000000000 -0700
@@ -155,14 +155,14 @@ all-doc: info dvi ps # pdf
 diststuff: info
 
 install-info: $(INFO_DEPS)
-	$(SHELL) $(srcdir)/../../mkinstalldirs $(infodir)
+	$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)/$(infodir)
 	@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 $(infodir)/$$ifile"; \
-	      $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
+	      echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+	      $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
 	    else : ; fi; \
 	  done; \
 	done
@@ -170,8 +170,8 @@ install-info: $(INFO_DEPS)
 	@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
 	  list='$(INFO_DEPS)'; \
 	  for file in $$list; do \
-	    echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
-	    install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
+	    echo " install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$$file";\
+	    install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
 	  done; \
 	else : ; fi
 
@@ -193,7 +193,7 @@ uninstall-info:
 
 install-html: html
 	for i in *.html ; do \
-		$(INSTALL_DATA) $$i $(htmldir)/$$i ; \
+		$(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i ; \
 	done
 
 STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf
--- gdb/gdb/gdbserver/Makefile.in.install	2003-07-08 13:09:11.000000000 -0700
+++ gdb/gdb/gdbserver/Makefile.in	2003-07-31 14:59:01.000000000 -0700
@@ -151,13 +151,15 @@ install: all install-only
 install-only: 
 	n=`echo gdbserver | sed '$(program_transform_name)'`; \
 	if [ x$$n = x ]; then n=gdbserver; else true; fi; \
-	$(INSTALL_PROGRAM) gdbserver $(bindir)/$$n; \
-	$(INSTALL_DATA) $(srcdir)/gdbserver.1 $(man1dir)/$$n.1
+	$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \
+	$(INSTALL_PROGRAM) gdbserver $(DESTDIR)$(bindir)/$$n; \
+	$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(man1dir); \
+	$(INSTALL_DATA) $(srcdir)/gdbserver.1 $(DESTDIR)$(man1dir)/$$n.1
 
 uninstall: force
 	n=`echo gdbserver | sed '$(program_transform_name)'`; \
 	if [ x$$n = x ]; then n=gdbserver; else true; fi; \
-	rm -f $(bindir)/$$n $(man1dir)/$$n.1
+	rm -f $(bindir)/$$n $(DESTDIR)$(man1dir)/$$n.1
 
 installcheck:
 check:
--- gdb/mmalloc/Makefile.in.install	2002-11-28 08:46:31.000000000 -0800
+++ gdb/mmalloc/Makefile.in	2003-07-31 15:02:28.000000000 -0700
@@ -25,6 +25,7 @@
 
 VPATH = @srcdir@
 srcdir = @srcdir@
+top_srcdir = @top_srcdir@
 
 prefix =	@prefix@
 exec_prefix =	@exec_prefix@
@@ -52,6 +53,8 @@ INSTALL =	@INSTALL@
 INSTALL_PROGRAM=@INSTALL_PROGRAM@
 INSTALL_DATA =	@INSTALL_DATA@
 
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+
 AR =		@AR@
 AR_FLAGS =	qv
 CFLAGS =	-g
@@ -113,6 +116,7 @@ mmalloc.dvi: mmalloc.texi
 	rm -f mmalloc.?? mmalloc.??s mmalloc.log mmalloc.aux mmalloc.toc
 
 install-info: info
+	$(mkinstalldirs) $(DESTDIR)$(infodir)
 	@list='$(INFO_DEPS)'; \
 	for file in $$list; do \
 	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
@@ -156,9 +160,10 @@ check: test1.c
 #	./a.out
 
 install:	all install-info
-		$(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB)n
-		$(RANLIB) $(libdir)/$(TARGETLIB)n
-		mv -f $(libdir)/$(TARGETLIB)n $(libdir)/$(TARGETLIB)
+		$(mkinstalldirs) $(DESTDIR)$(libdir)
+		$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(TARGETLIB)n
+		$(RANLIB) $(DESTDIR)$(libdir)/$(TARGETLIB)n
+		mv -f $(DESTDIR)$(libdir)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(TARGETLIB)
 
 uninstall:	uninstall-info
 


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

end of thread, other threads:[~2003-08-08  2:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-31 22:09 PATCH: Support DESTDIR H. J. Lu
2003-08-04 14:14 ` Andrew Cagney
2003-08-07 22:53   ` H. J. Lu
2003-08-08  2:10     ` Andrew Cagney

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