summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2012-04-08 23:09:14 +0200
committerThomas Schwinge <thomas@codesourcery.com>2012-04-08 23:09:14 +0200
commit94a3d5a0b5591ef065f86912948a79cf8b007b13 (patch)
treeed2eeb2df1dca5c105703339f1dced353769605a /Makefile
parent7d5a62da64c0f1a61fb2ea7b0e76950e12b422cd (diff)
Automatically regenerate files that depend on $(hurd-version).
Follow-up to 05f5cc229323a61799388fbb52da84ca8cb502c9 (»configure: Use modern `AC_INIT' invocation.«). * Makeconf (%: %.sh): Depend on config.make. * Makefile (version.h): Use a stamp file. (stamp-version): Depend on config.make. * doc/Makefile (stamp-version): Likewise. * Makeconf (make-deps): Take additional target-specific dependencies, $*-DEPS. * console-client/Makefile (driver-DEPS): Depend on config.make. * libstore/Makefile (module-DEPS): Likewise.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e0ba0523..0ff35263 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
#
# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2004,
-# 2006, 2009, 2011 Free Software Foundation, Inc.
+# 2006, 2009, 2011, 2012 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
@@ -65,9 +65,12 @@ working-prog-subdirs := $(filter-out \
$(subdirs): version.h
-version.h: version.h.in
- sed -e 's/MASTER_HURD_VERSION/\"$(hurd-version)\"/' < $< > $@
-
+version.h: stamp-version; @:
+stamp-version: version.h.in config.make
+ sed -e 's/MASTER_HURD_VERSION/\"$(hurd-version)\"/' \
+ < $< > version.h.new
+ $(move-if-change) version.h.new version.h
+ touch $@
## GNU Coding Standards targets (not all are here yet), and some other
## similar sorts of things