automake-commit
[Top][All Lists]
Advanced

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

[automake-commit] branch master updated: vala: improve support, especial


From: Karl Berry
Subject: [automake-commit] branch master updated: vala: improve support, especially builddir vs. srcdir.
Date: Sat, 07 Nov 2020 21:45:07 -0500

This is an automated email from the git hooks/post-receive script.

karl pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=782ac4008559afe5adceac5dcd7d8614dc5689af

The following commit(s) were added to refs/heads/master by this push:
     new 782ac40  vala: improve support, especially builddir vs. srcdir.
782ac40 is described below

commit 782ac4008559afe5adceac5dcd7d8614dc5689af
Author: Reuben Thomas <rrt@sc3d.org>
AuthorDate: Sat Nov 7 18:44:56 2020 -0800

    vala: improve support, especially builddir vs. srcdir.
    
    This change fixes https://bugs.gnu.org/13002.
    
    * NEWS: mention these changes.
    * bin/automake.in: generated C files go in builddir, not srcdir.
    Distribute the header files generated from VAPI files.
    * t/vala-libs-distcheck.sh: new test for `make distcheck' of a
    Vala library.
    * t/vala-libs-vpath.sh: new test for a VPATH build of a Vala library.
    * t/vala-libs.sh: add local VAPIs used as external --package to test.
    
    * t/vala-recursive-setup.sh: we need to make
    maintainer-clean at one point to remove stamp files to avoid
    confusing a VPATH build performed after a non-VPATH build.
    * t/vala-non-recursive-setup.sh: likewise.
    
    * t/vala-parallel.sh: some test paths need changing to take into
    account that generated C files now go in builddir.
    * t/vala-per-target-flags.sh: likewise.
    * t/vala-recursive-setup.sh: likewise.
    * t/vala-vpath.sh: likewise.
---
 NEWS                                   |   6 +
 bin/automake.in                        |  44 ++++++--
 t/vala-libs-distcheck.sh               | 193 +++++++++++++++++++++++++++++++++
 t/{vala-libs.sh => vala-libs-vpath.sh} |  98 +++++++++--------
 t/vala-libs.sh                         |  49 +++++----
 t/vala-non-recursive-setup.sh          |   3 +-
 t/vala-parallel.sh                     |   4 +-
 t/vala-per-target-flags.sh             |   4 +-
 t/vala-recursive-setup.sh              |  18 +--
 t/vala-vpath.sh                        |  33 +++---
 10 files changed, 344 insertions(+), 108 deletions(-)

diff --git a/NEWS b/NEWS
index 9c69e48..010cd37 100644
--- a/NEWS
+++ b/NEWS
@@ -81,6 +81,10 @@ New in ?.?.?:
 
   - valac argument matching more precise, to avoid garbage in DIST_COMMON.
 
+  - Support for Vala in VPATH builds fixed so that both freshly-generated and
+    distributed C files work, and operation is more reliable with or without
+    an installed valac.
+
 * Distribution
 
   - new variable AM_DISTCHECK_DVI_TARGET, to allow overriding the
@@ -91,6 +95,8 @@ New in ?.?.?:
   - Removed function up_to_date_p in lib/Automake/FileUtils.pm.
     We believe this function is completely unused.
 
+  - Support for in-tree Vala libraries improved.
+
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 New in 1.16.2:
diff --git a/bin/automake.in b/bin/automake.in
index a88b835..31c7238 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -5730,13 +5730,18 @@ sub lang_vala_finish_target
       my $c_file = $vala_file;
       if ($c_file =~ s/(.*)\.vala$/$1.c/)
         {
-          $c_file = "\$(srcdir)/$c_file";
-          $output_rules .= "$c_file: \$(srcdir)/${derived}_vala.stamp\n"
-            . "\t\@if test -f \$@; then :; else rm -f 
\$(srcdir)/${derived}_vala.stamp; fi\n"
+          my $built_c_file = "\$(builddir)/$c_file";
+          my $built_dir = dirname $built_c_file;
+          my $base_c_file = basename $c_file;
+          $output_rules .= "$built_c_file: 
\$(builddir)/${derived}_vala.stamp\n"
+            . "\t\@if test ! -f \$@ && test \$(srcdir) != \$(builddir) && test 
-n \"\$\$(find -L \$(srcdir)/$c_file -prune -newer \$(srcdir)/$vala_file)\"; 
then cp -p \$(srcdir)/$c_file $built_c_file; fi\n"
+            . "\t\@if test -f \$@; then :; else rm -f 
\$(builddir)/${derived}_vala.stamp; fi\n"
             . "\t\@if test -f \$@; then :; else \\\n"
-            . "\t  \$(MAKE) \$(AM_MAKEFLAGS) \$(srcdir)/${derived}_vala.stamp; 
\\\n"
+            . "\t  \$(MAKE) \$(AM_MAKEFLAGS) 
\$(builddir)/${derived}_vala.stamp; \\\n"
+            . "\t  if test $built_dir != .; then mv $base_c_file $built_dir/; 
fi \\\n"
             . "\tfi\n";
-         $clean_files{$c_file} = MAINTAINER_CLEAN;
+         $clean_files{$built_c_file} = DIST_CLEAN;
+         $clean_files{"\$(srcdir)/$c_file"} = MAINTAINER_CLEAN;
         }
     }
 
@@ -5750,11 +5755,11 @@ sub lang_vala_finish_target
          if (grep (/^$lastflag$/, ('-H', '-h', '--header', '--internal-header',
                                    '--vapi', '--internal-vapi', '--gir')))
            {
-             my $headerfile = "\$(srcdir)/$flag";
-             $output_rules .= "$headerfile: \$(srcdir)/${derived}_vala.stamp\n"
-               . "\t\@if test -f \$@; then :; else rm -f 
\$(srcdir)/${derived}_vala.stamp; fi\n"
+             my $headerfile = "\$(builddir)/$flag";
+             $output_rules .= "$headerfile: 
\$(builddir)/${derived}_vala.stamp\n"
+               . "\t\@if test -f \$@; then :; else rm -f 
\$(builddir)/${derived}_vala.stamp; fi\n"
                . "\t\@if test -f \$@; then :; else \\\n"
-               . "\t  \$(MAKE) \$(AM_MAKEFLAGS) 
\$(srcdir)/${derived}_vala.stamp; \\\n"
+               . "\t  \$(MAKE) \$(AM_MAKEFLAGS) 
\$(builddir)/${derived}_vala.stamp; \\\n"
                . "\tfi\n";
 
              # valac is not used when building from dist tarballs
@@ -5762,6 +5767,21 @@ sub lang_vala_finish_target
              push_dist_common ($headerfile);
              $clean_files{$headerfile} = MAINTAINER_CLEAN;
            }
+         if (grep (/$lastflag/, ('--library')))
+           {
+             my $headerfile = "\$(builddir)/$flag";
+             $output_rules .= "$headerfile.vapi: 
\$(builddir)/${derived}_vala.stamp\n"
+               . "\t\@if test -f \$@; then :; else rm -f 
\$(builddir)/${derived}_vala.stamp; fi\n"
+               . "\t\@if test -f \$@; then :; else \\\n"
+               . "\t  \$(MAKE) \$(AM_MAKEFLAGS) 
\$(builddir)/${derived}_vala.stamp; \\\n"
+               . "\tfi\n";
+
+             # valac is not used when building from dist tarballs
+             # distribute the generated files
+             my $vapi = "$headerfile.vapi";
+             push_dist_common ($vapi);
+             $clean_files{$headerfile.'.vapi'} = MAINTAINER_CLEAN;
+           }
          $lastflag = $flag;
        }
     }
@@ -5785,10 +5805,10 @@ sub lang_vala_finish_target
 
   my $verbose = verbose_flag ('VALAC');
   my $silent = silent_flag ();
-  my $stampfile = "\$(srcdir)/${derived}_vala.stamp";
+  my $stampfile = "\$(builddir)/${derived}_vala.stamp";
 
   $output_rules .=
-    "\$(srcdir)/${derived}_vala.stamp: @vala_sources\n".
+    "\$(builddir)/${derived}_vala.stamp: @vala_sources\n".
 # Since the C files generated from the vala sources depend on the
 # ${derived}_vala.stamp file, we must ensure its timestamp is older than
 # those of the C files generated by the valac invocation below (this is
@@ -5796,7 +5816,7 @@ sub lang_vala_finish_target
 # Thus we need to create the stamp file *before* invoking valac, and to
 # move it to its final location only after valac has been invoked.
     "\t${silent}rm -f \$\@ && echo stamp > \$\@-t\n".
-    "\t${verbose}\$(am__cd) \$(srcdir) && $compile @vala_sources\n".
+    "\t${verbose}$compile \$^\n".
     "\t${silent}mv -f \$\@-t \$\@\n";
 
   push_dist_common ($stampfile);
diff --git a/t/vala-libs-distcheck.sh b/t/vala-libs-distcheck.sh
new file mode 100644
index 0000000..a12c8d4
--- /dev/null
+++ b/t/vala-libs-distcheck.sh
@@ -0,0 +1,193 @@
+#! /bin/sh
+# Copyright (C) 2012-2020 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Building libraries (libtool and static) from Vala sources.
+# And use of vapi files to call C code from Vala.
+
+required="valac cc pkg-config libtoolize GNUmake"
+am_create_testdir=empty
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_INIT([atest],[0.1])
+AC_CONFIG_SRCDIR([data/atest.pc.in])
+AC_SUBST([API_VERSION],[0])
+
+AM_INIT_AUTOMAKE
+AM_MAINTAINER_MODE([enable])
+AM_PROG_AR
+LT_INIT
+
+AC_PROG_CC
+AC_PROG_INSTALL
+PKG_PROG_PKG_CONFIG([0.22])
+AM_PROG_VALAC([0.32])
+
+PKG_CHECK_MODULES(ATEST, [gio-2.0])
+
+AC_CONFIG_FILES([
+       Makefile
+
+       src/Makefile
+
+       src/atest-$API_VERSION.deps:src/atest.deps.in
+
+       data/Makefile
+       data/atest-$API_VERSION.pc:data/atest.pc.in
+
+],[],
+[API_VERSION='$API_VERSION'])
+AC_OUTPUT
+END
+
+
+cat > Makefile.am << 'END'
+SUBDIRS=data src
+END
+
+mkdir data
+
+cat > data/atest.pc.in << 'END'
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+datarootdir=@datarootdir@
+datadir=@datadir@
+includedir=@includedir@
+
+Name: atest-@API_VERSION@
+Description: atest library
+Version: @VERSION@
+Requires: glib-2.0 gobject-2.0
+Libs: -L${libdir} -latest-@API_VERSION@
+Cflags: -I${includedir}/atest-@API_VERSION@
+END
+
+
+cat > data/Makefile.am << 'END'
+# pkg-config data
+# Note that the template file is called atest.pc.in, but generates a
+# versioned .pc file using some magic in AC_CONFIG_FILES.
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = atest-$(API_VERSION).pc
+
+DISTCLEANFILES = $(pkgconfig_DATA)
+EXTRA_DIST = atest.pc.in
+END
+
+mkdir src
+
+cat > src/atest.deps.in << 'END'
+glib-2.0
+END
+
+
+cat > src/atest.vala << 'END'
+using GLib;
+
+namespace Atest {
+       public class A {
+               public bool foo() { return false; }
+       }
+}
+END
+
+cat > src/Makefile.am << 'END'
+lib_LTLIBRARIES = libatest-@API_VERSION@.la
+
+libatest_@API_VERSION@_la_SOURCES = \
+       atest.vala \
+       cservice.c \
+       cservice.h \
+       $(NULL)
+
+
+libatest_@API_VERSION@_la_CPPFLAGS = \
+       -DOKOKIMDEFINED=1 \
+       $(NULL)
+
+libatest_@API_VERSION@_la_CFLAGS = \
+       $(ATEST_CFLAGS) \
+       $(WARN_CFLAGS) \
+       $(NULL)
+
+libatest_@API_VERSION@_la_LIBADD = \
+       $(ATEST_LIBS) \
+       $(NULL)
+
+libatest_@API_VERSION@_la_LDFLAGS = \
+       $(WARN_LDFLAGS) \
+       $(NULL)
+
+libatest_@API_VERSION@_la_VALAFLAGS = \
+       --vapidir=$(VAPIDIR) \
+       --vapidir=$(srcdir) \
+       --pkg cservice \
+       --thread \
+       --target-glib=2.44 \
+       --pkg glib-2.0 \
+       -H atest.h \
+       --library atest-@API_VERSION@ \
+       $(NULL)
+
+header_DATA=atest.h
+headerdir=$(includedir)/atest-@API_VERSION@/atest
+
+atest-@API_VERSION@.deps:
+       cp atest.deps atest-@API_VERSION@.deps
+
+vapi_DATA=atest-@API_VERSION@.vapi atest-@API_VERSION@.deps
+vapidir=$(VAPIDIR)
+
+CLEANFILES = atest-@API_VERSION@.deps
+END
+
+
+cat > src/cservice.c << 'END'
+#include "cservice.h"
+int c_service_mu_call (void)
+{
+  return OKOKIMDEFINED;
+}
+END
+
+cat > src/cservice.h << 'END'
+int c_service_mu (void);
+END
+
+cat > src/cservice.vapi <<'END'
+namespace CService {
+  public class Mu {
+    [CCode (cheader_filename = "cservice.h", cname = "c_service_mu_call")]
+    public int call ();
+  }
+}
+END
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE
+test -f src/libatest_0_la_vala.stamp
+test -f src/libatest-0.la
+
+$MAKE distcheck
+
+:
diff --git a/t/vala-libs.sh b/t/vala-libs-vpath.sh
similarity index 50%
copy from t/vala-libs.sh
copy to t/vala-libs-vpath.sh
index 77d1971..73fbffd 100644
--- a/t/vala-libs.sh
+++ b/t/vala-libs-vpath.sh
@@ -12,36 +12,47 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Building libraries (libtool and static) from Vala sources.
 # And use of vapi files to call C code from Vala.
 
 required="valac cc pkg-config libtoolize GNUmake"
+am_create_testdir=empty
 . test-init.sh
 
 cat >> configure.ac << 'END'
-AC_PROG_CC
+AC_INIT([valalibs],[0.1])
+
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_INIT_AUTOMAKE
 AM_PROG_AR
-AC_PROG_RANLIB
-AC_PROG_LIBTOOL
+LT_INIT
+
+AC_PROG_CC
+
 AM_PROG_VALAC([0.7.3])
 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
+
+AC_CONFIG_FILES([Makefile src/Makefile])
 AC_OUTPUT
 END
 
+
 cat > Makefile.am << 'END'
+SUBDIRS=src
+END
+
+mkdir src
+
+cat > src/Makefile.am << 'END'
 AUTOMAKE_OPTIONS = subdir-objects
-lib_LIBRARIES = libmu.a
-lib_LTLIBRARIES = src/libzardoz.la
-libmu_a_SOURCES = mu.vala mu2.c mu.vapi mu2.h
-libmu_a_CPPFLAGS = -DOKOKIMDEFINED=1
-libmu_a_VALAFLAGS = --vapidir=$(srcdir)
+lib_LTLIBRARIES = libservice.la
+libservice_la_SOURCES = service.vala cservice.c cservice.h
+libservice_la_CPPFLAGS = -DOKOKIMDEFINED=1
+libservice_la_VALAFLAGS = --vapidir=$(srcdir) --pkg cservice --library service
 AM_CFLAGS = $(GOBJECT_CFLAGS)
-src_libzardoz_la_LIBADD = $(GOBJECT_LIBS)
-src_libzardoz_la_SOURCES = src/zardoz-foo.vala src/zardoz-bar.vala
-src/zardoz-bar.vala: src/zardoz-foo.vala
-       sed 's/Foo/Bar/g' $< >$@
 END
 
 libtoolize
@@ -49,52 +60,47 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure
-
-cat > mu2.c << 'END'
-#include "mu2.h"
-int mu2 (void)
+cat > src/cservice.c << 'END'
+#include "cservice.h"
+int c_service_mu_call (void)
 {
   return OKOKIMDEFINED;
 }
 END
 
-cat > mu2.h << 'END'
-int mu2 (void);
+cat > src/cservice.h << 'END'
+int c_service_mu (void);
 END
 
-cat > mu.vapi <<'END'
-[CCode (cheader_filename = "mu2.h", cname = "mu2")]
-public int c_mu2 ();
-END
-
-cat > mu.vala << 'END'
-int main ()
-{
-  stdout.printf ("mumumu\n");
-  return c_mu2 ();
+cat > src/cservice.vapi <<'END'
+namespace CService {
+  public class Mu {
+    [CCode (cheader_filename = "cservice.h", cname = "c_service_mu_call")]
+    public int call ();
+  }
 }
 END
 
-mkdir -p src
-cat > src/zardoz-foo.vala << 'END'
-using GLib;
-public class Foo {
-  public static void zap () {
-    stdout.printf ("FooFooFoo!\n");
-  }
+cat > src/service.vala << 'END'
+namespace CService {
+public class Generator : Object {
+       public Generator () {
+               stdout.printf ("construct generator");
+       }
+       public void init () {
+               stdout.printf ("init generator");
+       }
+}
 }
 END
 
+mkdir build
+cd build
+../configure
+
 $MAKE
-test -f libmu.a
-test -f src/libzardoz.la
-$FGREP "mumumu" mu.c
-$FGREP "FooFooFoo" src/zardoz-foo.c
-$FGREP "BarBarBar" src/zardoz-bar.c
-test -f libmu_a_vala.stamp
-test -f src_libzardoz_la_vala.stamp
-
-$MAKE distcheck
+pwd
+test -f src/libservice_la_vala.stamp
+test -f src/libservice.la
 
 :
diff --git a/t/vala-libs.sh b/t/vala-libs.sh
index 77d1971..9bd8a4a 100644
--- a/t/vala-libs.sh
+++ b/t/vala-libs.sh
@@ -32,11 +32,11 @@ END
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = subdir-objects
-lib_LIBRARIES = libmu.a
+lib_LIBRARIES = libservice.a
 lib_LTLIBRARIES = src/libzardoz.la
-libmu_a_SOURCES = mu.vala mu2.c mu.vapi mu2.h
-libmu_a_CPPFLAGS = -DOKOKIMDEFINED=1
-libmu_a_VALAFLAGS = --vapidir=$(srcdir)
+libservice_a_SOURCES = service.vala cservice.c cservice.h
+libservice_a_CPPFLAGS = -DOKOKIMDEFINED=1
+libservice_a_VALAFLAGS = --vapidir=$(srcdir) --pkg cservice --library service
 AM_CFLAGS = $(GOBJECT_CFLAGS)
 src_libzardoz_la_LIBADD = $(GOBJECT_LIBS)
 src_libzardoz_la_SOURCES = src/zardoz-foo.vala src/zardoz-bar.vala
@@ -51,28 +51,37 @@ $AUTOMAKE -a
 
 ./configure
 
-cat > mu2.c << 'END'
-#include "mu2.h"
-int mu2 (void)
+cat > cservice.c << 'END'
+#include "cservice.h"
+int c_service_mu_call (void)
 {
   return OKOKIMDEFINED;
 }
 END
 
-cat > mu2.h << 'END'
-int mu2 (void);
+cat > cservice.h << 'END'
+int c_service_mu (void);
 END
 
-cat > mu.vapi <<'END'
-[CCode (cheader_filename = "mu2.h", cname = "mu2")]
-public int c_mu2 ();
+cat > cservice.vapi <<'END'
+namespace CService {
+  public class Mu {
+    [CCode (cheader_filename = "cservice.h", cname = "c_service_mu_call")]
+    public int call ();
+  }
+}
 END
 
-cat > mu.vala << 'END'
-int main ()
-{
-  stdout.printf ("mumumu\n");
-  return c_mu2 ();
+cat > service.vala << 'END'
+namespace CService {
+public class Generator : Object {
+       public Generator () {
+               stdout.printf ("construct generator");
+       }
+       public void init () {
+               stdout.printf ("init generator");
+       }
+}
 }
 END
 
@@ -87,12 +96,12 @@ public class Foo {
 END
 
 $MAKE
-test -f libmu.a
+test -f libservice.a
 test -f src/libzardoz.la
-$FGREP "mumumu" mu.c
+$FGREP "construct generator" service.c
 $FGREP "FooFooFoo" src/zardoz-foo.c
 $FGREP "BarBarBar" src/zardoz-bar.c
-test -f libmu_a_vala.stamp
+test -f libservice_a_vala.stamp
 test -f src_libzardoz_la_vala.stamp
 
 $MAKE distcheck
diff --git a/t/vala-non-recursive-setup.sh b/t/vala-non-recursive-setup.sh
index 5fa18d4..8113e47 100644
--- a/t/vala-non-recursive-setup.sh
+++ b/t/vala-non-recursive-setup.sh
@@ -86,7 +86,8 @@ $AUTOMAKE -a
 ./configure || skip_ "configure failure"
 $MAKE
 $MAKE distcheck
-$MAKE distclean
+$MAKE maintainer-clean
+
 mkdir build
 cd build
 ../configure
diff --git a/t/vala-parallel.sh b/t/vala-parallel.sh
index 4f93f89..8c01255 100644
--- a/t/vala-parallel.sh
+++ b/t/vala-parallel.sh
@@ -64,8 +64,8 @@ cd build
 ../configure
 $MAKE -j6
 ls -l . .. # For debugging.
-for x in main 1 2 3 4 5 6; do test -f ../$x.c; done
-test -f ../zardoz_vala.stamp
+for x in main 1 2 3 4 5 6; do test -f $x.c; done
+test -f ./zardoz_vala.stamp
 
 $MAKE distcheck -j4
 
diff --git a/t/vala-per-target-flags.sh b/t/vala-per-target-flags.sh
index 715ed77..e37fe60 100644
--- a/t/vala-per-target-flags.sh
+++ b/t/vala-per-target-flags.sh
@@ -86,8 +86,8 @@ test -f src/xfoo.c
 test -f src/xbar.c
 
 $MAKE distclean
-test -f src/xfoo.c
-test -f src/xbar.c
+test ! -e src/xfoo.c
+test ! -e src/xbar.c
 
 # Re-create Makefile.
 mv config.sav config.status
diff --git a/t/vala-recursive-setup.sh b/t/vala-recursive-setup.sh
index 40b8701..808f5b9 100644
--- a/t/vala-recursive-setup.sh
+++ b/t/vala-recursive-setup.sh
@@ -77,9 +77,9 @@ grep 'am--error' src/zardoz.[ch] && exit 1
 # Check the distribution.
 
 $MAKE distcheck
-$MAKE distclean
+$MAKE maintainer-clean
 
-# Tru a VPATH setup.
+# Try a VPATH setup.
 
 mkdir build
 cd build
@@ -89,19 +89,19 @@ $MAKE distcheck
 
 # Test rebuild rules from builddir.
 
-rm -f ../src/zardoz.h
-$MAKE -C src ../../src/zardoz.h
-test -f ../src/zardoz.h
+rm src/zardoz.h
+$MAKE -C src zardoz.h
+test -f src/zardoz.h
 
-rm -f ../src/zardoz.c
+rm -f src/zardoz.c
 $MAKE
-grep 'Zardoz!' ../src/zardoz.c
+grep 'Zardoz!' src/zardoz.c
 
 $sleep
 sed 's/Zardoz!/FooBar!/' ../src/zardoz.vala > t
 mv -f t ../src/zardoz.vala
 $MAKE
-grep 'FooBar!' ../src/zardoz.c
-grep 'Zardoz!' ../src/zardoz.c && exit 1
+grep 'FooBar!' src/zardoz.c
+grep 'Zardoz!' src/zardoz.c && exit 1
 
 :
diff --git a/t/vala-vpath.sh b/t/vala-vpath.sh
index bc10ab9..d3d0ff1 100644
--- a/t/vala-vpath.sh
+++ b/t/vala-vpath.sh
@@ -47,16 +47,16 @@ cp hello.vala goodbye.vala
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
 
 mkdir build
 cd build
 ../configure
 $MAKE
-test -f ../foo_vala.stamp
-test -f ../bar_vala.stamp
-grep foofoofoo ../hello.c
-test -f ../zardoz.h
+test -f ./foo_vala.stamp
+test -f ./bar_vala.stamp
+grep foofoofoo ./hello.c
+test -f ./zardoz.h
 $MAKE distcheck
 
 # Rebuild rules work also in VPATH builds.
@@ -70,9 +70,10 @@ int main ()
 END
 
 $MAKE
-test -f ../foo_vala.stamp
-test -f ../bar_vala.stamp
-grep barbarbar ../hello.c
+test -f ./foo_vala.stamp
+test -f ./bar_vala.stamp
+grep barbarbar ./hello.c
+$MAKE distcheck
 
 # Rebuild rules are not uselessly triggered.
 $MAKE -q
@@ -80,14 +81,14 @@ $MAKE -n | grep '\.stamp' && exit 1
 
 # Cleanup rules work also in VPATH builds.
 $MAKE clean
-test -f ../foo_vala.stamp
-test -f ../bar_vala.stamp
-test -f ../zardoz.h
-test -f ../hello.c
+test -f ./foo_vala.stamp
+test -f ./bar_vala.stamp
+test -f ./zardoz.h
+test -f ./hello.c
 $MAKE maintainer-clean
-test ! -e ../zardoz.h
-test ! -e ../hello.c
-test ! -e ../foo_vala.stamp
-test ! -e ../bar_vala.stamp
+test ! -e ./zardoz.h
+test ! -e ./hello.c
+test ! -e ./foo_vala.stamp
+test ! -e ./bar_vala.stamp
 
 :



reply via email to

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