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: Looking at the end of PR10996 [Take 2 for the *.7 files]


On Tue, 21 Oct 2003 14:30:18 -0700, Zack Weinberg wrote:

>Please instead try to get the generic rule to work properly.  I think
>something like this ought to do it:

>vpath %.texi $(docdir):$(docdir)/include

>$(docobjdir)/gfdl.7: fdl.texi
>$(docobjdir)/gpl.7: gpl.texi
>$(docobjdir)/fsf-funding.7: funding.texi

>$(docobjdir)/%.7:
>        commands here

Thank you for the pointer.

This idea worked so well that I was able to extend it to all of the document files.

Tested via the following (with a rm -rf build/gcc between each)

make -j3 bootstrap (all languages except ada)
make info
make generated-manpages
make dvi

and for good measure..
make install-info
make install-man

All of these worked.

OK to install?

Kelley Cook

2003-10-22  Kelley Cook  <kcook@gcc.gnu.org>

	* Makefile.in: Define a vpath for .texi.  Add stmp-docobjdir to every
	$(docobjdir) generated file.
	(TEXI_CPP_FILES): Adjust for vpath.
	(TEXI_GCC_FILES): Likewise.
	(TEXI_GCCINT_FILES): Likewise.
	(TEXI_GCCINSTALL_FILES): Likewise.
	(TEXI_CPPINT_FILES): Likewise.
	($(docobjdir)/%.info): Likewise.
	($(docobjdir)/%.dvi): Likewise.
	($(docobjdir)/%.1): Likewise.
	($(docobjdir)/%.7): Likewise.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1181
diff -U5 -p -d -w -r1.1181 Makefile.in
--- Makefile.in	21 Oct 2003 23:28:05 -0000	1.1181
+++ Makefile.in	22 Oct 2003 03:41:49 -0000
@@ -2614,89 +2614,77 @@ stmp-fixproto: fixhdr.ready fixproto stm

 stmp-docobjdir:
 	-test -d $(docobjdir) || mkdir $(docobjdir)
 	$(STAMP) stmp-docobjdir

+vpath %.texi $(docdir):$(docdir)/include

 doc: $(BUILD_INFO) $(GENERATED_MANPAGES) gccbug
 info:: $(docobjdir)/cpp.info $(docobjdir)/gcc.info $(docobjdir)/gccint.info $(docobjdir)/gccinstall.info $(docobjdir)/cppinternals.info

-TEXI_CPP_FILES = $(docdir)/cpp.texi $(docdir)/include/fdl.texi \
-  $(docdir)/cppenv.texi $(docdir)/cppopts.texi
+TEXI_CPP_FILES = cpp.texi fdl.texi cppenv.texi cppopts.texi

-TEXI_GCC_FILES = $(docdir)/gcc.texi $(docdir)/include/gcc-common.texi \
-	 $(docdir)/frontends.texi $(docdir)/standards.texi \
-	 $(docdir)/invoke.texi $(docdir)/extend.texi $(docdir)/md.texi \
-	 $(docdir)/objc.texi $(docdir)/gcov.texi $(docdir)/trouble.texi \
-	 $(docdir)/bugreport.texi $(docdir)/service.texi \
-	 $(docdir)/contribute.texi $(docdir)/compat.texi \
-	 $(docdir)/include/funding.texi $(docdir)/gnu.texi \
-	 $(docdir)/include/gpl.texi $(docdir)/include/fdl.texi \
-	 $(docdir)/contrib.texi $(docdir)/cppenv.texi $(docdir)/cppopts.texi
+TEXI_GCC_FILES = gcc.texi gcc-common.texi frontends.texi standards.texi \
+	 invoke.texi extend.texi md.texi objc.texi gcov.texi trouble.texi \
+	 bugreport.texi service.texi contribute.texi compat.texi funding.texi \
+	 gnu.texi gpl.texi fdl.texi contrib.texi cppenv.texi cppopts.texi

-TEXI_GCCINT_FILES = $(docdir)/gccint.texi \
-	 $(docdir)/include/gcc-common.texi $(docdir)/contribute.texi \
-	 $(docdir)/makefile.texi $(docdir)/configterms.texi \
-	 $(docdir)/portability.texi $(docdir)/interface.texi \
-	 $(docdir)/passes.texi $(docdir)/c-tree.texi \
-	 $(docdir)/rtl.texi $(docdir)/md.texi $(docdir)/tm.texi \
-	 $(docdir)/hostconfig.texi $(docdir)/fragments.texi \
-	 $(docdir)/configfiles.texi $(docdir)/collect2.texi \
-	 $(docdir)/headerdirs.texi $(docdir)/include/funding.texi \
-	 $(docdir)/gnu.texi $(docdir)/include/gpl.texi \
-	 $(docdir)/include/fdl.texi $(docdir)/contrib.texi \
-	 $(docdir)/languages.texi $(docdir)/sourcebuild.texi \
-	 $(docdir)/gty.texi $(docdir)/libgcc.texi
+TEXI_GCCINT_FILES = gccint.texi gcc-common.texi contribute.texi makefile.texi \
+	 configterms.texi portability.texi interface.texi passes.texi \
+	 c-tree.texi rtl.texi md.texi tm.texi hostconfig.texi fragments.texi \
+	 configfiles.texi collect2.texi headerdirs.texi funding.texi gnu.texi \
+	 gpl.texi fdl.texi contrib.texi languages.texi sourcebuild.texi \
+	 gty.texi libgcc.texi

