aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-02-24 11:12:23 +0900
committerTom Rini <trini@ti.com>2014-02-25 11:01:29 -0500
commited1ca528aae1f3ae7400c5816e6d2cdb082ee785 (patch)
tree90e2a545d05ec9e213e4dbabec5e1e0f63ea82c9
parent886d86e87d991dabcffdb98f71496b59c203e9cd (diff)
downloadu-boot-midas-ed1ca528aae1f3ae7400c5816e6d2cdb082ee785.tar.gz
u-boot-midas-ed1ca528aae1f3ae7400c5816e6d2cdb082ee785.tar.bz2
u-boot-midas-ed1ca528aae1f3ae7400c5816e6d2cdb082ee785.zip
kbuild: add misc targets, help, ubootrelease, ubootversion
"help" target has been copied from Linux 3.13 and adjusted for U-Boot. Unlike Linux, cleaning is done on 4 levels: clean, clobber, mrproper, distclean. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
-rw-r--r--Makefile65
1 files changed, 58 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 75a17479c4..f647d410e1 100644
--- a/Makefile
+++ b/Makefile
@@ -415,7 +415,7 @@ timestamp_h := include/generated/timestamp_autogenerated.h
no-dot-config-targets := clean clobber mrproper distclean \
help %docs check% coccicheck \
- backup
+ ubootversion backup
config-targets := 0
mixed-targets := 0
@@ -1081,12 +1081,6 @@ TAG_SUBDIRS := $(u-boot-dirs) include
FIND := find
FINDFLAGS := -L
-PHONY += checkstack
-
-checkstack:
- $(OBJDUMP) -d u-boot $$(find . -name u-boot-spl) | \
- $(PERL) $(src)/scripts/checkstack.pl $(ARCH)
-
tags ctags:
ctags -w -o ctags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \
-name '*.[chS]' -print`
@@ -1252,6 +1246,51 @@ backup:
F=`basename $(TOPDIR)` ; cd .. ; \
gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
+help:
+ @echo 'Cleaning targets:'
+ @echo ' clean - Remove most generated files but keep the config and'
+ @echo ' necessities for testing u-boot'
+ @echo ' clobber - Remove most generated files but keep the config'
+ @echo ' mrproper - Remove all generated files + config + various backup files'
+ @echo ' distclean - mrproper + remove editor backup and patch files'
+ @echo ''
+# uncomment after adding Kconfig feature
+# @echo 'Configuration targets:'
+# @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help
+# @echo ''
+ @echo 'Other generic targets:'
+ @echo ' all - Build all necessary images depending on configuration'
+ @echo ' u-boot - Build the bare u-boot'
+ @echo ' dir/ - Build all files in dir and below'
+ @echo ' dir/file.[oisS] - Build specified target only'
+ @echo ' dir/file.lst - Build specified mixed source/assembly target only'
+ @echo ' (requires a recent binutils and recent build (System.map))'
+ @echo ' tags/TAGS - Generate tags file for editors'
+ @echo ' cscope - Generate cscope index'
+ @echo ' ubootrelease - Output the release version string'
+ @echo ' ubootversion - Output the version stored in Makefile'
+ @echo ''
+ @echo 'Static analysers'
+ @echo ' checkstack - Generate a list of stack hogs'
+ @echo ''
+ @echo 'Documentation targets:'
+ @$(MAKE) -f $(srctree)/doc/DocBook/Makefile dochelp
+ @echo ''
+ @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
+ @echo ' make V=2 [targets] 2 => give reason for rebuild of target'
+ @echo ' make O=dir [targets] Locate all output files in "dir", including .config'
+ @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)'
+ @echo ' make C=2 [targets] Force check of all c source with $$CHECK'
+ @echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
+ @echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where'
+ @echo ' 1: warnings which may be relevant and do not occur too often'
+ @echo ' 2: warnings which occur quite often but may still be relevant'
+ @echo ' 3: more obscure warnings, can most likely be ignored'
+ @echo ' Multiple levels can be combined with W=12 or W=123'
+ @echo ''
+ @echo 'Execute "make" or "make all" to build all targets marked with [*] '
+ @echo 'For further info see the ./README file'
+
# Documentation targets
# ---------------------------------------------------------------------------
@@ -1267,6 +1306,18 @@ scripts: ;
endif #ifeq ($(config-targets),1)
endif #ifeq ($(mixed-targets),1)
+PHONY += checkstack ubootrelease ubootversion
+
+checkstack:
+ $(OBJDUMP) -d u-boot $$(find . -name u-boot-spl) | \
+ $(PERL) $(src)/scripts/checkstack.pl $(ARCH)
+
+ubootrelease:
+ @echo "$(UBOOTVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
+
+ubootversion:
+ @echo $(UBOOTVERSION)
+
# Single targets
# ---------------------------------------------------------------------------
# Single targets are compatible with: