Generate the param.h.new temporary file in a parallel-safe
way. The rule to generate the three copies of param.h can
run at the the same time under a parallel make, clobbering
the param.h.new temporary file. Instead of creating this file
inline, create a common rule to generate the temporary file
once.
Change-Id: I823b6a55f3168e991b64660bfe51303d43f693a9
Reviewed-on: http://gerrit.openafs.org/10516
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
# Include installation targets
#
-# XXX inlined INST
-${DEST}/include/afs/param.h ${DESTDIR}${includedir}/afs/param.h ${TOP_INCDIR}/afs/param.h: ${srcdir}/param.${SYS_NAME}.h ${AFS_PARAM_COMMON}
+param.h.new: ${srcdir}/param.${SYS_NAME}.h ${AFS_PARAM_COMMON}
if [ "X${AFS_PARAM_COMMON}" != "X" ] ; then \
cat ${srcdir}/${AFS_PARAM_COMMON} ${srcdir}/param.${SYS_NAME}.h > param.h.new ; \
- $(RM) -f $@; \
- $(CP) param.h.new $@ ; \
else \
- $(RM) -f $@; $(CP) ${srcdir}/param.${SYS_NAME}.h $@ ; \
+ cat ${srcdir}/param.${SYS_NAME}.h > param.h.new ; \
fi
+${DEST}/include/afs/param.h ${DESTDIR}${includedir}/afs/param.h ${TOP_INCDIR}/afs/param.h: param.h.new
+ $(INST)
+
${DEST}/include/afs/afs_sysnames.h ${DESTDIR}${includedir}/afs/afs_sysnames.h ${TOP_INCDIR}/afs/afs_sysnames.h: ${srcdir}/afs_sysnames.h
$(INST)