mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-26 07:13:55 +01:00
make: Header generation targets-tools.mk -> include.mk
Move project header generation mechanics from targets-tools.mk into include.mk.
This commit is contained in:
parent
8687f170c3
commit
42851f44b8
2 changed files with 21 additions and 18 deletions
|
|
@ -11,18 +11,3 @@ install: $(ALL)
|
|||
$(LIB_SO): $(OBJ)
|
||||
all.done: $(PREREQ_DONE) $(BUILD_HDR) $(BUILD_EXE_SH) $(MEMBERS) $(LIB_A) $(LIB_SO)
|
||||
|
||||
project-header: $(PROJ_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
|
||||
for h in $(sort $(patsubst $(PROJECT)/%,%,$^)); do echo "#include <$(PROJECT)/$$h>"; done >> $@.tmp
|
||||
echo >> $@.tmp
|
||||
echo "#endif /* #ifndef _$(PROJECT_CAPNAME)_H */" >> $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue