This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fortran docs wouldn't built with a read-only srcdir
- To: gcc-patches at gcc dot gnu dot org
- Subject: Fortran docs wouldn't built with a read-only srcdir
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 18 Nov 2000 13:48:38 -0200
- Organization: GCC Team, Red Hat
Since the Fortran docs depend on files created in the build tree, it's
impossible to build it from a read-only srcdir, and the documentation
in the distribution wouldn't seem up-to-date. Testing again, after
some minor tweaks, on i686-pc-linux-gnu. Barring some unexpected
failure, I'm checking it in.
Index: gcc/f/Make-lang.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/f/Make-lang.in,v
retrieving revision 1.71
diff -u -p -r1.71 Make-lang.in
--- gcc/f/Make-lang.in 2000/11/10 21:29:53 1.71
+++ gcc/f/Make-lang.in 2000/11/18 15:43:30
@@ -214,12 +214,23 @@ f/g77.dvi: $(srcdir)/f/g77.texi $(srcdir
# been found only upon reading the documentation that was automatically
# produced from it.
-$(srcdir)/f/intdoc.texi: f/intdoc$(build_exeext)
+# If the documentation files depended on executables in the build
+# tree, there'd be no way to ship a source tree with the documentation
+# already generated such that `make' wouldn't attempt to rebuilt it.
+# So, we punt and arrange for the documentation files to depend on the
+# dependencies of the executables, not on the executables themselves.
+# But then, we have to build the executables explicitly in their build
+# rules.
+
+INTDOC_DEPS = $(srcdir)/f/intdoc.c $(srcdir)/f/intrin.h $(srcdir)/f/intrin.def
+
+$(srcdir)/f/intdoc.texi: $(INTDOC_DEPS) $(srcdir)/f/intdoc.in
+ $(MAKE) f/intdoc$(build_exeext)
f/intdoc$(build_exeext) > $(srcdir)/f/intdoc.texi
-f/intdoc: f/intdoc.c f/intdoc.h0 f/intrin.h f/intrin.def hconfig.h system.h
+f/intdoc$(build_exeext): $(INTDOC_DEPS) f/intdoc.h0 hconfig.h system.h
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) $(INCLUDES) \
- $(srcdir)/f/intdoc.c -o f/intdoc
+ $(srcdir)/f/intdoc.c -o f/intdoc$(build_exeext)
f/intdoc.h0: f/intdoc.in f/ansify$(build_exeext)
f/ansify$(build_exeext) $(srcdir)/f/intdoc.in \
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me