Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tomeu Vizoso
linux
Commits
60eab877
Commit
60eab877
authored
14 years ago
by
Michal Marek
Browse files
Options
Downloads
Plain Diff
Merge branch 'kbuild/clean' into kbuild/kbuild
parents
c3e2f196
88d7be03
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Documentation/kbuild/makefiles.txt
+7
-0
7 additions, 0 deletions
Documentation/kbuild/makefiles.txt
Kbuild
+2
-2
2 additions, 2 deletions
Kbuild
Makefile
+13
-20
13 additions, 20 deletions
Makefile
scripts/Makefile.clean
+2
-0
2 additions, 0 deletions
scripts/Makefile.clean
with
24 additions
and
22 deletions
Documentation/kbuild/makefiles.txt
+
7
−
0
View file @
60eab877
...
...
@@ -779,6 +779,13 @@ This will delete the directory debian, including all subdirectories.
Kbuild will assume the directories to be in the same relative path as the
Makefile if no absolute path is specified (path does not start with '/').
To exclude certain files from make clean, use the $(no-clean-files) variable.
This is only a special case used in the top level Kbuild file:
Example:
#Kbuild
no-clean-files := $(bounds-file) $(offsets-file)
Usually kbuild descends down in subdirectories due to "obj-* := dir/",
but in the architecture makefiles where the kbuild infrastructure
is not sufficient this sometimes needs to be explicit.
...
...
This diff is collapsed.
Click to expand it.
Kbuild
+
2
−
2
View file @
60eab877
...
...
@@ -94,5 +94,5 @@ PHONY += missing-syscalls
missing-syscalls: scripts/checksyscalls.sh FORCE
$(call cmd,syscalls)
#
Delete all target
s during make clean
clean-files :=
$(addprefix $(objtree)/,$(filter-out
$(bounds-file) $(offsets-file)
,$(targets)))
#
Keep these two file
s during make clean
no-
clean-files := $(bounds-file) $(offsets-file)
This diff is collapsed.
Click to expand it.
Makefile
+
13
−
20
View file @
60eab877
...
...
@@ -1119,21 +1119,13 @@ MRPROPER_FILES += .config .config.old .version .old_version \
#
clean
:
rm-dirs := $(CLEAN_DIRS)
clean
:
rm-files := $(CLEAN_FILES)
clean-dirs
:=
$(
addprefix _clean_,
$(
srctree
)
$(
vmlinux-alldirs
)
Documentation
)
clean-dirs
:=
$(
addprefix _clean_,
.
$(
vmlinux-alldirs
)
Documentation
)
PHONY
+=
$(
clean-dirs
)
clean archclean
$(clean-dirs)
:
$(
Q
)$(
MAKE
)
$(
clean
)
=
$(
patsubst _clean_%,%,
$@
)
clean
:
archclean $(clean-dirs)
$(
call cmd,rmdirs
)
$(
call cmd,rmfiles
)
@
find
.
$(
RCS_FIND_IGNORE
)
\
\(
-name
'*.[oas]'
-o
-name
'*.ko'
-o
-name
'.*.cmd'
\
-o
-name
'.*.d'
-o
-name
'.*.tmp'
-o
-name
'*.mod.c'
\
-o
-name
'*.symtypes'
-o
-name
'modules.order'
\
-o
-name
modules.builtin
-o
-name
'.tmp_*.o.*'
\
-o
-name
'*.gcno'
\)
-type
f
-print
| xargs
rm
-f
clean
:
archclean
# mrproper - Delete all generated files, including .config
#
...
...
@@ -1331,16 +1323,7 @@ $(clean-dirs):
$(
Q
)$(
MAKE
)
$(
clean
)
=
$(
patsubst _clean_%,%,
$@
)
clean
:
rm-dirs := $(MODVERDIR)
clean
:
rm-files := $(KBUILD_EXTMOD)/Module.symvers
\
$(KBUILD_EXTMOD)/modules.order
\
$(KBUILD_EXTMOD)/modules.builtin
clean
:
$(clean-dirs)
$(
call cmd,rmdirs
)
$(
call cmd,rmfiles
)
@
find
$(
KBUILD_EXTMOD
)
$(
RCS_FIND_IGNORE
)
\
\(
-name
'*.[oas]'
-o
-name
'*.ko'
-o
-name
'.*.cmd'
\
-o
-name
'.*.d'
-o
-name
'.*.tmp'
-o
-name
'*.mod.c'
\
-o
-name
'*.gcno'
\)
-type
f
-print
| xargs
rm
-f
clean
:
rm-files := $(KBUILD_EXTMOD)/Module.symvers
help
:
@
echo
' Building external modules.'
...
...
@@ -1357,6 +1340,16 @@ prepare: ;
scripts
:
;
endif
# KBUILD_EXTMOD
clean
:
$(clean-dirs)
$(
call cmd,rmdirs
)
$(
call cmd,rmfiles
)
@
find
$(
or
$(
KBUILD_EXTMOD
)
, .
)
$(
RCS_FIND_IGNORE
)
\
\(
-name
'*.[oas]'
-o
-name
'*.ko'
-o
-name
'.*.cmd'
\
-o
-name
'.*.d'
-o
-name
'.*.tmp'
-o
-name
'*.mod.c'
\
-o
-name
'*.symtypes'
-o
-name
'modules.order'
\
-o
-name
modules.builtin
-o
-name
'.tmp_*.o.*'
\
-o
-name
'*.gcno'
\)
-type
f
-print
| xargs
rm
-f
# Generate tags for editors
# ---------------------------------------------------------------------------
quiet_cmd_tags
=
GEN
$@
...
...
This diff is collapsed.
Click to expand it.
scripts/Makefile.clean
+
2
−
0
View file @
60eab877
...
...
@@ -45,6 +45,8 @@ __clean-files := $(extra-y) $(always) \
$(
host-progs
)
\
$(
hostprogs-y
)
$(
hostprogs-m
)
$(
hostprogs-
)
__clean-files
:=
$(
filter-out
$(
no-clean-files
)
,
$(
__clean-files
))
# as clean-files is given relative to the current directory, this adds
# a $(obj) prefix, except for absolute paths
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment