===================================================================
@@ -15,7 +15,18 @@ for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
+<http://www.gnu.org/licenses/>.
+
+You need to use gperf to generate cfns.h from cfns.gperf. This is
+the process:
+
+ have a GCC source/build tree already checked out
+ edit cfns.gperf
+ cd $(buildir)/gcc
+ make rebuild-cp-cfns
+
+Alternatively, just look into cp/Make-lang.in and run the gperf
+command in the rebuild-cp-cfns rule manually. */
#ifdef __GNUC__
__inline
#endif
===================================================================
@@ -104,11 +104,19 @@ cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
-# Special build rules.
-$(srcdir)/cp/cfns.h: $(srcdir)/cp/cfns.gperf
+# Special build rule. This is a maintainer rule, that needs to be
+# invoked manually (as in "cd $(builddir)/gcc; make rebuild-cp-cfns")
+# to rebuild cfns.h from cfns.gperf any time that cfns.gperf is
+# edited. We don't trigger it automatically when
+# $(srcdir)/cp/cfns.gperf is newer than $(srcdir)/cp/cfns.h because we
+# don't want to depend on users getting the source code with
+# particular timestamps.
+rebuild-cp-cfns:
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
- $(srcdir)/cp/cfns.gperf > $(srcdir)/cp/cfns.h
+ $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
+.PHONY: rebuild-cp-cfns
+
#^L
# Build hooks:
===================================================================
@@ -1,3 +1,13 @@
+2011-04-22 Nicola Pero <nicola.pero@meta-innovation.com>
+
+ * Make-lang.in (rebuild-cp-cfns): New rule replacing the one to
+ build $(srcdir)/cp/cfns.h to prevent unwanted rebuilds. Use
+ --output-file option of gperf instead of > to prevent creating an
+ empty cp/cfns.h when gperf is not available.
+ (.PHONY): New, to make rebuild-cp-cfns as phony.
+ * cfns.gperf: Explain how to run 'make rebuild-cp-cfns'.
+ * cfns.h: Regenerated
+
2011-04-20 Jason Merrill <jason@redhat.com>
* semantics.c (finish_compound_literal): Don't put an array
===================================================================
@@ -1,5 +1,5 @@
/* ANSI-C code produced by gperf version 3.0.3 */
-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C --output-file ../../trunk2/gcc/cp/cfns.h ../../trunk2/gcc/cp/cfns.gperf */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
@@ -28,7 +28,7 @@
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
#endif
-#line 1 "cfns.gperf"
+#line 1 "../../trunk2/gcc/cp/cfns.gperf"
/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
@@ -46,7 +46,18 @@ for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
+<http://www.gnu.org/licenses/>.
+
+You need to use gperf to generate cfns.h from cfns.gperf. This is
+the process:
+
+ have a GCC source/build tree already checked out
+ edit cfns.gperf
+ cd $(buildir)/gcc
+ make rebuild-cfns
+
+Alternatively, just look into cp/Make-lang.in and run the gperf
+command in the rebuild-cfns rule manually. */
#ifdef __GNUC__
__inline
#endif