From d3d8a9ee198a0922001c0bbd1e4b966fd1c5e15b Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 7 May 2002 17:22:20 +0000 Subject: [PATCH] Honour DESTDIR --- ChangeLog | 4 ++++ Makefile.in | 4 ++-- binutils/ChangeLog | 5 +++++ binutils/Makefile.am | 12 ++++++------ binutils/Makefile.in | 14 +++++++------- gas/ChangeLog | 5 +++++ gas/Makefile.am | 12 ++++++------ gas/Makefile.in | 14 +++++++------- ld/ChangeLog | 5 +++++ ld/Makefile.am | 14 +++++++------- ld/Makefile.in | 14 +++++++------- 11 files changed, 61 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a200af..03be900 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-05-07 Federico G. Schwindt + + * Makefile.in: Honour DESTDIR. + 2002-05-05 Alexandre Oliva * configure.in (noconfigdirs): Don't disable libgcj on diff --git a/Makefile.in b/Makefile.in index 70bf102..12a69d3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1826,8 +1826,8 @@ install-sid: install-tcl install-tk ### other supporting targets MAKEDIRS= \ - $(prefix) \ - $(exec_prefix) + $(DESTDIR)$(prefix) \ + $(DESTDIR)$(exec_prefix) .PHONY: installdirs installdirs: mkinstalldirs $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2c2b537..0431134 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2002-05-07 Federico G. Schwindt + + * Makefile.am: Honour DESTDIR. + * Makefile.in: Regenerate. + 2002-05-06 Alan Modra * dlltool.c (process_def_file): Add missing prototype. diff --git a/binutils/Makefile.am b/binutils/Makefile.am index 09d9a24..8246d42 100644 --- a/binutils/Makefile.am +++ b/binutils/Makefile.am @@ -348,18 +348,18 @@ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS) @list='$(noinst_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done - $(mkinstalldirs) $(tooldir)/bin + $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin for i in $(TOOL_PROGS); do \ if [ -f $$i$(EXEEXT) ]; then \ j=`echo $$i | sed -e 's/-new//'`; \ k=`echo $$j | sed '$(transform)'`; \ - if [ "$(bindir)/$$k$(EXEEXT)" != "$(tooldir)/bin/$$j$(EXEEXT)" ]; then \ - rm -f $(tooldir)/bin/$$j$(EXEEXT); \ - ln $(bindir)/$$k$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \ - || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT); \ + if [ "$(DESTDIR)$(bindir)/$$k$(EXEEXT)" != "$(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT)" ]; then \ + rm -f $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \ + ln $(DESTDIR)$(bindir)/$$k$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \ + || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \ fi; \ else true; \ fi; \ diff --git a/binutils/Makefile.in b/binutils/Makefile.in index bec4a3f..f2518af 100644 --- a/binutils/Makefile.in +++ b/binutils/Makefile.in @@ -435,7 +435,7 @@ configure.in deflex.c defparse.c nlmheader.c rclex.c rcparse.c DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(nlmconv_SOURCES) $(srconv_SOURCES) $(sysdump_SOURCES) $(coffdump_SOURCES) $(dlltool_SOURCES) $(windres_SOURCES) $(dllwrap_SOURCES) $(size_SOURCES) $(objdump_SOURCES) $(ar_SOURCES) $(strings_SOURCES) $(ranlib_SOURCES) $(objcopy_SOURCES) $(addr2line_SOURCES) $(readelf_SOURCES) $(nm_new_SOURCES) $(strip_new_SOURCES) $(cxxfilt_SOURCES) OBJECTS = $(nlmconv_OBJECTS) $(srconv_OBJECTS) $(sysdump_OBJECTS) $(coffdump_OBJECTS) $(dlltool_OBJECTS) $(windres_OBJECTS) $(dllwrap_OBJECTS) $(size_OBJECTS) $(objdump_OBJECTS) $(ar_OBJECTS) $(strings_OBJECTS) $(ranlib_OBJECTS) $(objcopy_OBJECTS) $(addr2line_OBJECTS) $(readelf_OBJECTS) $(nm_new_OBJECTS) $(strip_new_OBJECTS) $(cxxfilt_OBJECTS) @@ -1074,18 +1074,18 @@ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS) @list='$(noinst_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done - $(mkinstalldirs) $(tooldir)/bin + $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin for i in $(TOOL_PROGS); do \ if [ -f $$i$(EXEEXT) ]; then \ j=`echo $$i | sed -e 's/-new//'`; \ k=`echo $$j | sed '$(transform)'`; \ - if [ "$(bindir)/$$k$(EXEEXT)" != "$(tooldir)/bin/$$j$(EXEEXT)" ]; then \ - rm -f $(tooldir)/bin/$$j$(EXEEXT); \ - ln $(bindir)/$$k$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \ - || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT); \ + if [ "$(DESTDIR)$(bindir)/$$k$(EXEEXT)" != "$(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT)" ]; then \ + rm -f $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \ + ln $(DESTDIR)$(bindir)/$$k$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \ + || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \ fi; \ else true; \ fi; \ diff --git a/gas/ChangeLog b/gas/ChangeLog index edc648e..ae3ea08 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2002-05-07 Federico G. Schwindt + + * Makefile.am: Honour DESTDIR. + * Makefile.in: Regenerate. + 2002-05-06 Kazu Hirata * config/tc-ia64.c: Fix formatting. diff --git a/gas/Makefile.am b/gas/Makefile.am index d4d0732..5c539c3 100644 --- a/gas/Makefile.am +++ b/gas/Makefile.am @@ -668,21 +668,21 @@ CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2A DEP1 DEPA DEP DEPDIR install-exec-local: install-exec-bindir @install_tooldir@ install-exec-bindir: $(noinst_PROGRAMS) - $(mkinstalldirs) $(bindir) + $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(noinst_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS) - $(mkinstalldirs) $(tooldir)/bin + $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin n=`echo as | sed '$(transform)'`; \ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \ - rm -f $(tooldir)/bin/as$(EXEEXT); \ - ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \ - || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT); \ + rm -f $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \ + ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \ + || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \ else \ true ; \ fi diff --git a/gas/Makefile.in b/gas/Makefile.in index f7cf9c2..b7b9b64 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -2307,7 +2307,7 @@ configure configure.in gdbinit.in itbl-lex.c itbl-parse.c DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(gasp_new_SOURCES) $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) OBJECTS = $(gasp_new_OBJECTS) $(itbl_test_OBJECTS) $(as_new_OBJECTS) @@ -2851,21 +2851,21 @@ cgen.o: cgen.c cgen.h cgen-desc.h subsegs.h \ install-exec-local: install-exec-bindir @install_tooldir@ install-exec-bindir: $(noinst_PROGRAMS) - $(mkinstalldirs) $(bindir) + $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(noinst_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS) - $(mkinstalldirs) $(tooldir)/bin + $(mkinstalldirs) $(DESTDIR)$(tooldir)/bin n=`echo as | sed '$(transform)'`; \ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \ - rm -f $(tooldir)/bin/as$(EXEEXT); \ - ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \ - || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT); \ + rm -f $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \ + ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \ + || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/as$(EXEEXT); \ else \ true ; \ fi diff --git a/ld/ChangeLog b/ld/ChangeLog index 93ebd70..781d577 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2002-05-07 Federico G. Schwindt + + * Makefile.am: Honour DESTDIR. + * Makefile.in: Regenerate. + 2002-05-07 Richard Sandiford * ldlang.h (lang_output_section_statement_type): Add update_dot_tree. diff --git a/ld/Makefile.am b/ld/Makefile.am index 93ae6b6..592ba82 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -1127,24 +1127,24 @@ CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 .PHONY: install-exec-local install-data-local install-exec-local: ld-new$(EXEEXT) - $(mkinstalldirs) $(bindir) $(tooldir)/bin + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin @list='$(noinst_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done n=`echo ld | sed '$(transform)'`; \ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \ - rm -f $(tooldir)/bin/ld$(EXEEXT); \ - ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ - || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \ + rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ + ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ + || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ fi install-data-local: - $(mkinstalldirs) $(scriptdir)/ldscripts + $(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts for f in ldscripts/*; do \ - $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \ + $(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \ done # We want install to imply install-info as per GNU standards, despite the diff --git a/ld/Makefile.in b/ld/Makefile.in index 3117034..4fa96ce 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -1828,24 +1828,24 @@ mostlyclean-local: .PHONY: install-exec-local install-data-local install-exec-local: ld-new$(EXEEXT) - $(mkinstalldirs) $(bindir) $(tooldir)/bin + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin @list='$(noinst_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done n=`echo ld | sed '$(transform)'`; \ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \ - rm -f $(tooldir)/bin/ld$(EXEEXT); \ - ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ - || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \ + rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ + ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \ + || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \ fi install-data-local: - $(mkinstalldirs) $(scriptdir)/ldscripts + $(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts for f in ldscripts/*; do \ - $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \ + $(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \ done # We want install to imply install-info as per GNU standards, despite the -- 2.7.4