#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 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
# Test to make sure automatic dependency tracking work with Lex/C.
# Test suggested by PR automake/6.
-required=lex
-. ./defs || Exit 1
+required='cc lex'
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
.PHONY: test-obj-updated
test-obj-updated: joe.$(OBJEXT)
- stat older my-hdr.h joe.$(OBJEXT) || : For debugging.
- test `ls -t older joe.$(OBJEXT) | sed 1q` = joe.$(OBJEXT)
+ is_newest joe.$(OBJEXT) my-hdr.h
END
cat > joe.l << 'END'
$MAKE test-deps-exist
$MAKE
+cross_compiling || test "$(./zoo)" = 'Hello, World!' || exit 1
-: > older
$sleep
-touch my-hdr.h
+cat >> my-hdr.h << 'END'
+#undef MESSAGE
+#define MESSAGE "Howdy, Earth!"
+END
$MAKE test-obj-updated
+$MAKE
+cross_compiling || test "$(./zoo)" = 'Howdy, Earth!' || exit 1
: