History

kbuild: install all headers when arch is changed

We see some header files that are selected dependent on the actual architecture so force a reinstallation of all header files when the arch changes. This slows down "make headers_check_all" but then we better reflect reality.

Sam Ravnborg committed 18 years ago

Commit db1bec41 parent 6b36ab22 files · +12 −8Browse files

Unified · Split

2 files
  1. scripts/Makefile.headersinst +4 −3
  2. scripts/headers_install.pl +8 −5
scripts/Makefile.headersinst+4−3
@@ -43,9 +43,10 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@)) · 42 unmodified lines
43 43
44quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\44quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
45 file$(if $(word 2, $(all-files)),s))45 file$(if $(word 2, $(all-files)),s))
46 cmd_install = $(PERL) $< $(srctree)/$(obj) $(install) $(header-y); \46 cmd_install = \
47 $(PERL) $< $(objtree)/$(obj) $(install) $(objhdr-y); \47 $(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \
48 touch $@48 $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \
49 touch $@
49 50
50quiet_cmd_remove = REMOVE $(unwanted)51quiet_cmd_remove = REMOVE $(unwanted)
51 cmd_remove = rm -f $(unwanted-file)52 cmd_remove = rm -f $(unwanted-file)
scripts/headers_install.pl+8−5
@@ -3,10 +3,13 @@ · 2 unmodified lines
3# headers_install prepare the listed header files for use in3# headers_install prepare the listed header files for use in
4# user space and copy the files to their destination.4# user space and copy the files to their destination.
5#5#
6# Usage: headers_install.pl odir installdir [files...]6# Usage: headers_install.pl readdir installdir arch [files...]
7# odir: dir to open files7# readdir: dir to open files
8# install: dir to install the files8# installdir: dir to install the files
9# files: list of files to check9# arch: current architecture
10# arch is used to force a reinstallation when the arch
11# changes because kbuild then detect a command line change.
12# files: list of files to check
10#13#
11# Step in preparation for users space:14# Step in preparation for users space:
12# 1) Drop all use of compiler.h definitions15# 1) Drop all use of compiler.h definitions
@@ -16,7 +19,7 @@ · 3 unmodified lines
16use strict;19use strict;
17use warnings;20use warnings;
18 21
19my ($readdir, $installdir, @files) = @ARGV;22my ($readdir, $installdir, $arch, @files) = @ARGV;
20 23
21my $unifdef = "scripts/unifdef -U__KERNEL__";24my $unifdef = "scripts/unifdef -U__KERNEL__";
22 25