#! /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 dependencies work with Lex/C++.
# Test synthesized from PR automake/6.
-required=lex
-. ./defs || Exit 1
+required='c++ lex'
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
.PHONY: test-obj-updated
test-obj-updated: joe.$(OBJEXT) moe.$(OBJEXT)
- stat older my-hdr.hxx joe.$(OBJEXT) moe.$(OBJEXT) || :
- test `ls -t older joe.$(OBJEXT) | sed 1q` = joe.$(OBJEXT)
- test `ls -t older moe.$(OBJEXT) | sed 1q` = moe.$(OBJEXT)
+ is_newest joe.$(OBJEXT) my-hdr.hxx
+ is_newest moe.$(OBJEXT) my-hdr.hxx
END
cat > joe.ll << 'END'
}
int main (int argc, char **argv)
{
- printf("Hello, World!\n");
return 0;
}
END
cp joe.ll moe.l++
cat > my-hdr.hxx <<'END'
-// This header contains deliberetly invalid C (but valid C++)
-#include <cstdio>
+// This header contains deliberately invalid C (but valid C++).
using namespace std;
END
$MAKE test-deps-exist
$MAKE
-: > older
$sleep
touch my-hdr.hxx
$MAKE test-obj-updated