util: Cleanup generation of dirpath.h
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 10 Jul 2011 12:54:20 +0000 (13:54 +0100)
committerDerrick Brashear <shadow@dementia.org>
Sat, 23 Jul 2011 21:22:01 +0000 (14:22 -0700)
dirpath.h is only copied into place if it has changed. However, this
means that the timestamp of dirpath.h is never updated, causing make to
always trigger the buildrule, even if the rule eventually does nothing.

Instead, always copy in the new dirpath.h, which simplifies the make
rules, and stops make from always building.

Change-Id: I43ba9152473591c5afd9064ad6e58adda6823f11
Reviewed-on: http://gerrit.openafs.org/5084
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/util/Makefile.in

index 520ca29..80ae691 100644 (file)
@@ -153,7 +153,7 @@ ${TOP_LIBDIR}/libafsutil_pic.a: util_pic.a
 # Use " as the sed boundary character because we lose anyway if that occurs
 # in path names.
 dirpath.h: ${srcdir}/dirpath.hin Makefile
-       ( sed \
+       sed \
                -e 's"@afsconfdir"${afsconfdir}"' \
                -e 's"@viceetcdir"${viceetcdir}"' \
                -e 's"@afssrvbindir"${afssrvbindir}"' \
@@ -165,10 +165,7 @@ dirpath.h: ${srcdir}/dirpath.hin Makefile
                -e 's"@afsbackupdir"${afsbackupdir}"' \
                -e 's"@afsbosconfigdir"${afsbosconfigdir}"' \
                -e 's"@afsdatadir"${afsdatadir}"' \
-               ${srcdir}/dirpath.hin >dirpath.h.tmp && \
-               if cmp dirpath.h.tmp dirpath.h >/dev/null ; then : ; else \
-               mv dirpath.h.tmp dirpath.h ; fi)
-       rm -f dirpath.h.tmp
+               ${srcdir}/dirpath.hin >dirpath.h
 
 util.a: ${objects} AFS_component_version_number.o
        $(RM) -f util.a