summaryrefslogtreecommitdiff
path: root/scripts/Makefile.clean
AgeCommit message (Collapse)Author
2010-03-11kbuild: Really don't clean bounds.h and asm-offsets.hMichal Marek
Commit 7d3cc8b tried to keep bounds.h and asm-offsets.h during make clean by filtering these out of $(clean-files), but they are listed in $(targets) and $(always) and thus removed automatically. Introduce a new $(no-clean-files) variable to really skip such files in Makefile.clean. Signed-off-by: Michal Marek <mmarek@suse.cz>
2008-04-25kbuild: fix some minor typoesRobert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12kbuild: kill backward compatibility checksSam Ravnborg
These checks has been present for several kernel releases (> 5). So lets just get rid of them. With this we no longer check for use of: EXTRA_TARGETS, O_TARGET, L_TARGET, list-multi, export-objs There were three remaining in-tree users of O_TARGET in some unmaintained sh64 code - mail sent to the maintainer + list. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-03-06kbuild: change kbuild to not rely on incorrect GNU make behaviorPaul Smith
The kbuild system takes advantage of an incorrect behavior in GNU make. Once this behavior is fixed, all files in the kernel rebuild every time, even if nothing has changed. This patch ensures kbuild works with both the incorrect and correct behaviors of GNU make. For more details on the incorrect behavior, see: http://lists.gnu.org/archive/html/bug-make/2006-03/msg00003.html Changes in this patch: - Keep all targets that are to be marked .PHONY in a variable, PHONY. - Add .PHONY: $(PHONY) to mark them properly. - Remove any $(PHONY) files from the $? list when determining whether targets are up-to-date or not. Signed-off-by: Paul Smith <psmith@gnu.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-27kbuild: fix building external modulesSam Ravnborg
kbuild failed to locate Makefile for external modules. This brought to my attention how the variables for directories have different values in different usage scenarios. Different kbuild usage scenarios: make - plain make in same directory where kernel source lives make O= - kbuild is told to store output files in another directory make M= - building an external module make O= M= - building an external module with kernel output seperate from src Value assigned to the different variables: |$(src) |$(obj) |$(srctree) |$(objtree) make |reldir to k src |as src |abs path to k src |abs path to k src make O= |reldir to k src |as src |abs path to k src |abs path to output dir make M= |abs path to src |as src |abs path to k src |abs path to k src make O= M= |abs path to src |as src |abs path to k src |abs path to k output path to kbuild file: make | $(srctree)/$(src), $(src) make O= | $(srctree)/$(src) make M= | $(src) make O= M= | $(src) From the table above it can be seen that the only good way to find the home directory of the kbuild file is to locate the one of the two variants that is an absolute path. If $(src) is an absolute path (starts with /) then use it, otherwise prefix $(src) with $(srctree). Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-25kbuild: define clean before including kbuild fileSam Ravnborg
Defining clean before including the kbuild file give us knowledge when the kbuild file is included for cleaning. This is rarey usefull - but in a corner case in klibc this proved necessary. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> ---
2005-07-25kbuild: fix make O=...Sam Ravnborg
kbuild failed to locate Kbuild.include. Teach kbuild how to find Kbuild files when using make O=... Signed-off-by: Sam Ravnborg <sam@ravnborg.org> ---
2004-11-03kbuild: Prefer Kbuild as name of the kbuild filesSam Ravnborg
The kbuild syntax is unique and does only have very few things in common with usual Makefile syntax. So to avoid confusion make the filename 'Kbuild' be the preferred name as replacement for 'Makefile'. No global renaming planned to take place for now, but new stuff expected to use the new 'Kbuild' filename. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2004-08-19kbuild: add comments to Makefile.cleanSam Ravnborg
Chris Wedgwood <cw@f00f.org> wrote: > P.S. I'd love to see the rules in scripts/Makefile.* documented. I > would offer a patch for this but I don't understand the rules > myself... And provided the following patch, slightly modified by me. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2004-08-11kbuild: Introduce hostprogs-y, deprecate host-progsSam Ravnborg
Introducing hostprogs-y allows a user to use the typical Kbuild pattern in a Kbuild file: hostprogs-$(CONFIG_KALLSYMS) += ... And then during cleaning the referenced file are still deleted. Deprecate the old host-progs assignment but kept the functionlity. External modules will continue to use host-progs for a while - drawback is that they now see a warning. Workaround - just assign both variables: hostprogs-y := foo host-progs := $(hostprogs-y) All in-kernel users will be converted in next patch. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2004-08-10kbuild: Accept absolute paths in clean-files and introduce clean-dirsSam Ravnborg
Teach kbuild to accept absolute paths in clean-files. This avoids using clean-rules in several places. Introduced clean-dirs to delete complete directories. Kept clean-rule - but do not print anything when used. Cleaned up a few places now the infrastructure are improved. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2003-09-11kbuild: Separate output directorySam Ravnborg
Separate output directory support enables the following (at least): o Building several configurations from the same SRC base, and in parrallel o Building from a RO media o More efficient build if files are retreived via NFS (files stored locally) Usage is simple: cd /path/to/kernel/src mkdir ~/build/kernel make O=~/build/kernel [Make options] Please note: The O= syntax must be used for ALL invocations of make. As an alternative you may set KBUILD_OUTPUT to the directory where to put the output files. The patch works for me, and I have tried with various configurations, including allnoconfig and defconfig. How it works: If the O= option is used, or KBUILD_OUTPUT is set then a second invocation of make happens in the output directory. The second invocation of make uses VPATH to tell make where to locate the files. Furthermore include options for gcc is modifyied to point both in the directory where the kernel src is located, and in the directory where the output files are located. The latter is used for generated .h files. When building the kernel the asm symlink is created. To support this a new 'include2' directory is created. Within include2/ asm is a symlink to the asm-$(ARCH) directory in the kernel src. Also when building the kernel the asm-offset.h file is created, and located in the include/asm-$(ARCH) directory, but included via <asm/asm-offset.h>. Therefore within include/ another asm symlink is created pointing to the asm-$(ARCH) directory located in the output directory. In Makefile.build the output directory is created if not already present. This was needed to support xfs, and oprofile. The patch is loosly based on ideas from Kai G. Roman Zippel introduced support for this in kconfig long time ago
2003-03-11kbuild: build-targets replaced with alwaysSam Ravnborg
The former name "kbuild-targets" did not give the user the intuitive feeling that this target will be build regards less of any dependencies no matter if we compile modules or not. The new name "always" imply that this will be build always, and tus is more informative. Fixed the few users of build-targets, and added a warning in Makefile.build
2003-03-10kbuild: Introduced extra-y, as replacement for EXTRA_TARGETSSam Ravnborg
EXTRA_TARGETS has been overloaded with functionality. This is now split in two: targets := list targets kbuild did not know of otherwise extra-y := list targets to be build when not building modules only. extra-y is mainly used to list .o files that is not to be included in the fnal built-in.o file for a directory.
2003-03-10kbuild: Use targets := to tell kbuild about additional targetsSam Ravnborg
EXTRA_TARGETS served several purposes before: 1) List targets to be build (built-in only) 2) Inform kbuild of targets within the makefile Mixing the above are causing confusion, so for now on targets := is used to inform kbuild about targets in a Makefile - that it otherwise did not know about. kbuild uses the "targets :=" information to: a) read the dependency file .target.cmd b) delete the target file during make clean
2003-02-18kbuild: Remove scripts/elfconfig.h with "make clean"Kai Germaschewski
We have a bit of a mess with build-targets, EXTRA_TARGETS, targets, which needs cleaning up some time. Anyway, we just add $(targets) to the files which get deleted with "make clean" for now.
2002-12-30kbuild: $(build) and $(clean) macros for make invocationSam Ravnborg
The former macro $(descend ...) hide for make the fact that a recursively make was invoked. The replacement $(Q)$(MAKE) -f scripts/Makefile.build obj=dir was too verbose. Introduced $(build) and $(clean) allowing the following syntax: $(Q)$(MAKE) $(build)=arch/i386/boot target and similar for clean. Introduced $(build) and $(clean) in general, and for i386 architecture.
2002-10-28kbuild: Fix a "make -j<N>" warningKai Germaschewski
2002-10-25kbuild: Removed unused definitionsSam Ravnborg
o Deleted subdir-n and subdir- handling in Makefile.build o Deleted all host-progs related stuff in Makfile.modver o In Makefile.modver also deleted everything related to composite objects o Fixed an error when deleting a .ver file + .hdepend and then do make - filter-out in Makefile.modver was faulty
2002-10-23kbuild: Convert build and modversion phasesKai Germaschewski
Alright, so now actually all four phases are converted to new-style, i.e. we call make -f scripts/Makefile.<phase> which includes the actual subdir Makefile. The obvious drawback is some code duplication between the four scripts/Makefile.<phase>, which could easily be overcome including shared parts, but since I'm going for maximum performance, I did not for now. Rules.make is empty now ;) (Well, not quite, since if it was 0 bytes, make mrproper would remove it...)
2002-10-23kbuild: Switch "make modules_install" to fast mode ;)Kai Germaschewski
Use the same way we came up with for "make clean" for "make modules_install", gaining a nice speed-up. Also, some cosmetics for scripts/Makefile.clean
2002-10-23kbuild: Shut up "make clean" in non-verbose modeKai Germaschewski
$(call ...) has a measurable performance impact, so use the new variable $(Q), which evaluates to @ when quiet to supress the echoing of commands if not wanted. IIRC, Keith Owens' kbuild-2.5 came up with that idea, so credit goes there.
2002-10-16kbuild: another "make clean" micro-optimizationKai Germaschewski
Patch by Peter Samuelson, merged to current code, actually has a noticable impact on "make clean" speed.
2002-10-16kbuild: Speed up new "make clean/mrproper"Kai Germaschewski
Do as little as possible apart from calling sub-makes and calling 'rm', which makes things go quite a bit faster.