[3.4-bi] DESTDIR support completed

Alexandre Oliva aoliva@redhat.com
Thu Jan 2 20:55:00 GMT 2003


On Jan  1, 2003, Christian Cornelssen <ccorn@cs.tu-berlin.de> wrote:

> Here are the diffs against current mainline HEAD.

Thanks for updating the patch, and sorry about not having reviewed the
earlier versions thereof in a timely manner.

>  # Create the installation directories.
> +# $(libdir)/gcc-lib/include isn't currently searched by cpp.
>  installdirs:
> -	-if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi
> -	-if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi
> -	-if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
> -	-if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
> -# This dir isn't currently searched by cpp.
> -#	-if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
> -	-fdir= ; for dir in `echo $(libsubdir) | tr '/' ' '`; do \
> -	  fdir=$${fdir}/$${dir}; \
> -	  if [ -d $${fdir} ] ; then true ; else mkdir $${fdir}; chmod a+rx $${fdir}; fi ; \
> +	-for d in $(libsubdir) $(bindir) $(includedir) $(infodir) $(slibdir) $(man1dir) $(man7dir); do \
> +	  fdir=; for dir in `echo "$(DESTDIR)$$d" | tr '/' ' '`; do \
> +	    fdir=$${fdir}/$${dir}; \
> +	    if [ -d "$${fdir}" ] ; then true ; \
> +	    else mkdir "$${fdir}" || break; chmod a+rx "$${fdir}"; fi ; \
> +	  done; \
>  	done
> -	-if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
> -	-if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
> -	-if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
> -	-if [ -d $(slibdir) ] ; then true ; else mkdir $(slibdir) ; chmod a+rx $(slibdir) ; fi
> -# We don't use mkdir -p to create the parents of man1dir,
> -# because some systems don't support it.
> -# Instead, we use this technique to create the immediate parent of man1dir.
> -	-parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
> -	if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
> -	-if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi
> -	-if [ -d $(man7dir) ] ; then true ; else mkdir $(man7dir) ; chmod a+rx $(man7dir) ; fi
 
It looks like you're dropping the creation of prefix, exec_prefix,
libdir and libdir/gcc-lib here.  Since you're actually changing the
code, I suppose we might as well go ahead and drop all this gunk and
use mkinstalldirs instead.

> Index: gcc/mkheaders.in

I'm not sure you want DESTDIR support here.  mkheaders is used when
the package is already installed in the final location, not during
make install, when DESTDIR actually matters.  I won't oppose to its
getting in, but I can't approve this change since it's not a change in
the build machinery code.


All other changes are ok, but we're going to need ChangeLog entries to
put them in.

In general, for such a large patch, we'd need copyright assignments,
but since the changes are mostly mechanical, I don't think they can be
covered by copyright, so we're probably safe.  Incidentally, since
they're not covered by copyright, we don't have to worry about
updating the copyright notices of all modified files at this time.

I suggest that we revert the change in installdirs, except for the
addition of DESTDIR, and those in mkheaders, and address those in
separate, smaller patches.  How does that sound to you?

Thanks a lot for the keeping on trying to get this patch in!  It's
useful, but since the patch is so big, it takes a big chunk of time to
review, which I haven't had for a while...

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer



More information about the Gcc-patches mailing list