[BACK]Return to Makefile.headersinst CVS log [TXT][DIR] Up to [Development] / linux-2.6-xfs / scripts

File: [Development] / linux-2.6-xfs / scripts / Makefile.headersinst (download)

Revision 1.5, Wed Sep 12 17:09:56 2007 UTC (10 years, 1 month ago) by tes.longdrop.melbourne.sgi.com
Branch: MAIN
Changes since 1.4: +8 -8 lines

Update 2.6.x-xfs to 2.6.23-rc4.

Also update fs/xfs with external mainline changes.
There were 12 such missing commits that I detected:

--------
commit ad690ef9e690f6c31f7d310b09ef1314bcec9033
Author: Al Viro <viro@ftp.linux.org.uk>
    xfs ioctl __user annotations

commit 20c2df83d25c6a95affe6157a4c9cac4cf5ffaac
Author: Paul Mundt <lethal@linux-sh.org>
    mm: Remove slab destructors from kmem_cache_create().

commit d0217ac04ca6591841e5665f518e38064f4e65bd
Author: Nick Piggin <npiggin@suse.de>
    mm: fault feedback #1

commit 54cb8821de07f2ffcd28c380ce9b93d5784b40d7
Author: Nick Piggin <npiggin@suse.de>
    mm: merge populate and nopage into fault (fixes nonlinear)

commit d00806b183152af6d24f46f0c33f14162ca1262a
Author: Nick Piggin <npiggin@suse.de>
    mm: fix fault vs invalidate race for linear mappings

commit a569425512253992cc64ebf8b6d00a62f986db3e
Author: Christoph Hellwig <hch@infradead.org>
    knfsd: exportfs: add exportfs.h header

commit 831441862956fffa17b9801db37e6ea1650b0f69
Author: Rafael J. Wysocki <rjw@sisk.pl>
    Freezer: make kernel threads nonfreezable by default

commit 8e1f936b73150f5095448a0fee6d4f30a1f9001d
Author: Rusty Russell <rusty@rustcorp.com.au>
    mm: clean up and kernelify shrinker registration

commit 5ffc4ef45b3b0a57872f631b4e4ceb8ace0d7496
Author: Jens Axboe <jens.axboe@oracle.com>
    sendfile: remove .sendfile from filesystems that use generic_file_sendfile()

commit 8bb7844286fb8c9fce6f65d8288aeb09d03a5e0d
Author: Rafael J. Wysocki <rjw@sisk.pl>
    Add suspend-related notifications for CPU hotplug

commit 59c51591a0ac7568824f541f57de967e88adaa07
Author: Michael Opdenacker <michael@free-electrons.com>
    Fix occurrences of "the the "

commit 0ceb331433e8aad9c5f441a965d7c681f8b9046f
Author: Dmitriy Monakhov <dmonakhov@openvz.org>
    mm: move common segment checks to separate helper function
--------
Merge of 2.6.x-xfs-melb:linux:29656b by kenmcd.

