]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - Makefile
simicsfs: new package
[coffee/buildroot.git] / Makefile
1 # Makefile for buildroot
2 #
3 # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4 # Copyright (C) 2006-2014 by the Buildroot developers <buildroot@uclibc.org>
5 # Copyright (C) 2014 by the Buildroot developers <buildroot@buildroot.org>
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #
21
22 #--------------------------------------------------------------
23 # Just run 'make menuconfig', configure stuff, then run 'make'.
24 # You shouldn't need to mess with anything beyond this point...
25 #--------------------------------------------------------------
26
27 # Set and export the version string
28 export BR2_VERSION := 2014.08-git
29
30 # Check for minimal make version (note: this check will break at make 10.x)
31 MIN_MAKE_VERSION = 3.81
32 ifneq ($(firstword $(sort $(MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION))
33 $(error You have make '$(MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required)
34 endif
35
36 export HOSTARCH := $(shell uname -m | \
37         sed -e s/i.86/x86/ \
38             -e s/sun4u/sparc64/ \
39             -e s/arm.*/arm/ \
40             -e s/sa110/arm/ \
41             -e s/ppc64/powerpc64/ \
42             -e s/ppc/powerpc/ \
43             -e s/macppc/powerpc/\
44             -e s/sh.*/sh/)
45
46 # Parallel execution of this Makefile is disabled because it changes
47 # the packages building order, that can be a problem for two reasons:
48 # - If a package has an unspecified optional dependency and that
49 #   dependency is present when the package is built, it is used,
50 #   otherwise it isn't (but compilation happily proceeds) so the end
51 #   result will differ if the order is swapped due to parallel
52 #   building.
53 # - Also changing the building order can be a problem if two packages
54 #   manipulate the same file in the target directory.
55 #
56 # Taking into account the above considerations, if you still want to execute
57 # this top-level Makefile in parallel comment the ".NOTPARALLEL" line and
58 # build using the following command:
59 #       make BR2_JLEVEL= -j$((`getconf _NPROCESSORS_ONLN`+1))
60 .NOTPARALLEL:
61
62 # absolute path
63 TOPDIR := $(shell pwd)
64 CONFIG_CONFIG_IN = Config.in
65 CONFIG = support/kconfig
66 DATE := $(shell date +%Y%m%d)
67
68 # Compute the full local version string so packages can use it as-is
69 # Need to export it, so it can be got from environment in children (eg. mconf)
70 export BR2_VERSION_FULL := $(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
71
72 noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
73         defconfig %_defconfig allyesconfig allnoconfig silentoldconfig release \
74         randpackageconfig allyespackageconfig allnopackageconfig \
75         source-check print-version olddefconfig
76
77 # Strip quotes and then whitespaces
78 qstrip = $(strip $(subst ",,$(1)))
79 #"))
80
81 # Variables for use in Make constructs
82 comma := ,
83 empty :=
84 space := $(empty) $(empty)
85
86 ifneq ("$(origin O)", "command line")
87 O := output
88 CONFIG_DIR := $(TOPDIR)
89 NEED_WRAPPER =
90 else
91 # other packages might also support Linux-style out of tree builds
92 # with the O=<dir> syntax (E.G. BusyBox does). As make automatically
93 # forwards command line variable definitions those packages get very
94 # confused. Fix this by telling make to not do so
95 MAKEOVERRIDES =
96 # strangely enough O is still passed to submakes with MAKEOVERRIDES
97 # (with make 3.81 atleast), the only thing that changes is the output
98 # of the origin function (command line -> environment).
99 # Unfortunately some packages don't look at origin (E.G. uClibc 0.9.31+)
100 # To really make O go away, we have to override it.
101 override O := $(O)
102 CONFIG_DIR := $(O)
103 # we need to pass O= everywhere we call back into the toplevel makefile
104 EXTRAMAKEARGS = O=$(O)
105 NEED_WRAPPER = y
106 endif
107
108 # bash prints the name of the directory on 'cd <dir>' if CDPATH is
109 # set, so unset it here to not cause problems. Notice that the export
110 # line doesn't affect the environment of $(shell ..) calls, so
111 # explictly throw away any output from 'cd' here.
112 export CDPATH :=
113 BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd)
114 $(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
115
116
117 # Handling of BR2_EXTERNAL.
118 #
119 # The value of BR2_EXTERNAL is stored in .br-external in the output directory.
120 # On subsequent invocations of make, it is read in. It can still be overridden
121 # on the command line, therefore the file is re-created every time make is run.
122 #
123 # When BR2_EXTERNAL is not set, the .br-external file is removed and we point
124 # to support/dummy-external. This makes sure we can unconditionally include the
125 # Config.in and external.mk from the BR2_EXTERNAL directory. In this case,
126 # override is necessary so the user can clear BR2_EXTERNAL from the command
127 # line, but the dummy path is still used internally.
128
129 BR2_EXTERNAL_FILE = $(BASE_DIR)/.br-external
130 -include $(BR2_EXTERNAL_FILE)
131 ifeq ($(BR2_EXTERNAL),)
132   override BR2_EXTERNAL = support/dummy-external
133   $(shell rm -f $(BR2_EXTERNAL_FILE))
134 else
135   _BR2_EXTERNAL = $(shell cd $(BR2_EXTERNAL) >/dev/null 2>&1 && pwd)
136   ifeq ($(_BR2_EXTERNAL),)
137     $(error BR2_EXTERNAL='$(BR2_EXTERNAL)' does not exist, relative to $(TOPDIR))
138   endif
139   override BR2_EXTERNAL := $(_BR2_EXTERNAL)
140   $(shell echo BR2_EXTERNAL ?= $(BR2_EXTERNAL) > $(BR2_EXTERNAL_FILE))
141 endif
142
143 # To make sure the the environment variable overrides the .config option,
144 # set this before including .config.
145 ifneq ($(BR2_DL_DIR),)
146 DL_DIR := $(BR2_DL_DIR)
147 endif
148
149
150 # Need that early, before we scan packages
151 # Avoids doing the $(or...) everytime
152 BR_GRAPH_OUT := $(or $(BR2_GRAPH_OUT),pdf)
153
154 BUILD_DIR := $(BASE_DIR)/build
155 BINARIES_DIR := $(BASE_DIR)/images
156 TARGET_DIR := $(BASE_DIR)/target
157 # initial definition so that 'make clean' works for most users, even without
158 # .config. HOST_DIR will be overwritten later when .config is included.
159 HOST_DIR := $(BASE_DIR)/host
160
161 LEGAL_INFO_DIR = $(BASE_DIR)/legal-info
162 REDIST_SOURCES_DIR_TARGET = $(LEGAL_INFO_DIR)/sources
163 REDIST_SOURCES_DIR_HOST = $(LEGAL_INFO_DIR)/host-sources
164 LICENSE_FILES_DIR_TARGET = $(LEGAL_INFO_DIR)/licenses
165 LICENSE_FILES_DIR_HOST = $(LEGAL_INFO_DIR)/host-licenses
166 LEGAL_MANIFEST_CSV_TARGET = $(LEGAL_INFO_DIR)/manifest.csv
167 LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv
168 LEGAL_LICENSES_TXT_TARGET = $(LEGAL_INFO_DIR)/licenses.txt
169 LEGAL_LICENSES_TXT_HOST = $(LEGAL_INFO_DIR)/host-licenses.txt
170 LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings
171 LEGAL_REPORT = $(LEGAL_INFO_DIR)/README
172
173 BR2_CONFIG = $(CONFIG_DIR)/.config
174
175 # Pull in the user's configuration file
176 ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
177 -include $(BR2_CONFIG)
178 endif
179
180 # To put more focus on warnings, be less verbose as default
181 # Use 'make V=1' to see the full commands
182 ifdef V
183   ifeq ("$(origin V)", "command line")
184     KBUILD_VERBOSE = $(V)
185   endif
186 endif
187 ifndef KBUILD_VERBOSE
188   KBUILD_VERBOSE = 0
189 endif
190
191 ifeq ($(KBUILD_VERBOSE),1)
192   quiet =
193   Q =
194 ifndef VERBOSE
195   VERBOSE = 1
196 endif
197 else
198   quiet = quiet_
199   Q = @
200 endif
201
202 # we want bash as shell
203 SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
204          else if [ -x /bin/bash ]; then echo /bin/bash; \
205          else echo sh; fi; fi)
206
207 # kconfig uses CONFIG_SHELL
208 CONFIG_SHELL := $(SHELL)
209
210 export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE
211
212 ifndef HOSTAR
213 HOSTAR := ar
214 endif
215 ifndef HOSTAS
216 HOSTAS := as
217 endif
218 ifndef HOSTCC
219 HOSTCC := gcc
220 HOSTCC := $(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
221 endif
222 HOSTCC_NOCCACHE := $(HOSTCC)
223 ifndef HOSTCXX
224 HOSTCXX := g++
225 HOSTCXX := $(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
226 endif
227 HOSTCXX_NOCCACHE := $(HOSTCXX)
228 ifndef HOSTFC
229 HOSTFC := gfortran
230 endif
231 ifndef HOSTCPP
232 HOSTCPP := cpp
233 endif
234 ifndef HOSTLD
235 HOSTLD := ld
236 endif
237 ifndef HOSTLN
238 HOSTLN := ln
239 endif
240 ifndef HOSTNM
241 HOSTNM := nm
242 endif
243 ifndef HOSTOBJCOPY
244 HOSTOBJCOPY := objcopy
245 endif
246 ifndef HOSTRANLIB
247 HOSTRANLIB := ranlib
248 endif
249 HOSTAR := $(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
250 HOSTAS := $(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
251 HOSTFC := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
252 HOSTCPP := $(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
253 HOSTLD := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
254 HOSTLN := $(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
255 HOSTNM := $(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
256 HOSTOBJCOPY := $(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy)
257 HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib)
258
259 export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD
260 export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
261
262 # Make sure pkg-config doesn't look outside the buildroot tree
263 unexport PKG_CONFIG_PATH
264 unexport PKG_CONFIG_SYSROOT_DIR
265 unexport PKG_CONFIG_LIBDIR
266
267 # Having DESTDIR set in the environment confuses the installation
268 # steps of some packages.
269 unexport DESTDIR
270
271 # Causes breakage with packages that needs host-ruby
272 unexport RUBYOPT
273
274 ifeq ($(BR2_HAVE_DOT_CONFIG),y)
275
276 ################################################################################
277 #
278 # Hide troublesome environment variables from sub processes
279 #
280 ################################################################################
281 unexport CROSS_COMPILE
282 unexport ARCH
283 unexport CC
284 unexport CXX
285 unexport CPP
286 unexport CFLAGS
287 unexport CXXFLAGS
288 unexport GREP_OPTIONS
289 unexport TAR_OPTIONS
290 unexport CONFIG_SITE
291 unexport QMAKESPEC
292 unexport TERMINFO
293
294 GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
295
296 TARGETS :=
297
298 # silent mode requested?
299 QUIET := $(if $(findstring s,$(MAKEFLAGS)),-q)
300
301 # Strip off the annoying quoting
302 ARCH := $(call qstrip,$(BR2_ARCH))
303
304 KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \
305         -e s/i.86/i386/ -e s/sun4u/sparc64/ \
306         -e s/arcle/arc/ \
307         -e s/arceb/arc/ \
308         -e s/arm.*/arm/ -e s/sa110/arm/ \
309         -e s/aarch64/arm64/ \
310         -e s/bfin/blackfin/ \
311         -e s/parisc64/parisc/ \
312         -e s/powerpc64.*/powerpc/ \
313         -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
314         -e s/sh.*/sh/ \
315         -e s/microblazeel/microblaze/)
316
317 ZCAT := $(call qstrip,$(BR2_ZCAT))
318 BZCAT := $(call qstrip,$(BR2_BZCAT))
319 XZCAT := $(call qstrip,$(BR2_XZCAT))
320 TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf
321
322 # packages compiled for the host go here
323 HOST_DIR := $(call qstrip,$(BR2_HOST_DIR))
324
325 # Quotes are needed for spaces and all in the original PATH content.
326 BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)"
327
328 # locales to generate
329 GENERATE_LOCALE = $(call qstrip,$(BR2_GENERATE_LOCALE))
330
331 TARGET_SKELETON = $(TOPDIR)/system/skeleton
332
333 # Location of a file giving a big fat warning that output/target
334 # should not be used as the root filesystem.
335 TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
336
337 ifeq ($(BR2_CCACHE),y)
338 CCACHE := $(HOST_DIR)/usr/bin/ccache
339 BR_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR))
340 export BR_CACHE_DIR
341 HOSTCC := $(CCACHE) $(HOSTCC)
342 HOSTCXX := $(CCACHE) $(HOSTCXX)
343 endif
344
345 # Scripts in support/ or post-build scripts may need to reference
346 # these locations, so export them so it is easier to use
347 export BR2_CONFIG
348 export TARGET_DIR
349 export STAGING_DIR
350 export HOST_DIR
351 export BINARIES_DIR
352 export BASE_DIR
353
354 ################################################################################
355 #
356 # You should probably leave this stuff alone unless you know
357 # what you are doing.
358 #
359 ################################################################################
360
361 all: world
362
363 # Include legacy before the other things, because package .mk files
364 # may rely on it.
365 ifneq ($(BR2_DEPRECATED),y)
366 include Makefile.legacy
367 endif
368
369 include package/Makefile.in
370 include support/dependencies/dependencies.mk
371
372 # We also need the various per-package makefiles, which also add
373 # each selected package to TARGETS if that package was selected
374 # in the .config file.
375 include toolchain/helpers.mk
376 include toolchain/*/*.mk
377
378 # Include the package override file if one has been provided in the
379 # configuration.
380 PACKAGE_OVERRIDE_FILE = $(call qstrip,$(BR2_PACKAGE_OVERRIDE_FILE))
381 ifneq ($(PACKAGE_OVERRIDE_FILE),)
382 -include $(PACKAGE_OVERRIDE_FILE)
383 endif
384
385 include $(sort $(wildcard package/*/*.mk))
386
387 include boot/common.mk
388 include linux/linux.mk
389 include system/system.mk
390 include fs/common.mk
391
392 include $(BR2_EXTERNAL)/external.mk
393
394 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
395 ifneq ($(GENERATE_LOCALE),)
396 TARGETS += target-generatelocales
397 endif
398 endif
399
400 ifeq ($(BR2_ECLIPSE_REGISTER),y)
401 TARGETS += toolchain-eclipse-register
402 endif
403
404 TARGETS_SOURCE := $(patsubst %,%-source,$(TARGETS))
405 TARGETS_DIRCLEAN := $(patsubst %,%-dirclean,$(TARGETS))
406
407 # host-* dependencies have to be handled specially, as those aren't
408 # visible in Kconfig and hence not added to a variable like TARGETS.
409 # instead, find all the host-* targets listed in each <PKG>_DEPENDENCIES
410 # variable for each enabled target.
411 # Notice: this only works for newstyle gentargets/autotargets packages
412 TARGETS_HOST_DEPS = $(sort $(filter host-%,$(foreach dep,\
413                 $(addsuffix _DEPENDENCIES,\
414                         $(call UPPERCASE,$(TARGETS) $(TARGETS_ROOTFS))),\
415                 $($(dep)))))
416 # Host packages can in turn have their own dependencies. Likewise find
417 # all the package names listed in the HOST_<PKG>_DEPENDENCIES for each
418 # host package found above. Ideally this should be done recursively until
419 # no more packages are found, but that's hard to do in make, so limit to
420 # 1 level for now.
421 HOST_DEPS = $(sort $(foreach dep,\
422                 $(addsuffix _DEPENDENCIES,$(call UPPERCASE,$(TARGETS_HOST_DEPS))),\
423                 $($(dep))))
424 HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS)))
425
426 TARGETS_LEGAL_INFO := $(patsubst %,%-legal-info,\
427                 $(TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS))))
428
429 dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
430         $(HOST_DIR) $(BINARIES_DIR)
431
432 $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
433         $(MAKE1) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig
434
435 prepare: $(BUILD_DIR)/buildroot-config/auto.conf
436
437 # Add base dependencies to all targets even on those not based on the
438 # package framework.
439 $(TARGETS): dirs prepare dependencies
440
441 world: target-post-image
442
443 .PHONY: all world toolchain dirs clean distclean source outputmakefile \
444         legal-info legal-info-prepare legal-info-clean printvars \
445         target-finalize target-post-image \
446         $(TARGETS) $(TARGETS_ROOTFS) \
447         $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) \
448         $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
449         $(HOST_DIR) $(BINARIES_DIR)
450
451 ################################################################################
452 #
453 # staging and target directories do NOT list these as
454 # dependencies anywhere else
455 #
456 ################################################################################
457 $(BUILD_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST):
458         @mkdir -p $@
459
460 # We make a symlink lib32->lib or lib64->lib as appropriate
461 # MIPS64/n32 requires lib32 even though it's a 64-bit arch.
462 ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),y)
463 LIB_SYMLINK = lib64
464 else
465 LIB_SYMLINK = lib32
466 endif
467
468 $(STAGING_DIR):
469         @mkdir -p $(STAGING_DIR)/bin
470         @mkdir -p $(STAGING_DIR)/lib
471         @ln -snf lib $(STAGING_DIR)/$(LIB_SYMLINK)
472         @mkdir -p $(STAGING_DIR)/usr/lib
473         @ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK)
474         @mkdir -p $(STAGING_DIR)/usr/include
475         @mkdir -p $(STAGING_DIR)/usr/bin
476         @ln -snf $(STAGING_DIR) $(BASE_DIR)/staging
477
478 ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
479 TARGET_SKELETON = $(BR2_ROOTFS_SKELETON_CUSTOM_PATH)
480 endif
481
482 RSYNC_VCS_EXCLUSIONS = \
483         --exclude .svn --exclude .git --exclude .hg --exclude .bzr \
484         --exclude CVS
485
486 $(BUILD_DIR)/.root:
487         mkdir -p $(TARGET_DIR)
488         rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \
489                 --chmod=Du+w --exclude .empty --exclude '*~' \
490                 $(TARGET_SKELETON)/ $(TARGET_DIR)/
491         $(INSTALL) -m 0644 support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
492         @ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
493         @mkdir -p $(TARGET_DIR)/usr
494         @ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)
495         touch $@
496
497 $(TARGET_DIR): $(BUILD_DIR)/.root
498
499 STRIP_FIND_CMD = find $(TARGET_DIR)
500 ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS)))
501 STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o
502 endif
503 STRIP_FIND_CMD += -type f \( -perm /111 -o -name '*.so*' \)
504 # file exclusions:
505 # - libpthread.so: a non-stripped libpthread shared library is needed for
506 #   proper debugging of pthread programs using gdb.
507 # - kernel modules (*.ko): do not function properly when stripped like normal
508 #   applications and libraries. Normally kernel modules are already excluded
509 #   by the executable permission check above, so the explicit exclusion is only
510 #   done for kernel modules with incorrect permissions.
511 STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* *.ko $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print
512
513 ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
514 LOCALE_WHITELIST = $(BUILD_DIR)/locales.nopurge
515 LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
516
517 define TARGET_PURGE_LOCALES
518         rm -f $(LOCALE_WHITELIST)
519         for i in $(LOCALE_NOPURGE); do echo $$i >> $(LOCALE_WHITELIST); done
520
521         for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/man /usr/share/man /usr/lib/locale)); \
522         do \
523                 for lang in $$(cd $$dir; ls .|grep -v man); \
524                 do \
525                         grep -qx $$lang $(LOCALE_WHITELIST) || rm -rf $$dir/$$lang; \
526                 done; \
527         done
528 endef
529 endif
530
531 $(TARGETS_ROOTFS): target-finalize
532
533 target-finalize: $(TARGETS)
534         @$(call MESSAGE,"Finalizing target directory")
535         $(TARGET_PURGE_LOCALES)
536         rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
537                 $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
538                 $(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
539         find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
540         find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
541         find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
542 ifneq ($(BR2_PACKAGE_GDB),y)
543         rm -rf $(TARGET_DIR)/usr/share/gdb
544 endif
545         rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
546         rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
547         rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc
548         rm -rf $(TARGET_DIR)/usr/share/gtk-doc
549         -rmdir $(TARGET_DIR)/usr/share 2>/dev/null
550 ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY)$(BR2_PACKAGE_PYTHON3_PY_ONLY),y)
551         find $(TARGET_DIR)/usr/lib/ -name '*.pyc' -print0 | xargs -0 rm -f
552 endif
553 ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PYC_ONLY),y)
554         find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f
555 endif
556         rm -rf $(TARGET_DIR)/usr/lib/luarocks
557         rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE
558         find $(TARGET_DIR)/usr/lib/perl5/ -name '*.bs' -print0 | xargs -0 rm -f
559         find $(TARGET_DIR)/usr/lib/perl5/ -name '.packlist' -print0 | xargs -0 rm -f
560         $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true
561         if test -d $(TARGET_DIR)/lib/modules; then \
562                 find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
563                 xargs -r $(KSTRIPCMD); fi
564
565 # See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads
566 # besides the one in which crash occurred; or SIGTRAP kills my program when
567 # I set a breakpoint"
568 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
569         find $(TARGET_DIR)/lib -type f -name 'libpthread*.so*' | \
570                 xargs -r $(STRIPCMD) $(STRIP_STRIP_DEBUG)
571 endif
572
573         mkdir -p $(TARGET_DIR)/etc
574         # Mandatory configuration file and auxilliary cache directory
575         # for recent versions of ldconfig
576         touch $(TARGET_DIR)/etc/ld.so.conf
577         mkdir -p $(TARGET_DIR)/var/cache/ldconfig
578         if [ -x "$(TARGET_CROSS)ldconfig" ]; \
579         then \
580                 $(TARGET_CROSS)ldconfig -r $(TARGET_DIR); \
581         else \
582                 /sbin/ldconfig -r $(TARGET_DIR); \
583         fi
584         ( \
585                 echo "NAME=Buildroot"; \
586                 echo "VERSION=$(BR2_VERSION_FULL)"; \
587                 echo "ID=buildroot"; \
588                 echo "VERSION_ID=$(BR2_VERSION)"; \
589                 echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \
590         ) >  $(TARGET_DIR)/etc/os-release
591
592         @$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
593                 $(call MESSAGE,"Copying overlay $(d)"); \
594                 rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \
595                         --chmod=Du+w --exclude .empty --exclude '*~' \
596                         $(d)/ $(TARGET_DIR)$(sep))
597
598         @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
599                 $(call MESSAGE,"Executing post-build script $(s)"); \
600                 $(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
601
602 ifneq ($(GENERATE_LOCALE),)
603 # Generate locale data. Basically, we call the localedef program
604 # (built by the host-localedef package) for each locale. The input
605 # data comes preferably from the toolchain, or if the toolchain does
606 # not have them (Linaro toolchains), we use the ones available on the
607 # host machine.
608 target-generatelocales: host-localedef toolchain
609         $(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/
610         $(Q)for locale in $(GENERATE_LOCALE) ; do \
611                 inputfile=`echo $${locale} | cut -f1 -d'.'` ; \
612                 charmap=`echo $${locale} | cut -f2 -d'.' -s` ; \
613                 if test -z "$${charmap}" ; then \
614                         charmap="UTF-8" ; \
615                 fi ; \
616                 echo "Generating locale $${inputfile}.$${charmap}" ; \
617                 I18NPATH=$(STAGING_DIR)/usr/share/i18n:/usr/share/i18n \
618                 $(HOST_DIR)/usr/bin/localedef \
619                         --prefix=$(TARGET_DIR) \
620                         --$(call LOWERCASE,$(BR2_ENDIAN))-endian \
621                         -i $${inputfile} -f $${charmap} \
622                         $${locale} ; \
623         done
624 endif
625
626 target-post-image: $(TARGETS_ROOTFS) target-finalize
627         @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
628                 $(call MESSAGE,"Executing post-image script $(s)"); \
629                 $(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
630
631 toolchain-eclipse-register: toolchain
632         ./support/scripts/eclipse-register-toolchain `readlink -f $(O)` $(notdir $(TARGET_CROSS)) $(BR2_ARCH)
633
634 source: $(TARGETS_SOURCE) $(HOST_SOURCE)
635
636 external-deps:
637         @$(MAKE1) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source | sort -u
638
639 legal-info-clean:
640         @rm -fr $(LEGAL_INFO_DIR)
641
642 legal-info-prepare: $(LEGAL_INFO_DIR)
643         @$(call MESSAGE,"Collecting legal info")
644         @$(call legal-license-file,buildroot,COPYING,COPYING,HOST)
645         @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,TARGET)
646         @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,HOST)
647         @$(call legal-manifest,buildroot,$(BR2_VERSION_FULL),GPLv2+,COPYING,not saved,HOST)
648         @$(call legal-warning,the Buildroot source code has not been saved)
649         @$(call legal-warning,the toolchain has not been saved)
650         @cp $(BR2_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config
651
652 legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_LEGAL_INFO) \
653                 $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST)
654         @cat support/legal-info/README.header >>$(LEGAL_REPORT)
655         @if [ -r $(LEGAL_WARNINGS) ]; then \
656                 cat support/legal-info/README.warnings-header \
657                         $(LEGAL_WARNINGS) >>$(LEGAL_REPORT); \
658                 cat $(LEGAL_WARNINGS); fi
659         @echo "Legal info produced in $(LEGAL_INFO_DIR)"
660         @rm -f $(LEGAL_WARNINGS)
661
662 show-targets:
663         @echo $(HOST_DEPS) $(TARGETS_HOST_DEPS) $(TARGETS) $(TARGETS_ROOTFS)
664
665 graph-build: $(O)/build/build-time.log
666         @install -d $(O)/graphs
667         $(foreach o,name build duration,./support/scripts/graph-build-time \
668                                         --type=histogram --order=$(o) --input=$(<) \
669                                         --output=$(O)/graphs/build.hist-$(o).$(BR_GRAPH_OUT) \
670                                         $(if $(BR2_GRAPH_ALT),--alternate-colors)$(sep))
671         $(foreach t,packages steps,./support/scripts/graph-build-time \
672                                    --type=pie-$(t) --input=$(<) \
673                                    --output=$(O)/graphs/build.pie-$(t).$(BR_GRAPH_OUT) \
674                                    $(if $(BR2_GRAPH_ALT),--alternate-colors)$(sep))
675
676 graph-depends:
677         @$(INSTALL) -d $(O)/graphs
678         @cd "$(CONFIG_DIR)"; \
679         $(TOPDIR)/support/scripts/graph-depends $(BR2_GRAPH_DEPS_OPTS) \
680         |tee $(O)/graphs/$(@).dot \
681         |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(O)/graphs/$(@).$(BR_GRAPH_OUT)
682
683 else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
684
685 all: menuconfig
686
687 endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
688
689 # configuration
690 # ---------------------------------------------------------------------------
691
692 HOSTCFLAGS = $(CFLAGS_FOR_BUILD)
693 export HOSTCFLAGS
694
695 $(BUILD_DIR)/buildroot-config/%onf:
696         mkdir -p $(@D)/lxdialog
697         $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
698
699 DEFCONFIG = $(call qstrip,$(BR2_DEFCONFIG))
700
701 # We don't want to fully expand BR2_DEFCONFIG here, so Kconfig will
702 # recognize that if it's still at its default $(CONFIG_DIR)/defconfig
703 COMMON_CONFIG_ENV = \
704         BR2_DEFCONFIG='$(call qstrip,$(value BR2_DEFCONFIG))' \
705         KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
706         KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
707         KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
708         BR2_CONFIG=$(BR2_CONFIG) \
709         BR2_EXTERNAL=$(BR2_EXTERNAL)
710
711 xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
712         @mkdir -p $(BUILD_DIR)/buildroot-config
713         @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
714
715 gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile
716         @mkdir -p $(BUILD_DIR)/buildroot-config
717         @$(COMMON_CONFIG_ENV) srctree=$(TOPDIR) $< $(CONFIG_CONFIG_IN)
718
719 menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile
720         @mkdir -p $(BUILD_DIR)/buildroot-config
721         @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
722
723 nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile
724         @mkdir -p $(BUILD_DIR)/buildroot-config
725         @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
726
727 config: $(BUILD_DIR)/buildroot-config/conf outputmakefile
728         @mkdir -p $(BUILD_DIR)/buildroot-config
729         @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
730
731 oldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
732         mkdir -p $(BUILD_DIR)/buildroot-config
733         @$(COMMON_CONFIG_ENV) $< --oldconfig $(CONFIG_CONFIG_IN)
734
735 randconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
736         @mkdir -p $(BUILD_DIR)/buildroot-config
737         @$(COMMON_CONFIG_ENV) $< --randconfig $(CONFIG_CONFIG_IN)
738
739 allyesconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
740         @mkdir -p $(BUILD_DIR)/buildroot-config
741         @$(COMMON_CONFIG_ENV) $< --allyesconfig $(CONFIG_CONFIG_IN)
742
743 allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
744         @mkdir -p $(BUILD_DIR)/buildroot-config
745         @$(COMMON_CONFIG_ENV) $< --allnoconfig $(CONFIG_CONFIG_IN)
746
747 randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
748         @mkdir -p $(BUILD_DIR)/buildroot-config
749         @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
750         @grep '^config BR2_PACKAGE_' Config.in.legacy | \
751                 while read config pkg; do \
752                 echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done
753         @$(COMMON_CONFIG_ENV) \
754                 KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
755                 $< --randconfig $(CONFIG_CONFIG_IN)
756         @rm -f $(CONFIG_DIR)/.config.nopkg
757
758 allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
759         @mkdir -p $(BUILD_DIR)/buildroot-config
760         @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
761         @grep '^config BR2_PACKAGE_' Config.in.legacy | \
762                 while read config pkg; do \
763                 echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done
764         @$(COMMON_CONFIG_ENV) \
765                 KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
766                 $< --allyesconfig $(CONFIG_CONFIG_IN)
767         @rm -f $(CONFIG_DIR)/.config.nopkg
768
769 allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
770         @mkdir -p $(BUILD_DIR)/buildroot-config
771         @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
772         @$(COMMON_CONFIG_ENV) \
773                 KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
774                 $< --allnoconfig $(CONFIG_CONFIG_IN)
775         @rm -f $(CONFIG_DIR)/.config.nopkg
776
777 silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
778         @mkdir -p $(BUILD_DIR)/buildroot-config
779         $(COMMON_CONFIG_ENV) $< --silentoldconfig $(CONFIG_CONFIG_IN)
780
781 olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
782         @mkdir -p $(BUILD_DIR)/buildroot-config
783         $(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN)
784
785 defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
786         @mkdir -p $(BUILD_DIR)/buildroot-config
787         @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
788
789 %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
790         @mkdir -p $(BUILD_DIR)/buildroot-config
791         @$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
792
793 %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(BR2_EXTERNAL)/configs/%_defconfig outputmakefile
794         @mkdir -p $(BUILD_DIR)/buildroot-config
795         @$(COMMON_CONFIG_ENV) $< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN)
796
797 savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
798         @mkdir -p $(BUILD_DIR)/buildroot-config
799         @$(COMMON_CONFIG_ENV) $< \
800                 --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
801                 $(CONFIG_CONFIG_IN)
802
803 # check if download URLs are outdated
804 source-check:
805         $(MAKE1) DL_MODE=SOURCE_CHECK $(EXTRAMAKEARGS) source
806
807 .PHONY: defconfig savedefconfig
808
809 ################################################################################
810 #
811 # Cleanup and misc junk
812 #
813 ################################################################################
814
815 # outputmakefile generates a Makefile in the output directory, if using a
816 # separate output directory. This allows convenient use of make in the
817 # output directory.
818 outputmakefile:
819 ifeq ($(NEED_WRAPPER),y)
820         $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
821 endif
822
823 # printvars prints all the variables currently defined in our Makefiles
824 printvars:
825         @$(foreach V, \
826                 $(sort $(.VARIABLES)), \
827                 $(if $(filter-out environment% default automatic, \
828                                 $(origin $V)), \
829                 $(info $V=$($V) ($(value $V)))))
830
831 clean:
832         rm -rf $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \
833                 $(BUILD_DIR) $(BASE_DIR)/staging \
834                 $(LEGAL_INFO_DIR)
835
836 distclean: clean
837 ifeq ($(DL_DIR),$(TOPDIR)/dl)
838         rm -rf $(DL_DIR)
839 endif
840 ifeq ($(O),output)
841         rm -rf $(O)
842 endif
843         rm -rf $(BR2_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/.auto.deps
844
845 help:
846         @echo 'Cleaning:'
847         @echo '  clean                  - delete all files created by build'
848         @echo '  distclean              - delete all non-source files (including .config)'
849         @echo
850         @echo 'Build:'
851         @echo '  all                    - make world'
852         @echo '  toolchain              - build toolchain'
853         @echo '  <package>-rebuild      - force recompile <package>'
854         @echo '  <package>-reconfigure  - force reconfigure <package>'
855         @echo '  <package>-graph-depends    - generate graph of the dependency tree for package'
856         @echo
857         @echo 'Configuration:'
858         @echo '  menuconfig             - interactive curses-based configurator'
859         @echo '  nconfig                - interactive ncurses-based configurator'
860         @echo '  xconfig                - interactive Qt-based configurator'
861         @echo '  gconfig                - interactive GTK-based configurator'
862         @echo '  oldconfig              - resolve any unresolved symbols in .config'
863         @echo '  silentoldconfig        - Same as oldconfig, but quietly, additionally update deps'
864         @echo '  olddefconfig           - Same as silentoldconfig but sets new symbols to their default value'
865         @echo '  randconfig             - New config with random answer to all options'
866         @echo '  defconfig              - New config with default answer to all options'
867         @echo '                             BR2_DEFCONFIG, if set, is used as input'
868         @echo '  savedefconfig          - Save current config as ./defconfig (minimal config)'
869         @echo '  allyesconfig           - New config where all options are accepted with yes'
870         @echo '  allnoconfig            - New config where all options are answered with no'
871         @echo '  randpackageconfig      - New config with random answer to package options'
872         @echo '  allyespackageconfig    - New config where pkg options are accepted with yes'
873         @echo '  allnopackageconfig     - New config where package options are answered with no'
874 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
875         @echo '  busybox-menuconfig     - Run BusyBox menuconfig'
876 endif
877 ifeq ($(BR2_LINUX_KERNEL),y)
878         @echo '  linux-menuconfig       - Run Linux kernel menuconfig'
879         @echo '  linux-savedefconfig    - Run Linux kernel savedefconfig'
880 endif
881 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
882         @echo '  uclibc-menuconfig      - Run uClibc menuconfig'
883 endif
884 ifeq ($(BR2_TARGET_BAREBOX),y)
885         @echo '  barebox-menuconfig     - Run barebox menuconfig'
886         @echo '  barebox-savedefconfig  - Run barebox savedefconfig'
887 endif
888         @echo
889         @echo 'Documentation:'
890         @echo '  manual                 - build manual in all formats'
891         @echo '  manual-html            - build manual in HTML'
892         @echo '  manual-split-html      - build manual in split HTML'
893         @echo '  manual-pdf             - build manual in PDF'
894         @echo '  manual-text            - build manual in text'
895         @echo '  manual-epub            - build manual in ePub'
896         @echo '  graph-build            - generate graphs of the build times'
897         @echo '  graph-depends          - generate graph of the dependency tree'
898         @echo
899         @echo 'Miscellaneous:'
900         @echo '  source                 - download all sources needed for offline-build'
901         @echo '  source-check           - check selected packages for valid download URLs'
902         @echo '  external-deps          - list external packages used'
903         @echo '  legal-info             - generate info about license compliance'
904         @echo
905         @echo '  make V=0|1             - 0 => quiet build (default), 1 => verbose build'
906         @echo '  make O=dir             - Locate all output files in "dir", including .config'
907         @echo
908         @echo 'Built-in configs:'
909         @$(foreach b, $(sort $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig))), \
910           printf "  %-35s - Build for %s\\n" $(b) $(b:_defconfig=);)
911 ifneq ($(wildcard $(BR2_EXTERNAL)/configs/*_defconfig),)
912         @echo
913         @echo 'User-provided configs:'
914         @$(foreach b, $(sort $(notdir $(wildcard $(BR2_EXTERNAL)/configs/*_defconfig))), \
915           printf "  %-35s - Build for %s\\n" $(b) $(b:_defconfig=);)
916 endif
917         @echo
918         @echo 'See docs/README, or generate the Buildroot manual for further details'
919         @echo
920
921 release: OUT = buildroot-$(BR2_VERSION)
922
923 # Create release tarballs. We need to fiddle a bit to add the generated
924 # documentation to the git output
925 release:
926         git archive --format=tar --prefix=$(OUT)/ HEAD > $(OUT).tar
927         $(MAKE) O=$(OUT) manual-html manual-text manual-pdf
928         tar rf $(OUT).tar $(OUT)
929         gzip -9 -c < $(OUT).tar > $(OUT).tar.gz
930         bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2
931         rm -rf $(OUT) $(OUT).tar
932
933 print-version:
934         @echo $(BR2_VERSION_FULL)
935
936 include docs/manual/manual.mk
937
938 .PHONY: $(noconfig_targets)