source: trunk/essentials/sys-devel/automake-1.7/tests/asm.test

Last change on this file was 3120, checked in by bird, 18 years ago

automake 1.7.9

File size: 2.6 KB
Line 
1#! /bin/sh
2# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
3#
4# This file is part of GNU Automake.
5#
6# GNU Automake is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2, or (at your option)
9# any later version.
10#
11# GNU Automake is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with autoconf; see the file COPYING. If not, write to
18# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19# Boston, MA 02111-1307, USA.
20
21# Test of basic assembly functionality
22
23. ./defs || exit 1
24
25set -e
26
27cat > Makefile.am << 'END'
28noinst_PROGRAMS = maude
29maude_SOURCES = maude.s
30END
31
32: > maude.s
33
34# Should fail because we need CC and CCAS.
35echo 1
36cat > configure.in << 'END'
37AC_INIT
38AM_INIT_AUTOMAKE(nonesuch, nonesuch)
39AC_SUBST(CCASFLAGS)
40AC_OUTPUT(Makefile)
41END
42
43$ACLOCAL
44$AUTOMAKE 2>stderr && exit 1
45cat stderr
46grep AM_PROG_AS stderr
47
48# On fast machines the autom4te.cache created during the above run of
49# $AUTOMAKE is likely to have the same time stamp as the configure.in
50# created below; thus causing traces for the old configure.in to be
51# used. We could do `$sleep', but it's faster to erase the
52# directory. (Erase autom4te*.cache, not autom4te.cache, because some
53# bogus installations of Autoconf use a versioned cache.)
54rm -rf autom4te*.cache
55
56# We still need CCAS.
57echo 2
58cat > configure.in << 'END'
59AC_INIT
60AM_INIT_AUTOMAKE(nonesuch, nonesuch)
61AC_PROG_CC
62AC_SUBST(CCASFLAGS)
63AC_OUTPUT(Makefile)
64END
65
66$ACLOCAL
67$AUTOMAKE 2>stderr && exit 1
68cat stderr
69grep CCAS stderr
70grep AM_PROG_AS stderr
71
72rm -rf autom4te*.cache
73
74# We need CCASFLAGS.
75echo 3
76cat > configure.in << 'END'
77AC_INIT
78AM_INIT_AUTOMAKE(nonesuch, nonesuch)
79CCAS='$(CC)'
80AC_SUBST(CCAS)
81AC_PROG_CC
82AC_OUTPUT(Makefile)
83END
84
85$ACLOCAL
86$AUTOMAKE 2>stderr && exit 1
87cat stderr
88grep CCASFLAGS stderr
89grep AM_PROG_AS stderr
90
91rm -rf autom4te*.cache
92
93# We have every needed, expect a success.
94echo 4
95cat > configure.in << 'END'
96AC_INIT
97AM_INIT_AUTOMAKE(nonesuch, nonesuch)
98CCAS='$(CC)'
99AC_SUBST(CCAS)
100AC_PROG_CC
101AC_SUBST(CCASFLAGS)
102AC_OUTPUT(Makefile)
103END
104
105$ACLOCAL
106$AUTOMAKE
107
108rm -rf autom4te*.cache
109
110# We have every needed, expect a success.
111echo 5
112cat > configure.in << 'END'
113AC_INIT
114AM_INIT_AUTOMAKE(nonesuch, nonesuch)
115AM_PROG_AS
116AC_OUTPUT(Makefile)
117END
118
119$ACLOCAL
120$AUTOMAKE
121
122exit 0
Note: See TracBrowser for help on using the repository browser.