[llvm-commits] CVS: llvm/Makefile.rules

Chris Lattner sabre at nondot.org
Thu Dec 16 10:04:27 PST 2004


On Thu, 16 Dec 2004, Reid Spencer wrote:
>>  TDFiles := $(strip $(wildcard $(BUILD_SRC_DIR)/*.td) $(LLVM_SRC_ROOT)/lib/Target/Target.td)
>>  INCFiles := $(filter %.inc,$(BUILT_SOURCES))
>> +INCTMPFiles := $(INCFiles:%=$(ObjDir)/%.tmp)
>> +.PRECIOUS: $(INCTMPFiles) $(INCFiles)
>
> With .PRECIOUS you are asking for the INC and TMP files to NOT be
> removed by make if an error occurs while building them. In general that
> is a bad idea because the files might be partially constructed leading
> to error on the next build.

Ah, that's definitely not what I want.  I thought precious was to prevent 
make from removing intermediate files?  While it has the behavior you 
mention, it also: "Also, if the target is an intermediate file, it will 
not be deleted after it is no longer needed, as is normally done."

http://www.gnu.org/software/make/manual/html_mono/make.html#SEC44

If you'd like me to remove the .PRECIOUS, I definitely will.

>> -%GenRegisterInfo.h.inc : %.td
>> +$(TARGET:%=%GenRegisterNames.inc): \
>> +%GenRegisterNames.inc : $(ObjDir)/%GenRegisterNames.inc.tmp
>> +	$(Verb) cmp -s $@ $< || cp $< $@
>> +
> I'll do the conversion of cmp -> $(CMP) and cp -> $(CP).

Thanks!

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/




More information about the llvm-commits mailing list