summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/Makefile.am2
-rw-r--r--config/Makefile.in2
-rwxr-xr-xconfig/move-if-change17
3 files changed, 20 insertions, 1 deletions
diff --git a/config/Makefile.am b/config/Makefile.am
index 234c412f..02f2cc74 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -1 +1 @@
-## Nothing to do here.
+EXTRA_DIST = move-if-change prev-version.txt
diff --git a/config/Makefile.in b/config/Makefile.in
index 9cd94a5e..d472a4e6 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -66,6 +66,8 @@ PACKAGE_NAME = @PACKAGE_NAME@
PERL = @PERL@
PERLSCRIPTS = @PERLSCRIPTS@
VERSION = @VERSION@
+
+EXTRA_DIST = move-if-change prev-version.txt
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_CLEAN_FILES =
DIST_COMMON = Makefile.am Makefile.in config.guess config.sub \
diff --git a/config/move-if-change b/config/move-if-change
new file mode 100755
index 00000000..66d8b8ad
--- /dev/null
+++ b/config/move-if-change
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Like mv $1 $2, but if the files are the same, just delete $1.
+# Status is 0 if $2 is changed, 1 otherwise.
+if
+test -r $2
+then
+if
+cmp -s $1 $2
+then
+echo $2 is unchanged
+rm -f $1
+else
+mv -f $1 $2
+fi
+else
+mv -f $1 $2
+fi