diff options
| -rw-r--r-- | Makefile | 15 | ||||
| -rw-r--r-- | modules.mk | 5 |
2 files changed, 17 insertions, 3 deletions
@@ -1,4 +1,5 @@ # If no .config on main folder i have to create one +PHONY := NONE := $(shell touch .config) include .config @@ -66,7 +67,11 @@ PATHS = $(dir $(MAKE_FILES)) export -build: $(BUILD_REQ) +PHONY += all +all: build + +PHONY += build +build: ifdef CONFIG_BUILD_HANDOUTS $(Q)mkdir -p $(DEPLOYHANDOUT) $(Q)$(foreach dir,$(PATHS),$(MODMK) -C $(dir) buildhandouts;) @@ -89,25 +94,31 @@ $(KMCONFIG): $(KCONFIG): cd kconfig-frontends/ && ./configure && make +PHONY += menuconfig menuconfig: $(KMCONFIG) $(Q)$(KMCONFIG) Kconfig +PHONY += config config: $(KCONFIG) $(Q)$(KCONFIG) --oldaskconfig Kconfig +PHONY += oldconfig oldconfig: $(KCONFIG) $(Q)cp $@ $(CONFIG_FILE) $(Q)$(KCONFIG) --oldconfig Kconfig +PHONY += clean clean: $(Q)$(foreach dir,$(PATHS),$(MODMK) -C $(dir) $@_texfiles;) $(Q)rm -rf $(DEPLOY_FOLDER) .lxformat_print +PHONY += mrproper mrproper: clean $(Q)echo [CLEAN] $@ $(Q)rm -f $(CONFIG) $(Q)rm -f $(CONFIG_OLD) +PHONY += distclean distclean: mrproper $(Q)echo [CLEAN] $@ $(Q)find -name "tmp*" -exec rm -f {} \; @@ -116,4 +127,4 @@ distclean: mrproper $(Q)cp $(DEFCONF_FOLDER)/$@ $(CONFIG_FILE) $(Q)$(KCONFIG) --oldconfig Kconfig -.PHONY: config oldconfig menuconfig build clean mrproper distclean +.PHONY: $(PHONY) @@ -1,11 +1,13 @@ #Include all selected obj-y files from folder include Makefile +PHONY := BASE_NAME = $(shell basename $(dir $(CURDIR))) TMP_TEXFILES = *.aux *.log *.nav *.toc *.pdf *.snm \ *.bbl *.blg *.out *.vrb *.fls *.fdb_latexmk +PHONY += build build: $(Q)$(foreach files,$(obj-y),$(MODMK) $(files);) $(Q)$(foreach files,$(obj-y),cp -t $(DEPLOY) $(files);) @@ -27,7 +29,8 @@ buildprintouts: %.tex: +PHONY += clean_texfiles clean_texfiles: $(Q)rm -f $(TMP_TEXFILES) -.PHONY: clean_texfiles build +.PHONY: $(PHONY) |
