main.mk revision a9b22497534d404bf956cdcc0941e20057219a2a
1
2# Use bash, not whatever shell somebody has installed as /bin/sh
3# This is repeated in config.mk, since envsetup.sh runs that file
4# directly.
5SHELL := /bin/bash
6
7# this turns off the suffix rules built into make
8.SUFFIXES:
9
10# If a rule fails, delete $@.
11.DELETE_ON_ERROR:
12
13# Figure out where we are.
14#TOP := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
15#TOP := $(patsubst %/,%,$(TOP))
16
17# TOPDIR is the normal variable you should use, because
18# if we are executing relative to the current directory
19# it can be "", whereas TOP must be "." which causes
20# pattern matching probles when make strips off the
21# trailing "./" from paths in various places.
22#ifeq ($(TOP),.)
23#TOPDIR :=
24#else
25#TOPDIR := $(TOP)/
26#endif
27
28# check for broken versions of make
29ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") \>= 3.81))
30$(warning ********************************************************************************)
31$(warning *  You are using version $(MAKE_VERSION) of make.)
32$(warning *  You must upgrade to version 3.81 or greater.)
33$(warning *  see file://$(shell pwd)/docs/development-environment/machine-setup.html)
34$(warning ********************************************************************************)
35$(error stopping)
36endif
37
38TOP := .
39TOPDIR :=
40
41BUILD_SYSTEM := $(TOPDIR)build/core
42
43# This is the default target.  It must be the first declared target.
44DEFAULT_GOAL := droid
45$(DEFAULT_GOAL):
46
47# Set up various standard variables based on configuration
48# and host information.
49include $(BUILD_SYSTEM)/config.mk
50
51# This allows us to force a clean build - included after the config.make
52# environment setup is done, but before we generate any dependencies.  This
53# file does the rm -rf inline so the deps which are all done below will
54# be generated correctly
55include $(BUILD_SYSTEM)/cleanbuild.mk
56
57ifneq ($(HOST_OS),windows)
58ifneq ($(HOST_OS)-$(HOST_ARCH),darwin-ppc)
59# check for a case sensitive file system
60ifneq (a,$(shell mkdir -p $(OUT_DIR) ; \
61                echo a > $(OUT_DIR)/casecheck.txt; \
62                    echo B > $(OUT_DIR)/CaseCheck.txt; \
63                cat $(OUT_DIR)/casecheck.txt))
64$(warning ************************************************************)
65$(warning You are building on a case-insensitive filesystem.)
66$(warning Please move your source tree to a case-sensitive filesystem.)
67$(warning ************************************************************)
68$(error Case-insensitive filesystems not supported)
69endif
70endif
71endif
72
73# Make sure that there are no spaces in the absolute path; the
74# build system can't deal with them.
75ifneq ($(words $(shell pwd)),1)
76$(warning ************************************************************)
77$(warning You are building in a directory whose absolute path contains)
78$(warning a space character:)
79$(warning $(space))
80$(warning "$(shell pwd)")
81$(warning $(space))
82$(warning Please move your source tree to a path that does not contain)
83$(warning any spaces.)
84$(warning ************************************************************)
85$(error Directory names containing spaces not supported)
86endif
87
88# Set up version information.
89include $(BUILD_SYSTEM)/version_defaults.mk
90
91# These are the modifier targets that don't do anything themselves, but
92# change the behavior of the build.
93# (must be defined before including definitions.make)
94INTERNAL_MODIFIER_TARGETS := showcommands
95
96# Bring in standard build system definitions.
97include $(BUILD_SYSTEM)/definitions.mk
98
99ifneq ($(filter eng user userdebug tests,$(MAKECMDGOALS)),)
100$(info ***************************************************************)
101$(info ***************************************************************)
102$(info Don't pass '$(filter eng user userdebug tests,$(MAKECMDGOALS))' on \
103		the make command line.)
104$(info Set TARGET_BUILD_VARIANT in buildspec.mk, or use lunch or)
105$(info choosecombo.)
106$(info ***************************************************************)
107$(info ***************************************************************)
108$(error stopping)
109endif
110
111
112###
113### In this section we set up the things that are different
114### between the build variants
115###
116
117## user/userdebug ##
118
119user_variant := $(filter userdebug user,$(TARGET_BUILD_VARIANT))
120enable_target_debugging := true
121ifneq (,$(user_variant))
122  # Target is secure in user builds.
123  ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1
124
125  override_build_tags := user
126  ifeq ($(user_variant),userdebug)
127    # Pick up some extra useful tools
128    override_build_tags += debug
129  else
130    # Disable debugging in plain user builds.
131    enable_target_debugging :=
132  endif
133 
134  # TODO: Always set WITH_DEXPREOPT (for user builds) once it works on OSX.
135  # Also, remove the corresponding block in config/product_config.make.
136  ifeq ($(HOST_OS)-$(WITH_DEXPREOPT_buildbot),linux-true)
137    WITH_DEXPREOPT := true
138  endif
139  
140  # Disallow mock locations by default for user builds
141  ADDITIONAL_DEFAULT_PROPERTIES += ro.allow.mock.location=0
142  
143else # !user_variant
144  # Turn on checkjni for non-user builds.
145  ADDITIONAL_BUILD_PROPERTIES += ro.kernel.android.checkjni=1
146  # Set device insecure for non-user builds.
147  ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0
148  # Allow mock locations by default for non user builds
149  ADDITIONAL_DEFAULT_PROPERTIES += ro.allow.mock.location=1
150endif # !user_variant
151
152ifeq (true,$(strip $(enable_target_debugging)))
153  # Target is more debuggable and adbd is on by default
154  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1 persist.service.adb.enable=1
155  # Include the debugging/testing OTA keys in this build.
156  INCLUDE_TEST_OTA_KEYS := true
157else # !enable_target_debugging
158  # Target is less debuggable and adbd is off by default
159  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0 persist.service.adb.enable=0
160endif # !enable_target_debugging
161
162## tests ##
163
164ifeq ($(TARGET_BUILD_VARIANT),tests)
165override_build_tags := eng debug user development tests
166endif
167
168## sdk ##
169
170ifneq ($(filter sdk,$(MAKECMDGOALS)),)
171ifneq ($(words $(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS))),1)
172$(error The 'sdk' target may not be specified with any other targets)
173endif
174override_build_tags := user
175ADDITIONAL_BUILD_PROPERTIES += xmpp.auto-presence=true
176ADDITIONAL_BUILD_PROPERTIES += ro.config.nocheckin=yes
177else # !sdk
178# Enable sync for non-sdk builds only (sdk builds lack SubscribedFeedsProvider).
179ADDITIONAL_BUILD_PROPERTIES += ro.config.sync=yes
180endif
181
182ifeq "" "$(filter %:system/etc/apns-conf.xml, $(PRODUCT_COPY_FILES))"
183  # Install an apns-conf.xml file if one's not already being installed.
184  PRODUCT_COPY_FILES += development/data/etc/apns-conf_sdk.xml:system/etc/apns-conf.xml
185  ifeq ($(filter sdk,$(MAKECMDGOALS)),)
186    $(warning implicitly installing apns-conf_sdk.xml)
187  endif
188endif
189
190ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android
191
192# enable vm tracing in files for now to help track
193# the cause of ANRs in the content process
194ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.stack-trace-file=/data/anr/traces.txt
195
196
197# ------------------------------------------------------------
198# Define a function that, given a list of module tags, returns
199# non-empty if that module should be installed in /system.
200
201# For most goals, anything tagged with "eng"/"debug"/"user" should
202# be installed in /system.
203define should-install-to-system
204$(filter eng debug user,$(1))
205endef
206
207ifneq (,$(filter sdk,$(MAKECMDGOALS)))
208# For the sdk goal, anything with the "samples" tag should be
209# installed in /data even if that module also has "eng"/"debug"/"user".
210define should-install-to-system
211$(if $(filter samples,$(1)),,$(filter eng debug user development,$(1)))
212endef
213endif
214
215ifeq ($(TARGET_BUILD_VARIANT),)
216# For the default goal, everything should be installed in /system.
217define should-install-to-system
218true
219endef
220endif
221
222
223# If all they typed was make showcommands, we'll actually build
224# the default target.
225ifeq ($(MAKECMDGOALS),showcommands)
226.PHONY: showcommands
227showcommands: $(DEFAULT_GOAL)
228endif
229
230# These targets are going to delete stuff, don't bother including
231# the whole directory tree if that's all we're going to do
232ifeq ($(MAKECMDGOALS),clean)
233dont_bother := true
234endif
235ifeq ($(MAKECMDGOALS),clobber)
236dont_bother := true
237endif
238ifeq ($(MAKECMDGOALS),dataclean)
239dont_bother := true
240endif
241ifeq ($(MAKECMDGOALS),installclean)
242dont_bother := true
243endif
244
245# Bring in all modules that need to be built.
246ifneq ($(dont_bother),true)
247
248subdir_makefiles :=
249
250ifeq ($(HOST_OS),windows)
251SDK_ONLY := true
252endif
253ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-ppc)
254SDK_ONLY := true
255endif
256
257ifeq ($(SDK_ONLY),true)
258
259subdirs := \
260	prebuilt \
261	build/libs/host \
262	dalvik/dexdump \
263	dalvik/libdex \
264	dalvik/tools/dmtracedump \
265	development/emulator/mksdcard \
266	development/tools/activitycreator \
267	development/tools/line_endings \
268	development/host \
269	external/expat \
270	external/libpng \
271	external/qemu \
272	external/sqlite/dist \
273	external/zlib \
274	frameworks/base/libs/utils \
275	frameworks/base/tools/aapt \
276	frameworks/base/tools/aidl \
277	system/core/adb \
278	system/core/fastboot \
279	system/core/libcutils \
280	system/core/liblog \
281	system/core/libzipfile
282
283# The following can only be built if "javac" is available.
284# This check is used when building parts of the SDK under Cygwin.
285ifneq (,$(shell which javac 2>/dev/null))
286$(warning sdk-only: javac available.)
287subdirs += \
288	build/tools/signapk \
289	build/tools/zipalign \
290	dalvik/dx \
291	dalvik/libcore \
292	development/apps \
293	development/tools/androidprefs \
294	development/tools/apkbuilder \
295	development/tools/jarutils \
296	development/tools/layoutlib_utils \
297	development/tools/ninepatch \
298	development/tools/sdkstats \
299	development/tools/sdkmanager \
300	frameworks/base \
301	frameworks/base/tools/layoutlib \
302	external/googleclient \
303	packages
304else
305$(warning sdk-only: javac not available.)
306endif
307
308# Exclude tools/acp when cross-compiling windows under linux
309ifeq ($(findstring Linux,$(UNAME)),)
310subdirs += build/tools/acp
311endif
312
313else	# !SDK_ONLY
314ifeq ($(BUILD_TINY_ANDROID), true)
315
316# TINY_ANDROID is a super-minimal build configuration, handy for board 
317# bringup and very low level debugging
318
319INTERNAL_DEFAULT_DOCS_TARGETS := 
320
321subdirs := \
322	bionic \
323	system/core \
324	build/libs \
325	build/target \
326	build/tools/acp \
327	build/tools/apriori \
328	build/tools/kcm \
329	build/tools/soslim \
330	external/elfcopy \
331	external/elfutils \
332	external/yaffs2 \
333	external/zlib
334else	# !BUILD_TINY_ANDROID
335
336#
337# Typical build; include any Android.mk files we can find.
338#
339INTERNAL_DEFAULT_DOCS_TARGETS := offline-sdk-docs
340subdirs := $(TOP)
341
342FULL_BUILD := true
343
344endif	# !BUILD_TINY_ANDROID
345
346endif	# !SDK_ONLY
347
348# Can't use first-makefiles-under here because
349# --mindepth=2 makes the prunes not work.
350subdir_makefiles += \
351	$(shell build/tools/findleaves.sh --prune="./out" $(subdirs) Android.mk)
352
353# Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)
354# or under vendor/*/$(TARGET_DEVICE).  Search in both places, but
355# make sure only one exists.
356# Real boards should always be associated with an OEM vendor.
357board_config_mk := \
358	$(strip $(wildcard \
359		$(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \
360		vendor/*/$(TARGET_DEVICE)/BoardConfig.mk \
361	))
362ifeq ($(board_config_mk),)
363  $(error No config file found for TARGET_DEVICE $(TARGET_DEVICE))
364endif
365ifneq ($(words $(board_config_mk)),1)
366  $(error Multiple board config files for TARGET_DEVICE $(TARGET_DEVICE): $(board_config_mk))
367endif
368include $(board_config_mk)
369TARGET_DEVICE_DIR := $(patsubst %/,%,$(dir $(board_config_mk)))
370board_config_mk :=
371
372# Clean up/verify variables defined by the board config file.
373TARGET_BOOTLOADER_BOARD_NAME := $(strip $(TARGET_BOOTLOADER_BOARD_NAME))
374
375#
376# Include all of the makefiles in the system
377#
378
379ifneq ($(ONE_SHOT_MAKEFILE),)
380# We've probably been invoked by the "mm" shell function
381# with a subdirectory's makefile.
382include $(ONE_SHOT_MAKEFILE)
383# Change CUSTOM_MODULES to include only modules that were
384# defined by this makefile; this will install all of those
385# modules as a side-effect.  Do this after including ONE_SHOT_MAKEFILE
386# so that the modules will be installed in the same place they
387# would have been with a normal make.
388CUSTOM_MODULES := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS),))
389FULL_BUILD :=
390INTERNAL_DEFAULT_DOCS_TARGETS :=
391# Stub out the notice targets, which probably aren't defined
392# when using ONE_SHOT_MAKEFILE.
393NOTICE-HOST-%: ;
394NOTICE-TARGET-%: ;
395else
396include $(subdir_makefiles)
397endif
398# -------------------------------------------------------------------
399# All module makefiles have been included at this point.
400# -------------------------------------------------------------------
401
402# -------------------------------------------------------------------
403# Include any makefiles that must happen after the module makefiles
404# have been included.
405# TODO: have these files register themselves via a global var rather
406# than hard-coding the list here.
407ifdef FULL_BUILD
408  # Only include this during a full build, otherwise we can't be
409  # guaranteed that any policies were included.
410  -include frameworks/policies/base/PolicyConfig.mk
411endif
412
413# -------------------------------------------------------------------
414# Fix up CUSTOM_MODULES to refer to installed files rather than
415# just bare module names.  Leave unknown modules alone in case
416# they're actually full paths to a particular file.
417known_custom_modules := $(filter $(ALL_MODULES),$(CUSTOM_MODULES))
418unknown_custom_modules := $(filter-out $(ALL_MODULES),$(CUSTOM_MODULES))
419CUSTOM_MODULES := \
420	$(call module-installed-files,$(known_custom_modules)) \
421	$(unknown_custom_modules)
422
423# -------------------------------------------------------------------
424# Define dependencies for modules that require other modules.
425# This can only happen now, after we've read in all module makefiles.
426#
427# TODO: deal with the fact that a bare module name isn't
428# unambiguous enough.  Maybe declare short targets like
429# APPS:Quake or HOST:SHARED_LIBRARIES:libutils.
430# BUG: the system image won't know to depend on modules that are
431# brought in as requirements of other modules.
432define add-required-deps
433$(1): $(2)
434endef
435$(foreach m,$(ALL_MODULES), \
436  $(eval r := $(ALL_MODULES.$(m).REQUIRED)) \
437  $(if $(r), \
438    $(eval r := $(call module-installed-files,$(r))) \
439    $(eval $(call add-required-deps,$(ALL_MODULES.$(m).INSTALLED),$(r))) \
440   ) \
441 )
442m :=
443r :=
444add-required-deps :=
445
446# -------------------------------------------------------------------
447# Figure out our module sets.
448
449# Of the modules defined by the component makefiles,
450# determine what we actually want to build.
451# If a module has the "restricted" tag on it, it
452# poisons the rest of the tags and shouldn't appear
453# on any list.
454Default_MODULES := $(sort $(ALL_DEFAULT_INSTALLED_MODULES) \
455                          $(ALL_BUILT_MODULES) \
456                          $(CUSTOM_MODULES))
457
458ifdef FULL_BUILD
459  # The base list of modules to build for this product is specified
460  # by the appropriate product definition file, which was included
461  # by product_config.make.
462  user_PACKAGES := $(call module-installed-files, \
463                       $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES))
464  ifeq (0,1)
465    $(info user packages for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):)
466    $(foreach p,$(user_PACKAGES),$(info :   $(p)))
467    $(error done)
468  endif
469else
470  # We're not doing a full build, and are probably only including
471  # a subset of the module makefiles.  Don't try to build any modules
472  # requested by the product, because we probably won't have rules
473  # to build them.
474  user_PACKAGES :=
475endif
476# Use tags to get the non-APPS user modules.  Use the product
477# definition files to get the APPS user modules.
478user_MODULES := $(sort $(call get-tagged-modules,user,_class@APPS restricted))
479user_MODULES := $(user_MODULES) $(user_PACKAGES)
480
481eng_MODULES := $(sort $(call get-tagged-modules,eng,restricted))
482debug_MODULES := $(sort $(call get-tagged-modules,debug,restricted))
483tests_MODULES := $(sort $(call get-tagged-modules,tests,restricted))
484
485droid_MODULES := $(sort $(Default_MODULES) \
486			$(eng_MODULES) \
487			$(debug_MODULES) \
488			$(user_MODULES) \
489			$(all_development_MODULES))
490
491# THIS IS A TOTAL HACK AND SHOULD NOT BE USED AS AN EXAMPLE
492modules_to_build := $(droid_MODULES)
493ifneq ($(override_build_tags),)
494  modules_to_build := $(sort $(Default_MODULES) \
495		      $(foreach tag,$(override_build_tags),$($(tag)_MODULES)))
496#$(error skipping modules $(filter-out $(modules_to_build),$(Default_MODULES) $(droid_MODULES)))
497endif
498
499# Some packages may override others using LOCAL_OVERRIDES_PACKAGES.
500# Filter out (do not install) any overridden packages.
501overridden_packages := $(call get-package-overrides,$(modules_to_build))
502ifdef overridden_packages
503#  old_modules_to_build := $(modules_to_build)
504  modules_to_build := \
505      $(filter-out $(foreach p,$(overridden_packages),$(p) %/$(p).apk), \
506          $(modules_to_build))
507endif
508#$(error filtered out $(filter-out $(modules_to_build),$(old_modules_to_build)))
509
510# Don't include any GNU targets in the SDK.  It's ok (and necessary)
511# to build the host tools, but nothing that's going to be installed
512# on the target (including static libraries).
513ifneq ($(filter sdk,$(MAKECMDGOALS)),)
514  target_gnu_MODULES := \
515              $(filter \
516                      $(TARGET_OUT_INTERMEDIATES)/% \
517                      $(TARGET_OUT)/% \
518                      $(TARGET_OUT_DATA)/%, \
519                              $(sort $(call get-tagged-modules,gnu)))
520  $(info Removing from sdk:)$(foreach d,$(target_gnu_MODULES),$(info : $(d)))
521  modules_to_build := \
522              $(filter-out $(target_gnu_MODULES),$(modules_to_build))
523endif
524
525
526# config/Makefile contains extra stuff that we don't want to pollute this
527# top-level makefile with.  It expects that ALL_DEFAULT_INSTALLED_MODULES
528# contains everything that's built during the current make, but it also further
529# extends ALL_DEFAULT_INSTALLED_MODULES.
530ALL_DEFAULT_INSTALLED_MODULES := $(modules_to_build)
531include $(BUILD_SYSTEM)/Makefile
532modules_to_build := $(sort $(ALL_DEFAULT_INSTALLED_MODULES))
533ALL_DEFAULT_INSTALLED_MODULES :=
534
535endif # dont_bother
536
537# -------------------------------------------------------------------
538# This is used to to get the ordering right, you can also use these,
539# but they're considered undocumented, so don't complain if their
540# behavior changes.
541.PHONY: prebuilt
542prebuilt: $(ALL_PREBUILT)
543
544# An internal target that depends on all copied headers
545# (see copy_headers.make).  Other targets that need the
546# headers to be copied first can depend on this target.
547.PHONY: all_copied_headers
548all_copied_headers: ;
549
550$(ALL_C_CPP_ETC_OBJECTS): | all_copied_headers
551
552# All the droid stuff, in directories
553.PHONY: files
554files: prebuilt $(modules_to_build) $(INSTALLED_ANDROID_INFO_TXT_TARGET)
555
556# -------------------------------------------------------------------
557
558.PHONY: ramdisk
559ramdisk: $(INSTALLED_RAMDISK_TARGET)
560
561.PHONY: systemtarball
562systemtarball: $(INSTALLED_SYSTEMTARBALL_TARGET)
563
564.PHONY: userdataimage
565userdataimage: $(INSTALLED_USERDATAIMAGE_TARGET)
566
567.PHONY: userdatatarball
568userdatatarball: $(INSTALLED_USERDATATARBALL_TARGET)
569
570.PHONY: bootimage
571bootimage: $(INSTALLED_BOOTIMAGE_TARGET)
572
573ifeq ($(BUILD_TINY_ANDROID), true)
574INSTALLED_RECOVERYIMAGE_TARGET :=
575endif
576
577# Build files and then package it into the rom formats
578.PHONY: droidcore
579droidcore: files \
580	systemimage \
581	$(INSTALLED_BOOTIMAGE_TARGET) \
582	$(INSTALLED_RECOVERYIMAGE_TARGET) \
583	$(INSTALLED_USERDATAIMAGE_TARGET) \
584	$(INTERNAL_DEFAULT_DOCS_TARGETS) \
585	$(INSTALLED_FILES_FILE)
586
587# The actual files built by the droidcore target changes depending
588# on the build variant.
589.PHONY: droid tests
590droid tests: droidcore
591
592$(call dist-for-goals, droid, \
593	$(INTERNAL_UPDATE_PACKAGE_TARGET) \
594	$(INTERNAL_OTA_PACKAGE_TARGET) \
595	$(SYMBOLS_ZIP) \
596	$(APPS_ZIP) \
597	$(INTERNAL_EMULATOR_PACKAGE_TARGET) \
598	$(PACKAGE_STATS_FILE) \
599	$(INSTALLED_FILES_FILE) \
600	$(INSTALLED_BUILD_PROP_TARGET) \
601	$(BUILT_TARGET_FILES_PACKAGE) \
602 )
603
604# Tests are installed in userdata.img.  If we're building the tests
605# variant, copy it for "make tests dist".  Also copy a zip of the
606# contents of userdata.img, so that people can easily extract a
607# single .apk.
608ifeq ($(TARGET_BUILD_VARIANT),tests)
609$(call dist-for-goals, droid, \
610	$(INSTALLED_USERDATAIMAGE_TARGET) \
611	$(BUILT_TESTS_ZIP_PACKAGE) \
612 )
613endif
614
615.PHONY: docs
616docs: $(ALL_DOCS)
617
618.PHONY: sdk
619ALL_SDK_TARGETS := $(INTERNAL_SDK_TARGET)
620sdk: $(ALL_SDK_TARGETS)
621$(call dist-for-goals,sdk,$(ALL_SDK_TARGETS))
622
623.PHONY: findbugs
624findbugs: $(INTERNAL_FINDBUGS_HTML_TARGET) $(INTERNAL_FINDBUGS_XML_TARGET)
625
626.PHONY: clean
627dirs_to_clean := \
628	$(PRODUCT_OUT) \
629	$(TARGET_COMMON_OUT_ROOT) \
630	$(HOST_OUT) \
631	$(HOST_COMMON_OUT_ROOT)
632clean:
633	@for dir in $(dirs_to_clean) ; do \
634	    echo "Cleaning $$dir..."; \
635	    rm -rf $$dir; \
636	done
637	@echo "Clean."; \
638
639.PHONY: clobber
640clobber:
641	@rm -rf $(OUT_DIR)
642	@echo "Entire build directory removed."
643
644# The rules for dataclean and installclean are defined in cleanbuild.mk.
645
646#xxx scrape this from ALL_MODULE_NAME_TAGS
647.PHONY: modules
648modules:
649	@echo "Available sub-modules:"
650	@echo "$(call module-names-for-tag-list,$(ALL_MODULE_TAGS))" | \
651	      sed -e 's/  */\n/g' | sort -u | $(COLUMN)
652
653.PHONY: showcommands
654showcommands:
655	@echo >/dev/null
656
657