From c8e83f0e826bc0a56321408b1c7a2afa137bab05 Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Fri, 22 Nov 2013 12:23:17 -0500 Subject: [PATCH] config: parallel-safe param.h makefile rule 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 Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear --- src/config/Makefile.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config/Makefile.in b/src/config/Makefile.in index 7775cdfda..aefc9192e 100644 --- a/src/config/Makefile.in +++ b/src/config/Makefile.in @@ -60,16 +60,16 @@ config.o: config.c AFS_component_version_number.c # 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) -- 2.39.5