# ==========================================================================
# Installing headers
#
# header-y files will be installed verbatim
# unifdef-y are the files where unifdef will be run before installing files
# objhdr-y are generated files that will be installed verbatim
#
# ==========================================================================

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:]]\{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"

_dst := $(if $(dst),$(dst),$(obj))

ifeq (,$(patsubst include/asm/%,,$(obj)/))
# For producing the generated stuff in include/asm for biarch builds, include
# both sets of Kbuild files; we'll generate anything which is mentioned in
# _either_ arch, and recurse into subdirectories which are mentioned in either
# arch. Since some directories may exist in one but not the other, we must
# use $(wildcard...). 
GENASM := 1
archasm	   := $(subst include/asm,asm-$(ARCH),$(obj))
altarchasm := $(subst include/asm,asm-$(ALTARCH),$(obj))
KBUILDFILES := $(wildcard $(srctree)/include/$(archasm)/Kbuild $(srctree)/include/$(altarchasm)/Kbuild)
else
KBUILDFILES := $(srctree)/$(obj)/Kbuild
endif

include $(KBUILDFILES)

include scripts/Kbuild.include 

# If this is include/asm-$(ARCH) and there's no $(ALTARCH), then
# override $(_dst) so that we install to include/asm directly.
# Unless $(BIASMDIR) is set, in which case we're probably doing
# a 'headers_install_all' build and we should keep the -$(ARCH)
# in the directory name.
ifeq ($(obj)$(ALTARCH),include/asm-$(ARCH)$(BIASMDIR))
     _dst := include/asm
endif

header-y	:= $(sort $(header-y))
unifdef-y	:= $(sort $(unifdef-y))
subdir-y	:= $(patsubst %/,%,$(filter %/, $(header-y)))
header-y	:= $(filter-out %/, $(header-y))
header-y	:= $(filter-out $(unifdef-y),$(header-y))

# stamp files for header checks
check-y		:= $(patsubst %,.check.%,$(header-y) $(unifdef-y) $(objhdr-y))

# Work out what needs to be removed
oldheaders	:= $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$(wildcard $(INSTALL_HDR_PATH)/$(_dst)/*.h))
unwanted	:= $(filter-out $(header-y) $(unifdef-y) $(objhdr-y),$(oldheaders))

oldcheckstamps	:= $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$(wildcard $(INSTALL_HDR_PATH)/$(_dst)/.check.*.h))
unwanted	+= $(filter-out $(check-y),$(oldcheckstamps))

# Prefix them all with full paths to $(INSTALL_HDR_PATH)
header-y 	:= $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(header-y))
unifdef-y 	:= $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(unifdef-y))
objhdr-y 	:= $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(objhdr-y))
check-y 	:= $(patsubst %,$(INSTALL_HDR_PATH)/$(_dst)/%,$(check-y))


ifdef ALTARCH
ifeq ($(obj),include/asm-$(ARCH))
altarch-y	:= altarch-dir
endif
endif

# Make the definitions visible for recursive make invocations
export ALTARCH
export ARCHDEF
export ALTARCHDEF

quiet_cmd_o_hdr_install   = INSTALL $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
      cmd_o_hdr_install   = cp $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,$(objtree)/$(obj)/%,$@) \
			    $(INSTALL_HDR_PATH)/$(_dst)

quiet_cmd_headers_install = INSTALL $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
      cmd_headers_install = $(HDRSED) $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,$(srctree)/$(obj)/%,$@)	\
			    > $@

quiet_cmd_unifdef	  = UNIFDEF $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
      cmd_unifdef	  = $(UNIFDEF) $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,$(srctree)/$(obj)/%,$@) \
				   | $(HDRSED) > $@ || :

quiet_cmd_check		  = CHECK   $(patsubst $(INSTALL_HDR_PATH)/$(_dst)/.check.%,$(_dst)/%,$@)
      cmd_check		  = $(CONFIG_SHELL) $(srctree)/scripts/hdrcheck.sh \
                              $(INSTALL_HDR_PATH)/include $(subst /.check.,/,$@) $@

quiet_cmd_remove	  = REMOVE  $(_dst)/$@
      cmd_remove	  = rm -f $(INSTALL_HDR_PATH)/$(_dst)/$@

quiet_cmd_mkdir		  = MKDIR   $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
      cmd_mkdir		  = mkdir -p $@

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__`;			\
(echo "/* File autogenerated by 'make headers_install' */" ;		\
echo "\#ifndef $$STUBDEF" ;						\
echo "\#define $$STUBDEF" ;						\
echo "\# if $(ARCHDEF)" ;						\
if [ -r $(subst /$(_dst)/,/include/$(archasm)/,$@) ]; then		\
	echo "\#  include <$(archasm)/$$FNAME>" ;			\
else									\
	echo "\#  error $(archasm)/$$FNAME does not exist in"		\
			"the $(ARCH) architecture" ;			\
fi ;									\
echo "\# elif $(ALTARCHDEF)" ;						\
if [ -r $(subst /$(_dst)/,/include/$(altarchasm)/,$@) ]; then		\
	echo "\#  include <$(altarchasm)/$$FNAME>" ;			\
else									\
	echo "\#  error $(altarchasm)/$$FNAME does not exist in"	\
			"the $(ALTARCH) architecture" ;			\
fi ;									\
echo "\# else" ;							\
echo "\#  warning This machine appears to be"				\
		 "neither $(ARCH) nor $(ALTARCH)." ;			\
echo "\# endif" ;							\
echo "\#endif /* $$STUBDEF */" ;					\
) > $@

.PHONY: __headersinst __headerscheck

ifdef HDRCHECK
__headerscheck: $(subdir-y) $(check-y)
	@true

$(check-y) : $(INSTALL_HDR_PATH)/$(_dst)/.check.%.h : $(INSTALL_HDR_PATH)/$(_dst)/%.h 
	$(call cmd,check)

# Other dependencies for $(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)

else
# Rules for installing headers
__headersinst: $(subdir-y) $(header-y) $(unifdef-y) $(altarch-y) $(objhdr-y)
	@true

$(objhdr-y) $(subdir-y) $(header-y) $(unifdef-y): | $(INSTALL_HDR_PATH)/$(_dst) $(unwanted)

$(INSTALL_HDR_PATH)/$(_dst):
	$(call cmd,mkdir)

.PHONY: $(unwanted)
$(unwanted):
	$(call cmd,remove)

ifdef GENASM
$(objhdr-y) $(header-y) $(unifdef-y): $(KBUILDFILES)
	$(call cmd,gen)

else
$(objhdr-y) :		$(INSTALL_HDR_PATH)/$(_dst)/%.h: $(objtree)/$(obj)/%.h $(KBUILDFILES)
	$(call cmd,o_hdr_install)

$(header-y) :		$(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES)
	$(call cmd,headers_install)

$(unifdef-y) :		$(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES)
	$(call cmd,unifdef)
endif
endif

hdrinst := -rR -f $(srctree)/scripts/Makefile.headersinst obj

.PHONY: altarch-dir
# All the files in the normal arch dir must be created first, since we test
# for their existence.
altarch-dir: $(subdir-y) $(header-y) $(unifdef-y) $(objhdr-y)
	$(Q)$(MAKE) $(hdrinst)=include/asm-$(ALTARCH) dst=include/asm-$(ALTARCH)
	$(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm$(BIASMDIR)

# Recursion
.PHONY: $(subdir-y)
$(subdir-y):
	$(Q)$(MAKE) $(hdrinst)=$(obj)/$@ dst=$(_dst)/$@ rel=../$(rel)