summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>1996-11-08 22:57:04 +0000
committerTom Tromey <tromey@redhat.com>1996-11-08 22:57:04 +0000
commitc7f27ed5f5e40f768876c63d6380795c4436e935 (patch)
tree6fb294dc002a1919f30cd58cb0fbcf9c86083ad8
parent637af7c25f2afd3f6809d61ac13c7f2e90b3faea (diff)
downloadautomake-c7f27ed5f5e40f768876c63d6380795c4436e935.tar.gz
Added sanity check macro
-rw-r--r--ChangeLog4
-rw-r--r--m4/Makefile.am2
-rw-r--r--m4/Makefile.in17
-rw-r--r--m4/init.m41
-rw-r--r--m4/sanity.m419
5 files changed, 34 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index d281a33c9..ed65fd36a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
Fri Nov 8 09:49:09 1996 Tom Tromey <tromey@cygnus.com>
+ * m4/init.m4: Run AM_SANITY_CHECK.
+
+ * m4/sanity.m4: New file.
+
* automake.in (handle_dist_worker): In Cygnus mode, possibly find
files to dist in build dir, not srcdir.
(%omit_dependencies): New global.
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 9602db7ae..8fad0f6c2 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -6,7 +6,7 @@ MAINT_CHARSET = latin1
m4datadir = $(datadir)/aclocal
m4data_DATA = ccsanity.m4 ccstdc.m4 dmalloc.m4 fnmatch.m4 init.m4 install.m4 \
lispdir.m4 maintainer.m4 protos.m4 ptrdiff.m4 regex.m4 strtod.m4 termios.m4 \
-winsz.m4 mktime.m4 error.m4 obstack.m4
+winsz.m4 mktime.m4 error.m4 obstack.m4 sanity.m4
EXTRA_DIST = $(m4data_DATA)
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 44019aad8..f08158b63 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -45,7 +45,7 @@ MAINT_CHARSET = latin1
m4datadir = $(datadir)/aclocal
m4data_DATA = ccsanity.m4 ccstdc.m4 dmalloc.m4 fnmatch.m4 init.m4 install.m4 \
lispdir.m4 maintainer.m4 protos.m4 ptrdiff.m4 regex.m4 strtod.m4 termios.m4 \
-winsz.m4 mktime.m4 error.m4 obstack.m4
+winsz.m4 mktime.m4 error.m4 obstack.m4 sanity.m4
EXTRA_DIST = $(m4data_DATA)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -59,14 +59,16 @@ PACKAGE = @PACKAGE@
VERSION = @VERSION@
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \
- $(TEXINFOS) $(MANS) $(EXTRA_DIST)
+ $(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST)
+DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \
+ $(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST)
TAR = tar
default: all
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in
- cd $(top_srcdir) && automake --strictness=gnits $(subdir)/Makefile
+ cd $(top_srcdir) && automake $(subdir)/Makefile
Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in $(BUILT_SOURCES)
cd $(top_builddir) \
@@ -94,12 +96,11 @@ TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = m4
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- d=$(srcdir); \
+distdir: $(DEP_DISTFILES)
+ @for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
+ || ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir)/$$file; \
done
info:
dvi:
diff --git a/m4/init.m4 b/m4/init.m4
index 4825742fd..8afadf27f 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -15,5 +15,6 @@ AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
VERSION=[$2]
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
+AM_SANITY_CHECK
AC_ARG_PROGRAM
AC_PROG_MAKE_SET])
diff --git a/m4/sanity.m4 b/m4/sanity.m4
new file mode 100644
index 000000000..7c8abee26
--- /dev/null
+++ b/m4/sanity.m4
@@ -0,0 +1,19 @@
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+echo timestamp > conftestfile
+# Do this in a subshell so we don't clobber the current shell's
+# arguments. FIXME: maybe try `-L' hack like GETLOADAVG test?
+if (set X `ls -t $srcdir/configure conftestfile`; test "$2" = conftestfile)
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([configuration problem: newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])