77 lines
1.6 KiB
Bash
Executable File
77 lines
1.6 KiB
Bash
Executable File
#! /bin/sh
|
|
# Copyright (C) 2002, 2003 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/>.
|
|
|
|
# Test to make sure Automake supports multiple derivations for the same suffix.
|
|
# PR/37
|
|
|
|
required='gcc libtoolize'
|
|
. ./defs || Exit 1
|
|
|
|
set -e
|
|
|
|
cat >>configure.in <<'END'
|
|
AM_PROG_LIBTOOL
|
|
AC_OUTPUT
|
|
END
|
|
|
|
cat >Makefile.am << 'END'
|
|
bin_PROGRAMS = foo
|
|
lib_LTLIBRARIES = libfoo.la
|
|
|
|
foo_SOURCES = foo.x_
|
|
libfoo_la_SOURCES = bar.x_
|
|
|
|
.x_.y_:
|
|
cp $< $@
|
|
|
|
.y_.o:
|
|
cp $< $@
|
|
|
|
.y_.z_:
|
|
cp $< $@
|
|
|
|
.z_.lo:
|
|
cp $< $@
|
|
|
|
# Add explicit dependencies to help make implementations that
|
|
# don't otherwise chain implicit rules (e.g., Sun make).
|
|
foo.$(OBJEXT): foo.y_
|
|
bar.lo: bar.z_
|
|
bar.z_: bar.y_
|
|
|
|
print:
|
|
@echo BEGIN: $(foo_OBJECTS) :END
|
|
@echo BEGIN: $(libfoo_la_OBJECTS) :END
|
|
|
|
test: $(foo_OBJECTS) $(libfoo_la_OBJECTS)
|
|
test -f foo.$(OBJEXT)
|
|
test -f bar.lo
|
|
END
|
|
|
|
echo 'int main() { return 0; }' > foo.x_
|
|
cp foo.x_ bar.x_
|
|
|
|
libtoolize
|
|
$ACLOCAL
|
|
$AUTOCONF
|
|
$AUTOMAKE -a
|
|
./configure
|
|
env OBJEXT=foo $MAKE -e print >stdout
|
|
cat stdout
|
|
grep 'BEGIN: foo.foo :END' stdout
|
|
grep 'BEGIN: bar.lo :END' stdout
|
|
$MAKE test
|