This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[patch] this time for sure ;-) (was: Re: Final end of the `never ending story'?)

On Thu, 5 March 1998, 08:46:16, wrote:

 > On Wed, 4 March 1998, 23:31:30, wrote:
 >  >   > Look at argv.o, it's a symbolic link !-(
 >  > OK.  So what created the symbolic link?  It seems to me that your patch
 >  > just papers over the problem -- we should find out where/why that
 >  > link is created and decide if it's better to fix the problem by
 >  > avoiding the bogus links in the first place. 
 >  > 
 >  > 
 >  > jeff
 > It's caused  by  using libiberty twice.  First it's  used to build the
 > native  lib (in  the libiberty dir  itself);  later on, this libiberty
 > directory - configured  and  built! - will  then  be linked into   the
 > libraries/libiberty one; then,  make  distclean will be  called, which
 > removes the .o links.  I had expected, this would be done in the other
 > multilib dirs, too, but, somehow make distclean doesn't get called for
 > them.
 > >From looking at toplevel
 > 		if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
 > 		  if [ -f Makefile ]; then \
 > 		    if $(MAKE) distclean; then \
 > 		      true; \
 > it looks too me like no Makefile  is found in that subdirectory, hence
 > make believes   `this must be either   a virgin or  a properly cleaned
 > directory', calls configure  at leaves the .o links  lying around.  My
 > patch now simply  corrects this by calling  make clean after configure
 > ran.
 > Perhaps, you're  right it's only papering over  the real  problem (why
 > isn't there a Makefile?), but it's not  wrong anyway. I'll dig further
 > into it (when I'll find some spare time ;-).

Now I understand this stuff better. The toplevel make only creates the
first symlink-tree;  this one contains   a Makefile link,  hence  make
distclean gets called  properly.  Then, configure is called   which in
turn starts the full multilib machinery  (calling symlink-tree and the

Actually, calls  symlink-tree  but fails to  cleanup  the
directory if a Makefile is existing. My patch below fixes this.

Another  issue:  calling  make distclean leaves texinfo/info/Makefile;
this  is  because  info   is omitted     from  the  SUBDIRS macro   in
texinfo/ I guess, it  has  been omitted because we   don't
need the info program and hence don't  want to bother with problems in
it, right? Perhaps we should add the info  directory explicitly in the
for loop when calling make distclean, like this:

diff -up egcs-980312.orig/texinfo/ egcs-980312/texinfo/
--- egcs-980312.orig/texinfo/	Fri Oct 31 17:38:44 1997
+++ egcs-980312/texinfo/	Thu Mar 12 16:26:19 1998
@@ -115,14 +115,14 @@ stmp-sub-all:
 	touch stmp-sub-all
 clean mostlyclean:
-	for dir in $(SUBDIRS); do \
+	for dir in $(SUBDIRS) info; do \
 	  echo making $@ in $$dir; \
 	  (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \
 	-rm -f stmp*
 distclean: clean texclean
-	for dir in $(SUBDIRS); do \
+	for dir in $(SUBDIRS) info; do \
 	  echo making $@ in $$dir; \
 	  (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \

Anyway, here is the final

  allow-configuring-and-building-even-multilibs-in-srcdir ;-) patch:

Thu Mar 12 16:01:14 1998  Manfred Hollstein  <>

	* After building symlink tree call make distclean
	if a Makefile got linked into ${ml_dir}/${ml_libdir}; this happens
	to be the case for libiberty.

  Fri Mar  6 01:02:03 1998  Richard Henderson  <>
  	* config.sub: Accept alphapca56 and alphaev6 properly.
diff --context --recursive --show-c-function -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980312.orig/ egcs-980312/
*** egcs-980312.orig/	Tue Jan 13 22:01:03 1998
--- egcs-980312/	Thu Mar 12 16:07:07 1998
*************** if [ -n "${multidirs}" ] && [ -z "${ml_n
*** 564,569 ****
--- 564,576 ----
        (cd ${ml_dir}/${ml_libdir};
         ../${dotdot}${ml_unsubdir}symlink-tree ../${dotdot}${ml_unsubdir}${ml_libdir} "")
+       if [ -f ${ml_dir}/${ml_libdir}/Makefile ]; then
+ 	if [ x"${MAKE}" = x ]; then
+ 	  (cd ${ml_dir}/${ml_libdir}; make distclean)
+ 	else
+ 	  (cd ${ml_dir}/${ml_libdir}; ${MAKE} distclean)
+ 	fi
+       fi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]