This is the mail archive of the gcc-patches@gcc.gnu.org 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]
Other format: [Raw text]

Re: sh/awk issues


 > From: Neil Booth <neil@daikokuya.co.uk>
 > 
 > Kaveh, I'm applying this patch.  This should get us down to
 > just issues with your native awk.  Thanks to Zack for his mail.
 > 
 > I need to know if your ${AWK} supports
 > 
 > 1) functions
 > 2) gsub
 > 
 > Based on your answer I'll update opts.sh.  It's possible that, with
 > this patch, we pick up a different awk and all is now OK.
 > Thanks,
 > Neil.
 > 
 > 	* Makefile.in (c-options.c, c-options.h): Parallel make safe.
 > 	* c.opt: End in blank line.
 > 	* opts.sh: Take AWK from environment if available; use C locale.

Parallel make seems to be fixed, I tried with -j20 and it worked.  And
the blank line fixes the missing entry problem.  Thanks.

The finding AWK thing almost works.  We still need to pass AWK from
the Makefile into the SHELL's environment.  With the patch below it
finds and runs a "good" awk as determined by configure.  Solaris nawk
works (as does gawk of course.)  So luckily I don't have to add gawk
to the giant list of necessary tools (yet.)  We'll see if nawk is
available everywhere soon enough. :-)

I also noted that c-options.[ch] weren't cleaned up anywhere.  So I
added them to the mostlyclean target.

Bootstrapped with C-only on sparc-sun-solaris2.7.  Also tested "make
clean" and verified that c-options.[ch] were removed.

Ok to install?

		Thanks,
		--Kaveh


2003-06-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* Makefile.in (c-options.c): Pass in $(AWK) to opts.sh.
	(mostlyclean): Delete c-options.c and c-options.h.

diff -rup orig/egcc-CVS20030601/gcc/Makefile.in egcc-CVS20030601/gcc/Makefile.in
--- orig/egcc-CVS20030601/gcc/Makefile.in	2003-06-01 20:01:04.000000000 -0400
+++ egcc-CVS20030601/gcc/Makefile.in	2003-06-01 21:03:42.104500000 -0400
@@ -1321,7 +1321,7 @@ c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM
 		$< $(OUTPUT_OPTION) @TARGET_SYSTEM_ROOT_DEFINE@
 
 c-options.c: c.opt $(srcdir)/opts.sh
-	$(SHELL) $(srcdir)/opts.sh c-options.c c-options.h $(srcdir)/c.opt
+	AWK=$(AWK) $(SHELL) $(srcdir)/opts.sh c-options.c c-options.h $(srcdir)/c.opt
 
 c-options.h: c-options.c
 	@true
@@ -2783,7 +2783,7 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mo
 	-rm -f xlimits.h
 # Delete other built files.
 	-rm -f xsys-protos.hT
-	-rm -f specs.h options.h gencheck.h
+	-rm -f specs.h options.h gencheck.h c-options.c c-options.h
 # Delete the stamp and temporary files.
 	-rm -f s-* tmp-* stamp-* stmp-*
 	-rm -f */stamp-* */tmp-*


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