From 0f33b205b5f7c9ac8fa66511ef6be329b477532b 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. Reviewed-on: http://gerrit.openafs.org/10516 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear (cherry picked from commit c8e83f0e826bc0a56321408b1c7a2afa137bab05) Change-Id: I8a85c0e288f2231a3bf693319a8f5fcd618464e8 Reviewed-on: http://gerrit.openafs.org/11229 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand --- 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 8793663fe..90b20f19c 100644 --- a/src/config/Makefile.in +++ b/src/config/Makefile.in @@ -67,16 +67,16 @@ config.o: ${srcdir}/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