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]
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/, 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

Kelley Cook
2004-01-26  Kelley Cook  <> (srcextra):  Add a level of indirection to ...
	(gcc.srcextra): ... here.
	(po-generated): Delete.
	(po/$(PACKAGE).pot: Use srcextra instead of po-generated.  Depend on
	(start.encap): Remove superfluous lang.srcextra dependency.

2004-01-26  Kelley Cook  <> (po-generated):  Delete.

2004-01-26  Kelley Cook  <> (po-generated):  Delete.

2004-01-26  Kelley Cook  <> (po-generated):  Delete.

diff -prud ../../gcc-orig/gcc/ ./
--- ../../gcc-orig/gcc/	2004-01-20 23:01:04.000000000 -0500
+++ ./	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.
 # 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)
-# 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/ ./cp/
--- ../../gcc-orig/gcc/cp/	2004-01-20 23:01:21.000000000 -0500
+++ ./cp/	2004-01-26 12:08:38.102478400 -0500
@@ -58,8 +58,6 @@ g++spec.o: $(srcdir)/cp/g++spec.c $(SYST
 		$(INCLUDES) $(srcdir)/cp/g++spec.c)
 # 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/ ./java/
--- ../../gcc-orig/gcc/java/	2004-01-20 23:01:24.000000000 -0500
+++ ./java/	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/ ./objc/
--- ../../gcc-orig/gcc/objc/	2004-01-20 23:01:25.000000000 -0500
+++ ./objc/	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]