-TEXI_GCCINSTALL_FILES = $(docdir)/install.texi $(docdir)/install-old.texi \
-	 $(docdir)/include/fdl.texi
+TEXI_GCCINSTALL_FILES = install.texi install-old.texi fdl.texi

-TEXI_CPPINT_FILES = $(docdir)/cppinternals.texi
+TEXI_CPPINT_FILES = cppinternals.texi

-$(docobjdir)/cpp.info cpp.dvi: $(TEXI_CPP_FILES)
-$(docobjdir)/gcc.info gcc.dvi: $(TEXI_GCC_FILES)
-$(docobjdir)/gccint.info gccint.dvi: $(TEXI_GCCINT_FILES)
-$(docobjdir)/gccinstall.info gccinstall.dvi: $(TEXI_GCCINSTALL_FILES)
-$(docobjdir)/cppinternals.info cppinternals.dvi: $(TEXI_CPPINT_FILES)
+$(docobjdir)/cpp.info cpp.dvi: $(TEXI_CPP_FILES) stmp-docobjdir
+$(docobjdir)/gcc.info gcc.dvi: $(TEXI_GCC_FILES) stmp-docobjdir
+$(docobjdir)/gccint.info gccint.dvi: $(TEXI_GCCINT_FILES) stmp-docobjdir
+$(docobjdir)/gccinstall.info gccinstall.dvi: $(TEXI_GCCINSTALL_FILES) \
+	 stmp-docobjdir
+$(docobjdir)/cppinternals.info cppinternals.dvi: $(TEXI_CPPINT_FILES) \
+	 stmp-docobjdir

-$(docobjdir)/%.info: $(docdir)/%.texi stmp-docobjdir
+$(docobjdir)/%.info:
 	if [ x$(BUILD_INFO) = xinfo ]; then \
 		$(MAKEINFO) $(MAKEINFOFLAGS) -I $(docdir) \
 			-I $(docdir)/include -o $@ $<; \
 	fi

 dvi:: gcc.dvi gccint.dvi gccinstall.dvi cpp.dvi cppinternals.dvi

-%.dvi: $(docdir)/%.texi
+%.dvi:
 	$(TEXI2DVI) -I $(docdir) -I $(docdir)/include $<

 gccinstall.dvi:
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(TEXI2DVI) -I $$s/doc -I $$s/doc/include -o $@ $$s/doc/install.texi

 generated-manpages:: $(docobjdir)/gcov.1 $(docobjdir)/cpp.1 \
 	$(docobjdir)/gcc.1 $(docobjdir)/gfdl.7 $(docobjdir)/gpl.7 \
 	$(docobjdir)/fsf-funding.7

-$(docobjdir)/gcov.1: $(docdir)/gcov.texi
-$(docobjdir)/cpp.1: $(docdir)/cpp.texi $(docdir)/cppenv.texi \
-  $(docdir)/cppopts.texi
-$(docobjdir)/gcc.1: $(docdir)/invoke.texi $(docdir)/cppenv.texi \
-  $(docdir)/cppopts.texi
-$(docobjdir)/gfdl.7: $(docdir)/include/fdl.texi
-$(docobjdir)/gpl.7: $(docdir)/include/gpl.texi
-$(docobjdir)/fsf-funding.7: $(docdir)/include/funding.texi
+$(docobjdir)/gcov.1: gcov.texi stmp-docobjdir
+$(docobjdir)/cpp.1: cpp.texi cppenv.texi cppopts.texi stmp-docobjdir
+$(docobjdir)/gcc.1: invoke.texi cppenv.texi cppopts.texi stmp-docobjdir

-$(docobjdir)/%.1: $(docdir)/%.texi stmp-docobjdir
+$(docobjdir)/%.1:
 	$(STAMP) $@
 	-$(TEXI2POD) $< > $(basename $(notdir $@)).pod
 	-($(POD2MAN) --section=1 \
 			$(basename $(notdir $@)).pod > $(@).T$$$$ && \
 		mv -f $(@).T$$$$ $@) || \
 		(rm -f $(@).T$$$$ && exit 1)
 	-rm -f $(basename $(notdir $@)).pod

-$(docobjdir)/%.7: $(docdir)/%.texi stmp-docobjdir
+$(docobjdir)/gfdl.7: fdl.texi stmp-docobjdir
+$(docobjdir)/gpl.7: gpl.texi stmp-docobjdir
+$(docobjdir)/fsf-funding.7: funding.texi stmp-docobjdir
+$(docobjdir)/%.7: 
 	$(STAMP) $@
 	-$(TEXI2POD) $< > $(basename $(notdir $@)).pod
 	-($(POD2MAN) --section=7 \
 			$(basename $(notdir $@)).pod > $(@).T$$$$ && \
 		mv -f $(@).T$$$$ $@) || \




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