Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: GDB <gdb-patches@sources.redhat.com>
Subject: PATCH: Support DESTDIR
Date: Thu, 31 Jul 2003 22:09:00 -0000	[thread overview]
Message-ID: <20030731220953.GA18365@lucon.org> (raw)

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
 


             reply	other threads:[~2003-07-31 22:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-31 22:09 H. J. Lu [this message]
2003-08-04 14:14 ` Andrew Cagney
2003-08-07 22:53   ` H. J. Lu
2003-08-08  2:10     ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030731220953.GA18365@lucon.org \
    --to=hjl@lucon.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox