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]

Candidate for PR/13485 Generated files no longer get messages extracted


This is a floater for fixing PR/13485.

First off, it does not do all the nice things that Joseph would like for this patch to do, but it does appear to fix the regression with the minimal impact required for stage 3 fix.

Quite simply the po.generated target is nuked and replaced with srcextra which already lists all of the generated files. All that was required in order for this to work I had to add in a layer of indirection to the srcextra target in gcc/Makefile.in, which likely should be done anyway.

It also fixes a bug I came across by adding in the required dependency on options.c to po/${PACKAGE}/gcc.pot.

The only slight flaw I see is that make po/gcc.pot would be required to be run in a read-write source directory, but that stipulation could just be added to the as of yet non-existant documentation that the source directory must remain read-only except in the current cases of --enable-maintainer-mode and --enable-generated-files-in-srcdir.

tested with:
configure --enable-languages=all,treelang
make configure-gcc
cd gcc
make po/gcc.pot

OK?
Kelley Cook
2004-01-26  Kelley Cook  <kcook@gcc.gnu.org>

	Makefile.in (srcextra):  Add a level of indirection to ...
	(gcc.srcextra): ... here.
	(po-generated): Delete.
	(po/$(PACKAGE).pot: Use srcextra instead of po-generated.  Depend on
	options.c.
	(start.encap): Remove superfluous lang.srcextra dependency.

cp/
2004-01-26  Kelley Cook  <kcook@gcc.gnu.org>

	Make-lang.in (po-generated):  Delete.

java/
2004-01-26  Kelley Cook  <kcook@gcc.gnu.org>

	Make-lang.in (po-generated):  Delete.

objc/
2004-01-26  Kelley Cook  <kcook@gcc.gnu.org>

	Make-lang.in (po-generated):  Delete.

diff -prud ../../gcc-orig/gcc/Makefile.in ./Makefile.in
--- ../../gcc-orig/gcc/Makefile.in	2004-01-20 23:01:04.000000000 -0500
+++ ./Makefile.in	2004-01-26 12:25:19.281844900 -0500
@@ -1053,7 +1057,7 @@ all.cross: native gcc-cross cpp$(exeext)
 	$(LIBGCC) $(EXTRA_PARTS) lang.all.cross doc
 # This is what must be made before installing GCC and converting libraries.
 start.encap: native xgcc$(exeext) cpp$(exeext) specs \
-	xlimits.h lang.start.encap @GENINSRC@ srcextra lang.srcextra
+	xlimits.h lang.start.encap @GENINSRC@ srcextra
 # These can't be made until after GCC can run.
 rest.encap: $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap
 # This is what is made with the host's compiler
@@ -1269,7 +1273,9 @@ c-parse.o : c-parse.c $(CONFIG_H) $(SYST
     $(GGC_H) intl.h $(C_TREE_H) input.h flags.h toplev.h output.h $(CPPLIB_H) \
     varray.h gt-c-parse.h
 
-srcextra: c-parse.y c-parse.c gengtype-lex.c gengtype-yacc.c gengtype-yacc.h
+srcextra: gcc.srcextra lang.srcextra
+
+gcc.srcextra: c-parse.y c-parse.c gengtype-lex.c gengtype-yacc.c gengtype-yacc.h
 	-cp -p $^ $(srcdir)
 
 c-parse.c: c-parse.y
@@ -2302,10 +2308,6 @@ intl.o: intl.c $(CONFIG_H) $(SYSTEM_H) c
 	  -DLOCALEDIR=\"$(localedir)\" \
 	  -c $(srcdir)/intl.c $(OUTPUT_OPTION)
 
-# Make-lang.in should add dependencies of po-generated on any generated
-# files which need to be scanned by gettext (usually Yacc-generated parsers).
-po-generated: c-parse.c options.c
-
 #
 # Remake cpp and protoize.
 
@@ -3844,8 +3848,8 @@
 # fairly modern (POSIX-compliant) awk.
 # The .pot file is left in the build directory.
 $(PACKAGE).pot: po/$(PACKAGE).pot
-po/$(PACKAGE).pot: force
+po/$(PACKAGE).pot: force options.c
 	-test -d po || mkdir po
-	$(MAKE) po-generated
+	$(MAKE) srcextra
 	AWK=$(AWK) $(SHELL) $(srcdir)/po/exgettext \
 		$(XGETTEXT) $(PACKAGE) $(srcdir)
diff -prud ../../gcc-orig/gcc/cp/Make-lang.in ./cp/Make-lang.in
--- ../../gcc-orig/gcc/cp/Make-lang.in	2004-01-20 23:01:21.000000000 -0500
+++ ./cp/Make-lang.in	2004-01-26 12:08:38.102478400 -0500
@@ -58,8 +58,6 @@ g++spec.o: $(srcdir)/cp/g++spec.c $(SYST
 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
 		$(INCLUDES) $(srcdir)/cp/g++spec.c)
 
-po-generated:
-
 # Create the compiler driver for g++.
 GXX_OBJS = gcc.o g++spec.o intl.o prefix.o version.o 
 g++$(exeext): $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS)
diff -prud ../../gcc-orig/gcc/java/Make-lang.in ./java/Make-lang.in
--- ../../gcc-orig/gcc/java/Make-lang.in	2004-01-20 23:01:24.000000000 -0500
+++ ./java/Make-lang.in	2004-01-26 12:08:45.653336000 -0500
@@ -76,8 +76,6 @@ $(GCJ)-cross$(exeext): $(GCJ)$(exeext)
 	-rm -f $(GCJ)-cross$(exeext)
 	cp $(GCJ)$(exeext) $(GCJ)-cross$(exeext)
 
-po-generated: java/parse.c java/parse-scan.c
-
 java.srcextra: java/parse.c java/parse-scan.c
 	-cp -p $^ $(srcdir)/java
 
diff -prud ../../gcc-orig/gcc/objc/Make-lang.in ./objc/Make-lang.in
--- ../../gcc-orig/gcc/objc/Make-lang.in	2004-01-20 23:01:25.000000000 -0500
+++ ./objc/Make-lang.in	2004-01-26 12:08:51.491731200 -0500
@@ -72,8 +72,6 @@ objc/objc-act.o : objc/objc-act.c \
    objc/objc-act.h input.h function.h output.h debug.h langhooks.h \
    $(LANGHOOKS_DEF_H) gt-objc-objc-act.h gtype-objc.h
 
-po-generated: objc/objc-parse.c
-
 objc.srcextra: objc/objc-parse.c objc/objc-parse.y
 	-cp -p $^ $(srcdir)/objc
  

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