source: trunk/openwrt/patches/trunk/031-:38998_001-fix_kernel_3.10_build_make_headersinst.patch @ 572

Last change on this file since 572 was 572, checked in by amain, 6 years ago

Revert p31 and 32 the proper way using new patch system. Note: openwrt patch 205-fix-headers_install.patch seems only to apply to kernel 3.10.

File size: 2.6 KB
  • new file openwrt-ar71xx-generic_UBNTRSPRO-trunk-HEAD/target/linux/generic/patches-3.10/001-fix_kernel_build_make_headersinst.patch

    - +  
     1--- a/scripts/Makefile.headersinst      2013-07-29 05:00:49.000000000 +0530
     2+++ b/scripts/Makefile.headersinst      2013-08-08 22:45:53.000000000 +0530
     3@@ -47,18 +47,24 @@
     4 all-files     := $(header-y) $(genhdr-y) $(wrapper-files)
     5 output-files  := $(addprefix $(installdir)/, $(all-files))
     6 
     7-input-files   := $(foreach hdr, $(header-y), \
     8+input-files1  := $(foreach hdr, $(header-y), \
     9                   $(if $(wildcard $(srcdir)/$(hdr)), \
     10-                       $(wildcard $(srcdir)/$(hdr)), \
     11+                       $(wildcard $(srcdir)/$(hdr))) \
     12+                  )
     13+input-files1-name := $(notdir $(input-files1))
     14+input-files2  := $(foreach hdr, $(header-y), \
     15+                  $(if  $(wildcard $(srcdir)/$(hdr)),, \
     16                        $(if $(wildcard $(oldsrcdir)/$(hdr)), \
     17                                $(wildcard $(oldsrcdir)/$(hdr)), \
     18                                $(error Missing UAPI file $(srcdir)/$(hdr))) \
     19-                  )) \
     20-                $(foreach hdr, $(genhdr-y), \
     21+                  ))
     22+input-files2-name := $(notdir $(input-files2))
     23+input-files3  := $(foreach hdr, $(genhdr-y), \
     24                   $(if $(wildcard $(gendir)/$(hdr)), \
     25                        $(wildcard $(gendir)/$(hdr)), \
     26                        $(error Missing generated UAPI file $(gendir)/$(hdr)) \
     27                   ))
     28+input-files3-name := $(notdir $(input-files3))
     29 
     30 # Work out what needs to be removed
     31 oldheaders    := $(patsubst $(installdir)/%,%,$(wildcard $(installdir)/*.h))
     32@@ -72,7 +78,9 @@
     33 quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
     34                             file$(if $(word 2, $(all-files)),s))
     35       cmd_install = \
     36-        $(CONFIG_SHELL) $< $(installdir) $(input-files); \
     37+        $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(input-files1-name); \
     38+        $(CONFIG_SHELL) $< $(installdir) $(oldsrcdir) $(input-files2-name); \
     39+        $(CONFIG_SHELL) $< $(installdir) $(gendir) $(input-files3-name); \
     40         for F in $(wrapper-files); do                                   \
     41                 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F;    \
     42         done;                                                           \
     43@@ -98,7 +106,7 @@
     44        @:
     45 
     46 targets += $(install-file)
     47-$(install-file): scripts/headers_install.sh $(input-files) FORCE
     48+$(install-file): scripts/headers_install.sh $(input-files1) $(input-files2) $(input-files3) FORCE
     49        $(if $(unwanted),$(call cmd,remove),)
     50        $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
     51        $(call if_changed,install)
     52@@ -130,3 +138,4 @@
     53 .PHONY: $(PHONY)
     54 PHONY += FORCE
     55 FORCE: ;
     56+
Note: See TracBrowser for help on using the repository browser.