libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: distchecking without FC?


From: Noah Misch
Subject: Re: distchecking without FC?
Date: Thu, 14 Jun 2007 17:42:04 -0700
User-agent: Mutt/1.5.9i

On Thu, Jun 14, 2007 at 09:02:39AM -0700, Noah Misch wrote:
> On Thu, Jun 14, 2007 at 02:52:45PM +0200, Benoit Sigoure wrote:
> > Quoting Noah Misch <address@hidden>:
> > >On Thu, Jun 14, 2007 at 01:47:12PM +0200, Benoit Sigoure wrote:
> > >>is there any reason why I can checkout, configure and make all check
> > >>libtool HEAD but not distcheck it?  Configure would complain (only
> > >>during distcheck) that I don't have a working Fortran compiler.
> > >
> > >I posted a patch to fix this:
> > >http://lists.gnu.org/archive/html/libtool-patches/2007-05/msg00002.html
> > 
> > Thanks for the pointer,
> 
> > But I still get:
> > checking whether we are using the GNU Fortran 77 compiler... no
> > checking whether  accepts -g... no
> 
> Ah, you have no F77 compiler either.  The patch I posted only works around an
> absent `FC' (F95) compiler.  Thanks; I'll look at generalizing it.

It was possible to generalize the f77demo/fcdemo configure script hacks to make
them work with no Fortran compiler at all.  Even so, it looked increasingly
fragile.  Therefore, I took a different approach: list the files to distribute
directly in the top-level Makefile.am, and do not bother to configure the test
directories for `make dist'.  If better, we could compromise between complexity
and redundancy by generating the list of files at `bootstrap' time.  In any
case, `make dist' runs an order magnitude faster.

`make dist' now works fine on a system with no Fortran.  The list of files in
the distribution has not changed.

While examining this, I tried `make distcheck'.  It failed due to a `config.log'
left in tests/fcdemo when its `configure' fails.  This patch incorporates a
two-line fix to avoid that problem.

Comments, anyone?


2007-06-14  Noah Misch  <address@hidden>

        * Makefile.am (configure-subdirs, @DIST_MAKEFILE_LIST@, DIST_SUBDIRS):
        Delete.
        (cdemo_dist, demo_dist, depdemo_dist, f77demo_dist, fcdemo_dist)
        (mdemo_dist, mdemo2_dist, pdemo_dist, tagdemo_dist): New variables.
        (EXTRA_DIST): Add the contents of those variables.
        (clean-local-legacy): Delete `config.log' in test directories.
        * configure.ac (CONF_SUBDIRS, DIST_MAKEFILE_LIST): Delete.

diff -urp -X ../dontdiff lt-clean/configure.ac lt-fdist/configure.ac
--- lt-clean/configure.ac       2007-03-26 15:18:43.000000000 -0500
+++ lt-fdist/configure.ac       2007-06-14 18:09:27.000000000 -0400
@@ -153,18 +153,6 @@ if test x"${enable_ltdl_install+set}" !=
   enable_ltdl_install=yes
 fi
 
-# All subdirectories that are configured on demand, but that must be
-# included in the distribution.
-CONF_SUBDIRS="tests/cdemo tests/demo tests/depdemo tests/f77demo tests/fcdemo \
-       tests/mdemo tests/mdemo2 tests/pdemo tests/tagdemo"
-AC_SUBST([CONF_SUBDIRS])
-
-DIST_MAKEFILE_LIST=
-for dir in $CONF_SUBDIRS; do
-  DIST_MAKEFILE_LIST="${DIST_MAKEFILE_LIST}$dir/Makefile "
-done
-AC_SUBST([DIST_MAKEFILE_LIST])
-
 
 ## ---------------- ##
 ## compiler checks. ##
diff -urp -X ../dontdiff lt-clean/Makefile.am lt-fdist/Makefile.am
--- lt-clean/Makefile.am        2007-06-14 12:37:28.000000000 -0400
+++ lt-fdist/Makefile.am        2007-06-14 19:34:03.000000000 -0400
@@ -103,14 +103,6 @@ libtool: $(top_builddir)/config.status $
          cd $(top_builddir) && $(SHELL) ./config.status $$target; \
        fi
 
-.PHONY: configure-subdirs
-configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
address@hidden@:
-       dir=`echo $@ | sed 's,^[^/]*$$,.,;s,/[^/]*$$,,'`; \
-       test -d $$dir || mkdir $$dir || exit 1; \
-       abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; \
-       (cd $$dir && $$abs_srcdir/$$dir/configure) || exit 1
-
 
 # ---------- #
 # Bootstrap. #
@@ -599,6 +591,60 @@ COMMON_TESTS = \
        tests/mdemo-inst.test tests/mdemo-unst.test \
        tests/cdemo-undef.test tests/cdemo-make.test tests/cdemo-exec.test
 
