Re: distchecking without FC?

2007-06-14 Thread Bob Friesenhahn

On Thu, 14 Jun 2007, Noah Misch wrote:


`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?


Normally I would be more in favor of narrowing the scope of management 
to as close to the file as possible.  However, an order of magnitude 
speed improvement sounds great to me and the tests directories have 
certainly been burdensome.  Presumably there is a substantial speed 
improvement while bootstrapping and configuring the project as well.


Bob
==
Bob Friesenhahn
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/





Re: distchecking without FC?

2007-06-14 Thread Noah Misch
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 <[EMAIL PROTECTED]>:
> > >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/msg2.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  <[EMAIL PROTECTED]>

* 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.0 -0500
+++ lt-fdist/configure.ac   2007-06-14 18:09:27.0 -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.am2007-06-14 12:37:28.0 -0400
+++ lt-fdist/Makefile.am2007-06-14 19:34:03.0 -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)
[EMAIL PROTECTED]@:
-   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   

Re: [patch] win32: eliminate wrapper script in main build dir

2007-06-14 Thread Noah Misch
Hi Charles,

Overall, the patch looks suitable.  Some minor comments:

On Sun, Jun 10, 2007 at 02:23:58PM -0400, Charles Wilson wrote:
> 2007-04-22  Charles Wilson  <[EMAIL PROTECTED]>
> 
>   * libltdl/config/ltmain.m4sh (func_ltwrapper_script_p):
>   new function detects if $1 is a libtool sh wrapper

See `info standards doc change' for change log style information.  The sentence
after the colon begins with a capital letter and ends with a period.  It is
enough to write "New function." when that is the case.

> --- libltdl/config/ltmain.m4sh9 Jun 2007 17:46:40 -   1.79
> +++ libltdl/config/ltmain.m4sh10 Jun 2007 07:22:05 -
> @@ -661,13 +661,61 @@
>  test "$lalib_p" = yes
>  }
>  
> +# func_ltwrapper_script_p file
> +# True iff FILE is a libtool wrapper script
> +# This function is only a basic sanity check; it will hardly flush out
> +# determined imposters.
> +func_ltwrapper_script_p ()
> +{
> +func_lalib_p "$1"
> +}
> +
> +# func_ltwrapper_executable_p file
> +# True iff FILE is a libtool wrapper executable
> +# This function is only a basic sanity check; it will hardly flush out
> +# determined imposters.
> +func_ltwrapper_executable_p ()
> +{
> +func_ltwrapper_executable_p_result=no
> +if ! func_ltwrapper_script_p "$1" ; then

The `!' operator is not portable; use `if X; then :; else'.  You could instead
add a different magic string to executables, avoiding two forks for this test.

> +  case "$1" in
> +*.exe ) if grep "$magic" "$1" >/dev/null ; then
> +func_ltwrapper_executable_p_result=yes
> +fi ;;
> +* ) if grep "$magic" "${1}.exe" >/dev/null ; then
> +func_ltwrapper_executable_p_result=yes
> +fi ;;
> +  esac
> +fi
> +test "$func_ltwrapper_executable_p_result" = "yes"
> +}
> +
> +# func_ltwrapper_temp_scriptname file
> +# Assumes file is an ltwrapper_executable
> +# uses $file to determine the appropriate filename for a
> +# temporary ltwrapper_script.
> +func_ltwrapper_temp_scriptname ()
> +{
> +func_ltwrapper_temp_scriptname_result=""
> +if func_ltwrapper_executable_p "$1"; then
> +func_dirname "$1"
> +func_basename "$1"
> +func_stripname '' '.exe' "$func_basename_result"
> + if test -z "$func_dirname_result"; then
> +  
> func_ltwrapper_temp_scriptname_result="./$objdir/${func_stripname_result}_ltshwrapperTMP"
> +else
> +  
> func_ltwrapper_temp_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapperTMP"
> +fi
> +fi 

Trim trailing white space from this line.

> +}
> +
>  # func_ltwrapper_p file
> -# True iff FILE is a libtool wrapper script.
> +# True iff FILE is a libtool wrapper script or wrapper executable
>  # This function is only a basic sanity check; it will hardly flush out
>  # determined imposters.
>  func_ltwrapper_p ()
>  {
> -func_lalib_p "$1"
> +func_ltwrapper_script_p "$1" || func_ltwrapper_execuable_p "$1"
>  }
>  
>  
> @@ -1649,11 +1697,17 @@
>-*) ;;
>*)
>   # Do a test to see if this is really a libtool program.
> - if func_ltwrapper_p "$file"; then
> -   func_source "$file"
> -
> + if func_ltwrapper_script_p "$file"; then
> +  func_source "$file"
> # Transform arg to wrapped name.
> file="$progdir/$program"
> +else
> +  if func_ltwrapper_executable_p "$file"; then

