"Fossies" - the Fresh Open Source Software Archive

Member "automake-1.16.3/t/vala-non-recursive-setup.sh" (19 Nov 2020, 2001 Bytes) of package /linux/misc/automake-1.16.3.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "vala-non-recursive-setup.sh": 1.16.2_vs_1.16.3.

    1 #! /bin/sh
    2 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
    3 #
    4 # This program is free software; you can redistribute it and/or modify
    5 # it under the terms of the GNU General Public License as published by
    6 # the Free Software Foundation; either version 2, or (at your option)
    7 # any later version.
    8 #
    9 # This program is distributed in the hope that it will be useful,
   10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
   11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   12 # GNU General Public License for more details.
   13 #
   14 # You should have received a copy of the GNU General Public License
   15 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
   16 
   17 # Test to make sure compiling Vala code really works with non-recursive make.
   18 
   19 required="pkg-config valac gcc GNUmake"
   20 . test-init.sh
   21 
   22 mkdir src
   23 
   24 cat >> 'configure.ac' << 'END'
   25 AC_PROG_CC
   26 AM_PROG_VALAC([0.7.0])
   27 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
   28 AC_OUTPUT
   29 END
   30 
   31 cat > 'src/zardoz.vala' <<'END'
   32 using GLib;
   33 
   34 public class Zardoz {
   35   public static void main () {
   36     stdout.printf ("Zardoz!\n");
   37   }
   38 }
   39 END
   40 
   41 cat > 'Makefile.am' <<'END'
   42 AUTOMAKE_OPTIONS = subdir-objects
   43 bin_PROGRAMS = src/zardoz
   44 src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
   45 src_zardoz_LDADD = $(GOBJECT_LIBS)
   46 src_zardoz_SOURCES = src/zardoz.vala
   47 END
   48 
   49 $ACLOCAL
   50 $AUTOCONF
   51 $AUTOMAKE -a
   52 
   53 ./configure
   54 $MAKE
   55 test -f src/zardoz.c
   56 test -f src_zardoz_vala.stamp
   57 $MAKE distcheck
   58 $MAKE maintainer-clean
   59 test ! -e src/zardoz.c
   60 test ! -e src_zardoz_vala.stamp
   61 
   62 mkdir build
   63 cd build
   64 ../configure
   65 $MAKE
   66 $MAKE distcheck
   67 
   68 cd ..
   69 rm -rf build
   70 
   71 # Try again with subdir-objects.
   72 
   73 cat > 'Makefile.am' <<'END'
   74 AUTOMAKE_OPTIONS = subdir-objects
   75 
   76 bin_PROGRAMS = src/zardoz
   77 src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
   78 src_zardoz_LDADD = $(GOBJECT_LIBS)
   79 src_zardoz_SOURCES = src/zardoz.vala
   80 END
   81 
   82 $ACLOCAL
   83 $AUTOCONF
   84 $AUTOMAKE -a
   85 
   86 ./configure || skip_ "configure failure"
   87 $MAKE
   88 $MAKE distcheck
   89 $MAKE maintainer-clean
   90 
   91 mkdir build
   92 cd build
   93 ../configure
   94 $MAKE
   95 $MAKE distcheck