summaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-02-04 20:02:06 +0100
committerJim Meyering <meyering@redhat.com>2010-02-05 07:43:37 +0100
commit3c0aac1e7efa0410e913c9a5b936e5759c63901f (patch)
treebd308a639f2c9197eee20e33d76daeae030b4ec9 /cfg.mk
parent6bb67138079e8ef3457ee1fa07cebcb78b6049d6 (diff)
downloaddiffutils-3c0aac1e7efa0410e913c9a5b936e5759c63901f.tar.gz
sync with gnulib
* gl/lib/regcomp.c.diff: Adjust to apply to the latest in gnulib. * gnulib: Update submodule to latest.
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/cfg.mk b/cfg.mk
index 4e10c16..76d1c8f 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -39,3 +39,25 @@ update-copyright-env = \
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
include $(srcdir)/dist-check.mk
+
+_cf_state_dir ?= .config-state
+_date_time := $(shell date +%F.%T)
+config-compare:
+ diff -u \
+ -I'define VERSION ' \
+ -I'define PACKAGE_VERSION ' \
+ -I'define PACKAGE_STRING ' \
+ $(_cf_state_dir)/latest lib/config.h
+ diff -u \
+ -I'$(PACKAGE_NAME)' \
+ -I'[SD]\["VERSION"\]' \
+ -I'[SD]\["PACKAGE_VERSION"\]' \
+ -I'D\["PACKAGE_STRING"\]' \
+ $(_cf_state_dir)/latest config.status
+
+config-save:
+ $(MAKE) --quiet config-compare > /dev/null 2>&1 \
+ && { echo no change; exit 1; } || :
+ mkdir -p $(_cf_state_dir)/$(_date_time)
+ ln -nsf $(date_time) $(_cf_state_dir)/latest
+ cp lib/config.h config.status $(_cf_state_dir)/latest