2002-11-08 Andrew Cagney <ac131313@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Sat, 9 Nov 2002 03:14:11 +0000 (03:14 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sat, 9 Nov 2002 03:14:11 +0000 (03:14 +0000)
* Makefile.in (DESTDIR): Define.
(install-only, install-gdbtk, uninstall-gdbtk): Add $(DESTDIR)
prefix.

gdb/ChangeLog
gdb/Makefile.in

index 6852a52fadf28242b23e2d68930666183f178ba4..b87159b6a7743a1af191223d6a2ba002ec465ee5 100644 (file)
@@ -1,5 +1,9 @@
 2002-11-08  Andrew Cagney  <ac131313@redhat.com>
 
+       * Makefile.in (DESTDIR): Define.
+       (install-only, install-gdbtk, uninstall-gdbtk): Add $(DESTDIR)
+       prefix.
+
        * config/djgpp/fnchange.lst: 8.3 proof i386obsd-nat.c and
        i386obsd-tdep.c.  Rename to "gdb.cxx", paths containing "gdb.c++".
 
index da33b76fb6344facd3973b0ef9b2158cccba748b..aa401e47f7ee8e743a1c7752ac3bb035ff4f455b 100644 (file)
@@ -55,6 +55,8 @@ INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 
+DESTDIR =
+
 AR = @AR@
 AR_FLAGS = qv
 RANLIB = @RANLIB@
@@ -922,9 +924,12 @@ install-only: $(CONFIG_INSTALL)
                  true ; \
                fi ; \
                $(srcdir)/../mkinstalldirs $(bindir) ; \
-               $(INSTALL_PROGRAM) gdb$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \
-               $(srcdir)/../mkinstalldirs $(man1dir) ; \
-               $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$transformed_name.1
+               $(INSTALL_PROGRAM) gdb$(EXEEXT) \
+                       $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
+               $(srcdir)/../mkinstalldirs \
+                       $(DESTDIR)$(man1dir) ; \
+               $(INSTALL_DATA) $(srcdir)/gdb.1 \
+                       $(DESTDIR)$(man1dir)/$$transformed_name.1
        @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do 
 
 uninstall: force $(CONFIG_UNINSTALL)
@@ -2355,20 +2360,25 @@ install-gdbtk:
          true ; \
        fi ; \
        $(SHELL) $(srcdir)/../mkinstalldirs $(bindir); \
-       $(INSTALL_PROGRAM) insight$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \
-       $(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY) ; \
-       $(SHELL) $(srcdir)/../mkinstalldirs $(libdir)/insight$(GDBTK_VERSION) ; \
-       $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl $(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \
+       $(INSTALL_PROGRAM) insight$(EXEEXT) \
+               $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
+       $(SHELL) $(srcdir)/../mkinstalldirs \
+               $(DESTDIR)$(GDBTK_LIBRARY) ; \
+       $(SHELL) $(srcdir)/../mkinstalldirs \
+               $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \
+       $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \
+               $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \
+       $(SHELL) $(srcdir)/../mkinstalldirs \
+               $(DESTDIR)$(GDBTK_LIBRARY)/images \
+               $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \
        $(SHELL) $(srcdir)/../mkinstalldirs \
-               $(GDBTK_LIBRARY)/images \
-               $(GDBTK_LIBRARY)/images2 ; \
-       $(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY)/help \
-               $(GDBTK_LIBRARY)/help/images \
-               $(GDBTK_LIBRARY)/help/trace ; \
+               $(DESTDIR)$(GDBTK_LIBRARY)/help \
+               $(DESTDIR)$(GDBTK_LIBRARY)/help/images \
+               $(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \
        cd $(srcdir)/gdbtk/library ; \
        for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html  help/trace/*.html help/trace/index.toc help/images/*.gif; \
          do \
-               $(INSTALL_DATA) $$i $(GDBTK_LIBRARY)/$$i ; \
+               $(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \
          done ;
 
 uninstall-gdbtk:
@@ -2379,8 +2389,8 @@ uninstall-gdbtk:
        else \
                true ; \
        fi ; \
-       rm -f $(bindir)/$$transformed_name$(EXEEXT) ; \
-       rm -rf $(GDBTK_LIBRARY)
+       rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
+       rm -rf $(DESTDIR)$(GDBTK_LIBRARY)
 
 clean-gdbtk:
        rm -f insight$(EXEEXT)