Merge branch 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
[sfrench/cifs-2.6.git] / scripts / Makefile.headersinst
index 4241e0dfeeaf1edeae16c4fd61a505b1985bb28f..53dae3eb3d1f0334fb0043759598e6117ab4b3ba 100644 (file)
@@ -11,13 +11,13 @@ UNIFDEF := scripts/unifdef -U__KERNEL__
 
 # Eliminate the contents of (and inclusions of) compiler.h
 HDRSED  := sed         -e "s/ inline / __inline__ /g" \
-               -e "s/[[:space:]]__user[[:space:]]\+/ /g" \
-               -e "s/(__user[[:space:]]\+/ (/g" \
-               -e "s/[[:space:]]__force[[:space:]]\+/ /g" \
-               -e "s/(__force[[:space:]]\+/ (/g" \
-               -e "s/[[:space:]]__iomem[[:space:]]\+/ /g" \
-               -e "s/(__iomem[[:space:]]\+/ (/g" \
-               -e "s/[[:space:]]__attribute_const__[[:space:]]\+/\ /g" \
+               -e "s/[[:space:]]__user[[:space:]]\{1,\}/ /g" \
+               -e "s/(__user[[:space:]]\{1,\}/ (/g" \
+               -e "s/[[:space:]]__force[[:space:]]\{1,\}/ /g" \
+               -e "s/(__force[[:space:]]\{1,\}/ (/g" \
+               -e "s/[[:space:]]__iomem[[:space:]]\{1,\}/ /g" \
+               -e "s/(__iomem[[:space:]]\{1,\}/ (/g" \
+               -e "s/[[:space:]]__attribute_const__[[:space:]]\{1,\}/\ /g" \
                -e "s/[[:space:]]__attribute_const__$$//" \
                -e "/^\#include <linux\/compiler.h>/d"
 
@@ -108,8 +108,8 @@ quiet_cmd_mkdir               = MKDIR   $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
 
 quiet_cmd_gen            = GEN     $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
       cmd_gen            = \
-FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@)                   \
-STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z. A-Z_`;                      \
+FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@);                  \
+STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z.- A-Z__`;                    \
 (echo "/* File autogenerated by 'make headers_install' */" ;           \
 echo "\#ifndef $$STUBDEF" ;                                            \
 echo "\#define $$STUBDEF" ;                                            \
@@ -144,7 +144,7 @@ $(check-y) : $(INSTALL_HDR_PATH)/$(_dst)/.check.%.h : $(INSTALL_HDR_PATH)/$(_dst
        $(call cmd,check)
 
 # Other dependencies for $(check-y)
--include /dev/null $(check-y)
+include /dev/null $(wildcard $(check-y))
 
 # ... but leave $(check-y) as .PHONY for now until those deps are actually correct.
 .PHONY: $(check-y)