+cdemo_dist = tests/cdemo/aclocal.m4 tests/cdemo/configure                      
\
+tests/cdemo/configure.ac tests/cdemo/foo.c tests/cdemo/foo.h 
tests/cdemo/main.c        \
+tests/cdemo/Makefile.am tests/cdemo/Makefile.in tests/cdemo/README
+
+demo_dist = tests/demo/aclocal.m4 tests/demo/configure tests/demo/configure.ac 
\
+tests/demo/dlmain.c tests/demo/foo.c tests/demo/foo.h tests/demo/hell1.c       
\
+tests/demo/hell2.c tests/demo/hello.c tests/demo/main.c tests/demo/Makefile.am 
\
+tests/demo/Makefile.in tests/demo/README
+
+depdemo_dist = tests/depdemo/l1/l1.c tests/depdemo/l1/l1.h                     
\
+tests/depdemo/l1/Makefile.am tests/depdemo/l1/Makefile.in 
tests/depdemo/l2/l2.c        \
+tests/depdemo/l2/l2.h tests/depdemo/l2/Makefile.am 
tests/depdemo/l2/Makefile.in        \
+tests/depdemo/l3/l3.c tests/depdemo/l3/l3.h tests/depdemo/l3/Makefile.am       
\
+tests/depdemo/l3/Makefile.in tests/depdemo/l4/l4.c tests/depdemo/l4/l4.h       
\
+tests/depdemo/l4/Makefile.am tests/depdemo/l4/Makefile.in                      
\
+tests/depdemo/aclocal.m4 tests/depdemo/README tests/depdemo/configure          
\
+tests/depdemo/configure.ac tests/depdemo/Makefile.am tests/depdemo/Makefile.in 
\
+tests/depdemo/main.c tests/depdemo/sysdep.h
+
+f77demo_dist = tests/f77demo/aclocal.m4 tests/f77demo/config-h.in              
\
+tests/f77demo/configure tests/f77demo/configure.ac tests/f77demo/cprogram.c    
\
+tests/f77demo/fooc.c tests/f77demo/foof2.f tests/f77demo/foof3.f               
\
+tests/f77demo/foof.f tests/f77demo/foo.h tests/f77demo/fprogram.f              
\
+tests/f77demo/Makefile.am tests/f77demo/Makefile.in tests/f77demo/README
+
+fcdemo_dist = tests/fcdemo/aclocal.m4 tests/fcdemo/config-h.in                 
\
+tests/fcdemo/configure tests/fcdemo/configure.ac tests/fcdemo/cprogram.c       
\
+tests/fcdemo/fooc.c tests/fcdemo/foof2.f90 tests/fcdemo/foof3.f90              
\
+tests/fcdemo/foof.f90 tests/fcdemo/foo.h tests/fcdemo/fprogram.f90             
\
+tests/fcdemo/Makefile.am tests/fcdemo/Makefile.in tests/fcdemo/README
+
+mdemo_dist = tests/mdemo/aclocal.m4 tests/mdemo/configure                      
\
+tests/mdemo/configure.ac tests/mdemo/foo1.c tests/mdemo/foo2.c                 
\
+tests/mdemo/foo.h tests/mdemo/main.c tests/mdemo/Makefile.am                   
\
+tests/mdemo/Makefile.in tests/mdemo/mlib.c tests/mdemo/README tests/mdemo/sub.c
+
+mdemo2_dist = tests/mdemo2/aclocal.m4 tests/mdemo2/configure           \
+tests/mdemo2/configure.ac tests/mdemo2/main.c tests/mdemo2/Makefile.am \
+tests/mdemo2/Makefile.in tests/mdemo2/README
+
+pdemo_dist = tests/pdemo/aclocal.m4 tests/pdemo/configure                      
\
+tests/pdemo/configure.ac tests/pdemo/foo.h                                     
\
+tests/pdemo/longer_file_name_dlmain.c tests/pdemo/longer_file_name_foo2.c      
\
+tests/pdemo/longer_file_name_foo.c tests/pdemo/longer_file_name_hell1.c        
        \
+tests/pdemo/longer_file_name_hell2.c tests/pdemo/longer_file_name_hello.c      
\
+tests/pdemo/longer_file_name_main.c tests/pdemo/Makefile.am                    
\
+tests/pdemo/Makefile.in
+
+tagdemo_dist = tests/tagdemo/aclocal.m4 tests/tagdemo/baz.cpp          \
+tests/tagdemo/baz.h tests/tagdemo/configure tests/tagdemo/configure.ac \
+tests/tagdemo/conv.cpp tests/tagdemo/conv.h tests/tagdemo/foo.cpp      \
+tests/tagdemo/foo.h tests/tagdemo/main.cpp tests/tagdemo/Makefile.am   \
+tests/tagdemo/Makefile.in tests/tagdemo/README
+
 TESTS = $(COMMON_TESTS)
 if HAVE_CXX
 TESTS += $(CXX_TESTS)
@@ -613,8 +659,10 @@ endif
 tests/demo-conf.test: libtool
 
 EXTRA_DIST     += $(srcdir)/tests/defs.in tests/defs.m4sh \
-                 $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS)
-DIST_SUBDIRS   += $(CONF_SUBDIRS)
+                 $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS) \
+                 $(cdemo_dist) $(demo_dist) $(depdemo_dist) $(f77demo_dist) \
+                 $(fcdemo_dist) $(mdemo_dist) $(mdemo2_dist) $(pdemo_dist) \
+                 $(tagdemo_dist)
 
 # The defs script shouldn't be recreated whenever the Makefile is
 # regenerated since the source tree can be read-only.
@@ -632,12 +680,14 @@ $(srcdir)/tests/defs.in: $(auxdir)/gener
        rm -f tests/defs.in; \
        $(M4SH) -B $(auxdir) tests/defs.m4sh > tests/defs.in
 
-# We need to remove any files that the above tests created.
+# We need to remove any files that the above tests created.  Where 
configuration
+# failed, `config.log' will exist in the absence of `Makefile'.
 clean-local-legacy:
        -cd tests; \
        for dir in cdemo demo depdemo f77demo fcdemo mdemo mdemo2 pdemo 
tagdemo; \
        do \
            test -f $$dir/Makefile && ( cd $$dir && $(MAKE) distclean; ); \
+           rm -f $$dir/config.log; \
        done
        rm -rf _inst
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]