From: Borut R. <bor...@gm...> - 2011-08-08 19:02:33
|
On 08/07/2011 05:58 PM, Borut Ražem wrote: >> But have you also changed the dependencies? If I touch a >> test file it no longer gets reevaluated as it was >> before. > > I added an additional m4 processing step for .m4 files, but this > shouldn't affect the dependency checking. > I'll take a look... I fund it: I changed $(PORT_CASES_DIR)/%/iterations.stamp: $(TESTS_DIR)/%.c $(GENERATE_CASES) rm -rf $(dir $@) mkdir -p $(dir $@) python $(GENERATE_CASES) $< $(dir $@) > /dev/null touch $@ to $(PORT_CASES_DIR)/%/iterations.stamp: $(GENERATE_CASES) rm -rf $(dir $@) mkdir -p $(dir $@) if test -f $(CASES_DIR)/$(notdir $(patsubst %/,%,$(dir $@))).c; \ then \ python $(GENERATE_CASES) $(CASES_DIR)/$(notdir $(patsubst %/,%,$(dir $@))).c $(dir $@) > /dev/null; \ else \ python $(GENERATE_CASES) $(TESTS_DIR)/$(notdir $(patsubst %/,%,$(dir $@))).c $(dir $@) > /dev/null; \ fi touch $@ since now the .c regtest files are in $(TESTS_DIR)/%.c and in $(CASES_DIR)/%.c if generated from $(TESTS_DIR)/%.m4. Unfortunately the following doesn't work: $(PORT_CASES_DIR)/%/iterations.stamp: $(TESTS_DIR)/%.c $(CASES_DIR)/%.c $(GENERATE_CASES) so I removed both $(TESTS_DIR)/%.c and $(CASES_DIR)/%.c dependencies, which is the source of your problem. I'm still trying to explain to make to first search the .c file in $(CASES_DIR) and if it is not there search it in $(TESTS_DIR). Any idea? The other possibility is to copy all .c files from $(TESTS_DIR) to $(CASES_DIR), so the old dependency will be still OK. Borut |