diff options
| author | Christian Eppler <c.eppler@linutonix.de> | 2013-05-15 17:38:38 +0200 |
|---|---|---|
| committer | Christian Eppler <c.eppler@linutonix.de> | 2013-05-15 17:38:38 +0200 |
| commit | 22db35bbe11cb1da8416ca125cc158fcafc60b4b (patch) | |
| tree | 643d3fcbbaf59e75707eea1e137765f477a37de8 /modules.mk | |
| parent | c358412dbf0c779910057d4547f673e85b7b12dd (diff) | |
Kconfig with fastbuild,masterpres,masterhandout
Signed-off-by: Christian Eppler <c.eppler@linutonix.de>
Diffstat (limited to 'modules.mk')
| -rw-r--r-- | modules.mk | 76 |
1 files changed, 70 insertions, 6 deletions
@@ -2,12 +2,15 @@ include Makefile include $(CONFIG) +BASE_NAME = $(shell basename $(dir $(CURDIR))) + build: for files in $(obj-y) ; do \ ($(MAKE) -C ./ -f $(TOP_DIR)/modules.mk $$files ); \ cp $$files $(DEPLOY)/ ; \ done -ifeq ($(CONFIG_BUILD_HANDOUTS),y) + +ifdef CONFIG_BUILD_HANDOUTS for files in $(obj-handout-y) ; do \ ($(MAKE) -C ./ -f $(TOP_DIR)/modules.mk $$files ); \ cp $$files $(HANDOUT)/ ; \ @@ -17,6 +20,11 @@ endif %.pdf: echo "Build" $@ TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) $(BUILD) $(subst .pdf,.tex,$@) +ifneq ($(CONFIG_BUILD_FAST_BUILD),y) + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) $(BUILD_BIB) $(subst .pdf,.aux,$@) + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) $(BUILD) $(subst .pdf,.tex,$@) + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) $(BUILD) $(subst .pdf,.tex,$@) +endif clean: rm -f *.aux @@ -31,12 +39,68 @@ clean: rm -f *.vrb build_master_pres: -ifneq ($(filter-out pres_%,$(obj-y)), ) - `echo "\input{$(CURDIR)/../section.tex}" >> ${TOP_DIR}/$(MASTER_PRES)` - for files in $(subst .pdf,.tex,$(filter-out pres_%,$(obj-y))) ; do \ - `echo "\input{$(CURDIR)/$$files}" >> ${TOP_DIR}/$(MASTER_PRES)` ;\ +ifneq ($(filter pres_%,$(obj-y)), ) + `echo "\input{$(dir $(CURDIR))section.tex}" >> ../$(MASTER_PRES)$(MASTER_END)` + for files in $(subst .pdf,.tex,$(filter pres_%,$(obj-y))) ; do \ + `echo "\input{$(CURDIR)/$$files}" >> ../$(MASTER_PRES)$(MASTER_END)` ; \ + done +endif + +build_master_pres_end: +ifneq ($(filter pres_%,$(obj-y)), ) + echo "\input{configmasterpres}" > ../$(MASTER_PRES)_$(BASE_NAME)$(MASTER_END) + cat ../$(MASTER_PRES)$(MASTER_END) >> ../$(MASTER_PRES)_$(BASE_NAME)$(MASTER_END) + echo "\input{tailmasterpres}" >> ../$(MASTER_PRES)_$(BASE_NAME)$(MASTER_END) + # Only for TESTING ********************************************** + mv $(TOP_DIR)/configpres.tex $(TOP_DIR)/_configpres.tex + mv $(TOP_DIR)/tailpres.tex $(TOP_DIR)/_tailpres.tex + touch $(TOP_DIR)/configpres.tex + touch $(TOP_DIR)/tailpres.tex + # *************************************************************** + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) $(BUILD) ../$(MASTER_PRES)_$(BASE_NAME)$(MASTER_END) + +ifndef CONFIG_BUILD_FAST_BUILD + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) $(BUILD) ../$(MASTER_PRES)_$(BASE_NAME)$(MASTER_END) + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) $(BUILD) ../$(MASTER_PRES)_$(BASE_NAME)$(MASTER_END) +endif + # Only for TESTING ********************************************** + mv $(TOP_DIR)/_configpres.tex $(TOP_DIR)/configpres.tex + mv $(TOP_DIR)/_tailpres.tex $(TOP_DIR)/tailpres.tex + # *************************************************************** + cp $(MASTER_PRES)_$(BASE_NAME).pdf $(DEPLOY)/$(subst tmp_,,$(MASTER_PRES))_$(BASE_NAME).pdf +endif + +build_master_handout: +ifneq ($(filter handout_%,$(obj-handout-y)), ) + `echo "\input{$(dir $(CURDIR))section.tex}" >> ../$(MASTER_HANDOUT)$(MASTER_END)` + for files in $(subst .pdf,.tex,$(filter handout_%,$(obj-handout-y))) ; do \ + `echo "\input{$(CURDIR)/$$files}" >> ../$(MASTER_HANDOUT)$(MASTER_END)` ; \ done endif -.PHONY: clean +build_master_handout_end: +ifneq ($(filter handout_%,$(obj-handout-y)), ) + echo "\input{configmasterhandout}" > ../$(MASTER_HANDOUT)_$(BASE_NAME)$(MASTER_END) + cat ../$(MASTER_HANDOUT)$(MASTER_END) >> ../$(MASTER_HANDOUT)_$(BASE_NAME)$(MASTER_END) + echo "\input{tailmasterhandout}" >> ../$(MASTER_HANDOUT)_$(BASE_NAME)$(MASTER_END) + # Only for TESTING ********************************************** + mv $(TOP_DIR)/confighandout.tex $(TOP_DIR)/_confighandout.tex + mv $(TOP_DIR)/tailhandout.tex $(TOP_DIR)/_tailhandout.tex + touch $(TOP_DIR)/confighandout.tex + touch $(TOP_DIR)/tailhandout.tex + # *************************************************************** + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) $(BUILD) ../$(MASTER_HANDOUT)_$(BASE_NAME)$(MASTER_END) + +ifndef CONFIG_BUILD_FAST_BUILD + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) $(BUILD) ../$(MASTER_HANDOUT)_$(BASE_NAME)$(MASTER_END) + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) $(BUILD) ../$(MASTER_HANDOUT)_$(BASE_NAME)$(MASTER_END) +endif + # Only for TESTING ********************************************** + mv $(TOP_DIR)/_confighandout.tex $(TOP_DIR)/confighandout.tex + mv $(TOP_DIR)/_tailhandout.tex $(TOP_DIR)/tailhandout.tex + # *************************************************************** + cp $(MASTER_HANDOUT)_$(BASE_NAME).pdf $(HANDOUT)/$(subst tmp_,,$(MASTER_HANDOUT)_$(BASE_NAME).pdf) +endif + +.PHONY: clean build_master_pres_end build_master_pres build_master_handout_end build_master_handout |
