This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] add --enable-generated-files-in-srcdir for defining parsedir& objdocdir
- From: Kelley Cook <kelleycook at wideopenwest dot com>
- To: gcc-patches at gcc dot gnu dot org, "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- Date: Thu, 16 Oct 2003 22:05:35 -0400
- Subject: [PATCH] add --enable-generated-files-in-srcdir for defining parsedir& objdocdir
Joseph Myers wrote:
Only releases - so better call the option something more descriptive than
--enable-snapshot. (I'd suggest describing what it does, e.g.
--enable-generated-files-in-srcdir.)
Documentation of this option in install.texi is also desirable.
A respin with Joseph's concerns addressed.
Bootstrap on i686-pc-cygwin in process...
OK, if successful?
2003-10-16 Kelley Cook <kcook@gcc.gnu.org>
* Makefile.in: Get parsedir and docobjdir from configure.
Define $(docdir) before including Make-lang frags.
* configure.in: Support for --enable-generated-files-in-srcdir.
Pass along parsedir and docobjdir.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1173
diff -c -p -r1.1173 Makefile.in
*** Makefile.in 15 Oct 2003 21:57:21 -0000 1.1173
--- Makefile.in 17 Oct 2003 02:04:58 -0000
*************** program_transform_cross_name = @program_
*** 75,93 ****
# Directory where sources are, from where we are.
srcdir = @srcdir@
- # These directories contain files that are provided as part of a FSF tarball,
- # but not provided in CVS. Some GCC integrators like to use the CVS sources
- # but keep them read-only during a build, and so change these variables
- # from these defaults.
- parsedir = $(srcdir)
- docobjdir = $(srcdir)/doc
-
# Top build directory, relative to here.
top_builddir = ..
# objdir is set by configure.
# It's normally the absolute path to the current directory.
objdir = @objdir@
# --------
# UNSORTED
# --------
--- 75,93 ----
# Directory where sources are, from where we are.
srcdir = @srcdir@
# Top build directory, relative to here.
top_builddir = ..
# objdir is set by configure.
# It's normally the absolute path to the current directory.
objdir = @objdir@
+ # These directories contain files that are provided as part of a FSF tarball,
+ # but not provided in CVS. Unless --enable-generated-files-in-srcdir is
+ # specified these files will be put in the object directory.
+ parsedir = @parsedir@
+ docobjdir = @docobjdir@
+ docdir = $(srcdir)/doc
+
# --------
# UNSORTED
# --------
*************** stmp-fixproto: fixhdr.ready fixproto stm
*** 2608,2615 ****
$(STAMP) stmp-fixproto
#
# Remake the info files.
-
- docdir = $(srcdir)/doc
stmp-docobjdir:
-test -d $(docobjdir) || mkdir $(docobjdir)
--- 2608,2613 ----
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.743
diff -c -p -r1.743 configure.in
*** configure.in 16 Oct 2003 18:05:57 -0000 1.743
--- configure.in 17 Oct 2003 02:04:59 -0000
*************** elif test x$withval != xno; then
*** 148,153 ****
--- 148,167 ----
cpp_install_dir=$withval
fi])
+ # We would like to our source tree to be readonly. However when releases or
+ # pre-releases are generated, the flex/bison generated files as well as the
+ # various formats of manuals need to be included along with the rest of the
+ # sources. Therefore we have --enable-generated-files-in-srcdir to do
+ # just that.
+
+ AC_ARG_ENABLE(generated-files-in-srcdir,
+ [ --enable-generated-files-in-srcdir Put generated files in source dir],
+ [case ${enableval} in
+ no) parsedir='$(objdir)'; docobjdir='$(objdir)/doc';;
+ yes,*) parsedir='$(srcdir)'; docobjdir='$(srcdir)/doc';;
+ esac],
+ [parsedir='$(objdir)'; docobjdir='$(objdir)/doc';])
+
# -------------------
# Find default linker
# -------------------
*************** AC_SUBST(objdir)
*** 2922,2927 ****
--- 2936,2943 ----
# Substitute configuration variables
AC_SUBST(subdirs)
AC_SUBST(srcdir)
+ AC_SUBST(docobjdir)
+ AC_SUBST(parsedir)
AC_SUBST(all_boot_languages)
AC_SUBST(all_compilers)
AC_SUBST(all_gtfiles)
Index: doc/install.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/install.texi,v
retrieving revision 1.227
diff -c -p -r1.227 install.texi
*** doc/install.texi 15 Oct 2003 17:12:01 -0000 1.227
--- doc/install.texi 17 Oct 2003 02:05:00 -0000
*************** catalog, configuring with @option{--enab
*** 954,959 ****
--- 954,973 ----
this. Note that you need a recent version of the @code{gettext} tools
to do so.
+ @item --enable-generated-files-in-srcdir
+ Neither the .c and .h files that are generated from bison and flex nor the
+ info manuals and man pages that are built from the .texi files are present
+ in the CVS development tree. When building GCC from that development tree,
+ or from a snapshot which are created from CVS, then those generated files
+ are placed in your build directory, which allows for the source to be in a
+ readonly directory.
+
+ If you configure with @option{--enable-generated-files-in-srcdir} then those
+ generated files will go into the source directory. This is mainly intended
+ for generating release or prerelease tarballs of the GCC sources, since it
+ is not a requirement that the users of source releases to have flex, bison, or
+ makeinfo.
+
@item --enable-version-specific-runtime-libs
Specify
that runtime libraries should be installed in the compiler specific