configure: ensure output file only updated on success

eg. After running "false > $@", the output file modification
time will be updated.  So a despite failure, a repeated
"make" will not re-run.

Handle this by accumulating output to "$@.tmp", then
move to $@ as a final step.
This commit is contained in:
Michael Davidsaver authored and mdavidsaver committed 2026-02-27 16:17:53 +00:00
1 parent 0c91c55348
commit d44ddf441a
9 files changed
+65 -38

No files matched your search

+2 -2
View File
@@ -15,8 +15,8 @@ THESE_RULES := $(IOCDIR)/db/RULES
dbCommon.h$(DEP): $(COMMON_DIR)/dbCommonRecord.dbd $(THESE_RULES) \
$(DBDTORECTYPEH_dep)
@$(RM) $@
@$(DBTORECORDTYPEH) -D -I ../db -I $(COMMON_DIR) -o $(COMMONDEP_TARGET) $< > $@
@$(DBTORECORDTYPEH) -D -I ../db -I $(COMMON_DIR) -o $(COMMONDEP_TARGET) $< > $@.stdout
$(MV) $@.stdout $@
$(COMMON_DIR)/dbCommonRecord.html: ../db/dbCommon.dbd.pod
+2 -2
View File
@@ -8,8 +8,8 @@
# This is a Makefile fragment, see src/ioc/Makefile.
stdRecords.dbd$(DEP): $(STDDIR)/rec/Makefile $(STDDIR)/rec/RULES
@$(RM) $@
@echo "$(COMMON_DIR)/stdRecords.dbd:" > $@
@echo "$(COMMON_DIR)/stdRecords.dbd:" > $@.stdout
$(MV) $@.stdout $@
$(COMMON_DIR)/stdRecords.dbd: $(STDDIR)/rec/Makefile $(STDDIR)/rec/RULES
+2 -2
View File
@@ -19,5 +19,5 @@ softMain$(DEP): epicsInstallDir.h
epicsInstallDir.h: $(TOP)/configure/CONFIG_SITE*
$(ECHO) "FINAL_LOCATION=$(FINAL_LOCATION)"
$(PERL) $(STDDIR)/softIoc/makeInstallDir.pl "$(FINAL_LOCATION)" > $@
$(PERL) $(STDDIR)/softIoc/makeInstallDir.pl "$(FINAL_LOCATION)" > $@.stdout
$(MV) $@.stdout $@