From 8687f170c38b23ea4126f5b9fb78ca9685359abf Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sat, 6 Jun 2009 14:46:29 +0000 Subject: [PATCH] targets-tools.mk: Support PROJ_H Support the PROJ_H variable, which is undefined by default. PROJ_H is +=-added to SRC_H, thus solving failure to produce .dep.mk and copying the stuff to the include directory. I suppose this would be most cleanly handled in include.mk. --- make/targets-tools.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/make/targets-tools.mk b/make/targets-tools.mk index 37c2e54a..1e1a2a7e 100644 --- a/make/targets-tools.mk +++ b/make/targets-tools.mk @@ -11,9 +11,13 @@ install: $(ALL) $(LIB_SO): $(OBJ) all.done: $(PREREQ_DONE) $(BUILD_HDR) $(BUILD_EXE_SH) $(MEMBERS) $(LIB_A) $(LIB_SO) -project-header: $(PROJECT).h +project-header: $(PROJ_H) -$(PROJECT).h: $(filter-out $(PROJECT).h $(PROJECT)/$(PROJECT).h,$(wildcard *.h $(PROJECT)/*.h)) +# I think this is most cleanly handled in include.mk +#PROJ_H ?= $(PROJECT).h +SRC_H += $(PROJ_H) + +$(PROJ_H): $(filter-out $(PROJ_H) $(PROJECT)/$(PROJ_H),$(wildcard *.h $(PROJECT)/*.h)) echo "#ifndef _$(PROJECT_CAPNAME)_H" > $@.tmp echo "#define _$(PROJECT_CAPNAME)_H" >> $@.tmp echo >> $@.tmp @@ -21,3 +25,4 @@ $(PROJECT).h: $(filter-out $(PROJECT).h $(PROJECT)/$(PROJECT).h,$(wildcard *.h $ echo >> $@.tmp echo "#endif /* #ifndef _$(PROJECT_CAPNAME)_H */" >> $@.tmp mv $@.tmp $@ +