Use `elif'.

> +func_ltwrapper_temp_scriptname "$file"
> + func_source "$func_ltwrapper_temp_scriptname_result"
> + # Transform arg to wrapped name.
> + file="$progdir/$program"
> +  fi
>   fi

Place `file="$progdir/$program"' here, rather than keeping a copy in each branch
of the control flow.

> @@ -2561,6 +2620,7 @@
>char *tmp_pathspec;
>char *actual_cwrapper_path;
>char *shwrapper_name;
> +  intptr_t rval = 127;

Do all interesting versions of Cygwin and MinGW have intptr_t?

> @@ -6717,19 +6791,30 @@
>  
>   func_emit_libtool_cwrapperexe_source > $cwrappersource
>  
> -   # we should really use a build-platform specific compiler
> -   # here, but OTOH, the wrappers (shell script and this C one)
> -   # are only useful if you want to execute the "real" binary.
> -   # Since the "real" binary is built for $host, then this
> -   # wrapper might as well be built for $host, too.
> -   $opt_dry_run || $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
> + # we should really use a build-platform specific compiler
> + # here, but OTOH, the wrappers (shell script and this C one)
> + # are only useful if you want to execute the "real" binary.
> + # Since the "real" binary is built for $host, then this
> + # wrapper might as well be built for $host, too.
> + $opt_dry_run || $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource

As far as I can see, this

Re: distchecking without FC?

2007-06-14 Thread Noah Misch
On Thu, Jun 14, 2007 at 02:52:45PM +0200, Benoit Sigoure wrote:
> Quoting Noah Misch <[EMAIL PROTECTED]>:
> >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/msg2.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.




Re: distchecking without FC?

2007-06-14 Thread Benoit Sigoure

Quoting Noah Misch <[EMAIL PROTECTED]>:


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/msg2.html



Thanks for the pointer,
my working copy has (only) these changes:

$ cvs diff -u
Index: Makefile.am
===
RCS file: /sources/libtool/libtool/Makefile.am,v
retrieving revision 1.221
diff -u -r1.221 Makefile.am
--- Makefile.am 4 Jun 2007 03:01:10 -   1.221
+++ Makefile.am 14 Jun 2007 12:47:53 -
@@ -109,7 +109,7 @@
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
+   (cd $$dir && $$abs_srcdir/$$dir/configure --with-dist) || exit 1


 # -- #
Index: tests/fcdemo/configure.ac
===
RCS file: /sources/libtool/libtool/tests/fcdemo/configure.ac,v
retrieving revision 1.4
diff -u -r1.4 configure.ac
--- tests/fcdemo/configure.ac   25 Mar 2007 12:12:43 -  1.4
+++ tests/fcdemo/configure.ac   14 Jun 2007 12:47:53 -
@@ -31,6 +31,9 @@
 AC_CONFIG_SRCDIR([foof.f90])
 AC_CONFIG_AUX_DIR([../../libltdl/config])

+AC_ARG_WITH([dist], AS_HELP_STRING([--with-dist],
+  [ignore errors not affecting `make dist']))
+
 ##  ##
 ## Automake Initialisation. ##
 ##  ##
@@ -53,7 +56,11 @@
 AC_FC_WRAPPERS
 dnl We need to use .f90 and not .f to enable Automake FC support
 dnl Some Intel ifc/ifort do not understand .f95.  :-/
-AC_FC_SRCEXT([f90])
+dnl When configuring for `make dist' purposes, skip this check, as it  
yields a

+dnl fatal error when there is no working F90 compiler.
+if test -z "$with_dist"; then
+  AC_FC_SRCEXT([f90])
+fi
 dnl Yes, we want free form Fortran!
 AC_FC_FREEFORM
 AC_LANG_POP


But I still get:
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking how to get verbose linking output from ... configure:  
WARNING: compilation failed


checking for Fortran 77 libraries of ...
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... configure: error:  
cannot compile a simple Fortran program

See `config.log' for more details.
make: *** [tests/f77demo/Makefile] Error 1

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory


This message was sent using IMP, the Internet Messaging Program.






Re: distchecking without FC?

2007-06-14 Thread Noah Misch
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/msg2.html




distchecking without FC?

2007-06-14 Thread Benoit Sigoure

Hello,
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.


--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory


This message was sent using IMP, the Internet Messaging Program.