Xref: news2.mv.net comp.os.msdos.djgpp:4356 From: Roland Exler Newsgroups: comp.os.msdos.djgpp Subject: make deletes files needed?! Date: Wed, 29 May 1996 14:43:30 -0700 Organization: Institute for el. Measurement, University of Linz, Austria Lines: 74 Message-ID: <31ACC502.75AE@jk.uni-linz.ac.at> NNTP-Posting-Host: sensor4.emt.uni-linz.ac.at Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I'm using gnu make (v3.73) as a kind of intelligent batch-file, not just for compiling c/c++. With the makefile below, make deletes the files lms0* at the end of the run, but this files are listed in 'lms' as desinations to create! Especially surprising is the fact, that make deletes it, but knows it has to create this files as if you run make again, it recompiles them. Has anyone encountered similar problems with make or sees an error within my makefile? I've cut the makefile to the minimum and replaced the real functions with ECHO-statements using output-redirection just creating dummi-files. As manually undeleting all files costs a lot of time and recompilation even more (the real makefile runs more than one hour at a P100), thanks in advance for any help. Roland --------------------------- makefile -------------------------------- OUT_DIR:=test/ Z=$(subst /,\,$@) # may be list, such as #LMSPARAM:=050 020 010 LMSPARAM:=050 LMS_ERR:=$(addprefix lmse,$(LMSPARAM)) $(addprefix lmss,$(LMSPARAM)) ..PHONY: all lms clear all: $(OUT_DIR)s_in $(OUT_DIR)n_in \ $(OUT_DIR)s_out $(OUT_DIR)n_out \ lms lms: $(addprefix $(OUT_DIR),$(LMS_ERR)) clear: deltree /y $(subst /,,$(OUT_DIR)) del signal del noise # how to create file 'signal' and 'noise' signal noise: ECHO noise $@ > $Z $(OUT_DIR)s_in: signal md $(subst /,,$(dir $@)) ECHO mult $< -a $@ > $Z $(OUT_DIR)n_in: noise md $(subst /,,$(dir $@)) ECHO mult $< -a $@ > $Z %_out: %_in ECHO fir $< -c $@ > $Z $(OUT_DIR)out: $(OUT_DIR)s_out $(OUT_DIR)n_out ECHO add $^ $@ > $Z $(OUT_DIR)lmse0%: $(OUT_DIR)s_in $(OUT_DIR)out ECHO lms $^ -c $@ > $Z $(OUT_DIR)lmss0%: $(OUT_DIR)n_out $(OUT_DIR)lmse0% ECHO sub $^ $@ > $Z +---------------------------------------+---------------------------+ I Roland Exler I EMAIL: I I Universitaet Linz I R DOT Exler AT jk DOT uni-linz DOT ac DOT at I I Institut fuer Elektrische Messtechnik I I I Altenbergerstr. 69 I Phone: I I A-4040 Linz, AUSTRIA I + 43 732 2468 9205 I +---------------------------------------+---------------------------+