[3.2] DESTDIR support

Christian Cornelssen ccorn@cs.tu-berlin.de
Mon Jan 27 16:49:00 GMT 2003


Hello again,

this is the DESTDIR patch for the gcc-3_2-branch.  Regardless of
whether it has a chance to get into the 3.2.2 release or not, it
should be useful for packagers.

Of course it's similar to the 3.3 version, though not to the
same degree as 3.3 is to 3.4.  Some files have changed names or
have disappeared, and the toplevel `Makefile.in' is not
"autogen"erated, for example.  Anyway, to review all changes except
the numerous $(DESTDIR) insertions, I recommend

	diff <(sed '/^+/d; s/^-/ /' destdir-3.2-1.diff) \
	<(sed '/^-/d; /^+/s/\$\+[{(]DESTDIR[)}]//g; s/^+/ /' \
	destdir-3.2-1.diff) | less -S

(The <() is a named pipe in Bash.)  Note that the second sed command
deletes $(DESTDIR), so don't wonder if you don't see any such
insertion in the listed commands, or when you see "DESTDIR=" (in a
$(MAKE) call).  Given the explanations for the 3.3 patch, the
output of the above command should be easy to understand.

As for the 3.3 and 3.4 patches, a supplementary patch to
`gcc/ada/Make-lang.in' should be added (cf. "Re: gcc/ada/Make-lang.in:
Some install tuning").  The doc patch to `gcc/doc/install.texi' (cf.
"Re: [doc] DESTDIR and tooldir") also applies.

Testing has not been fully completed yet.  With today's 3.2 snapshot,
I get problems when bootstrapping Ada, but that seems to be unrelated.

Regards,

Christian Cornelssen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: destdir-3.2-1.diff.gz
Type: application/x-gunzip
Size: 11459 bytes
Desc: 
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030127/cf88b69e/attachment.bin>
-------------- next part --------------
Index: libstdc++-v3/include/Makefile.in
===================================================================
RCS file: /usr/local/src/cvs/gcc-cvs/gcc/libstdc++-v3/include/Makefile.in,v
retrieving revision 1.36.2.11.2.2
diff -u -r1.36.2.11.2.2 Makefile.in
--- libstdc++-v3/include/Makefile.in	7 Jan 2003 03:43:59 -0000	1.36.2.11.2.2
+++ libstdc++-v3/include/Makefile.in	27 Jan 2003 10:52:48 -0000
@@ -675,32 +675,32 @@
 	    -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
 	    < ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
 install-data-local:
-	$(mkinstalldirs) ${gxx_include_dir}
-	$(mkinstalldirs) ${gxx_include_dir}/${bits_builddir}
+	$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}
+	$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${bits_builddir}
 	for file in ${bits_headers}; do \
-	  $(INSTALL_DATA) $${file} ${gxx_include_dir}/${bits_builddir}; done
-	$(mkinstalldirs) ${gxx_include_dir}/${backward_builddir}
+	  $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${bits_builddir}; done
+	$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${backward_builddir}
 	for file in ${backward_headers}; do \
-	  $(INSTALL_DATA) $${file} ${gxx_include_dir}/${backward_builddir}; done
-	$(mkinstalldirs) ${gxx_include_dir}/${ext_builddir}
+	  $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${backward_builddir}; done
+	$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${ext_builddir}
 	for file in ${ext_headers}; do \
-	  $(INSTALL_DATA) $${file} ${gxx_include_dir}/${ext_builddir}; done
-	$(mkinstalldirs) ${gxx_include_dir}/${c_base_builddir}
+	  $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${ext_builddir}; done
+	$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir}
 	for file in ${c_base_headers_rename}; do \
-	  $(INSTALL_DATA) ${c_base_builddir}/$${file} ${gxx_include_dir}; done
+	  $(INSTALL_DATA) ${c_base_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${c_base_builddir}; done
 	c_base_headers_extra_install='$(c_base_headers_extra)';\
 	for file in $$c_base_headers_extra_install; do \
-	  $(INSTALL_DATA) $$file ${gxx_include_dir}/${bits_builddir}; done
+	  $(INSTALL_DATA) $$file $(DESTDIR)${gxx_include_dir}/${bits_builddir}; done
 	c_compatibility_headers_install='$(c_compatibility_headers_extra)';\
 	for file in $$c_compatibility_headers_install; do \
-	  $(INSTALL_DATA) $$file ${gxx_include_dir}; done
-	$(mkinstalldirs) ${gxx_include_dir}/${std_builddir}
+	  $(INSTALL_DATA) $$file $(DESTDIR)${gxx_include_dir}; done
+	$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir}
 	for file in ${std_headers_rename}; do \
-	  $(INSTALL_DATA) ${std_builddir}/$${file} ${gxx_include_dir}; done
-	$(mkinstalldirs) ${gxx_include_dir}/${target_builddir}
+	  $(INSTALL_DATA) ${std_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${std_builddir}; done
+	$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${target_builddir}
 	for file in ${target_headers} ${target_headers_extra} \
 	 ${thread_target_headers}; do \
-	  $(INSTALL_DATA) $${file} ${gxx_include_dir}/${target_builddir}; done
+	  $(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${target_builddir}; done
 
 # By adding these files here, automake will remove them for 'make clean'
 #CLEANFILES = ${allstamps}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: destdir-changelog-3.2-1.tar.gz
Type: application/x-gunzip
Size: 1335 bytes
Desc: 
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030127/cf88b69e/attachment-0001.bin>


More information about the Gcc-patches mailing list