Author: waldi
Date: Mon Sep 10 14:47:03 2007
New Revision: 9491

Log:
debian/rules.real: Simplify headers installation.


Modified:
   dists/trunk/linux-2.6/debian/rules.real

Modified: dists/trunk/linux-2.6/debian/rules.real
==============================================================================
--- dists/trunk/linux-2.6/debian/rules.real     (original)
+++ dists/trunk/linux-2.6/debian/rules.real     Mon Sep 10 14:47:03 2007
@@ -274,27 +274,26 @@
        cd $(SOURCE_DIR); \
        find . -mindepth 1 -maxdepth 1 \
                ! -name debian -a ! -name Documentation -a ! -name include -a \
-               ! -name DEBIAN -a ! -name scripts -a ! -name arch -a ! -name 
'.*' -a \( \
-               -name Makefile -o -type d \) \
+               ! -name scripts -a ! -name arch -a \( -name Makefile -o -type d 
\) \
                -printf "../$(PACKAGE_NAME_HEADERS)/%f\n" | \
                xargs ln -s --target-directory='$(CURDIR)'/$(DIR)
        
        cd $(SOURCE_DIR); \
-       find arch/$(KERNEL_ARCH) -mindepth 1 -maxdepth 1 \( \
+       find arch/$(KERNEL_ARCH) -mindepth 1 -maxdepth 1 \
                -type d -a ! -name include -a ! -name kernel -o \
-               -type f -a \( -name 'Makefile*' -o -name 'Kconfig*' \) \) \
+               -type f -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 
"module.lds" \) \
                -printf "../../../$(PACKAGE_NAME_HEADERS)/%p\n" | \
                xargs ln -s 
--target-directory='$(CURDIR)'/$(DIR)/arch/$(KERNEL_ARCH)
 
+       cd $(SOURCE_DIR); \
+       find arch/$(KERNEL_ARCH)/kernel -mindepth 1 -maxdepth 1 \
+               -type f -a \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 
"module.lds" \) \
+               -printf "../../../../$(PACKAGE_NAME_HEADERS)/%p\n" | \
+               xargs ln -s 
--target-directory='$(CURDIR)'/$(DIR)/arch/$(KERNEL_ARCH)/kernel
+
        [ -d $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/include ] && \
                cp -a $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/include 
$(DIR)/arch/$(KERNEL_ARCH)/include || :
-       [ -f $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/kernel/asm-offsets.s ] && \
-               ln -f $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/kernel/asm-offsets.s 
$(DIR)/arch/$(KERNEL_ARCH)/kernel || :
-       [ -f $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/module.lds ] && \
-               ln -f $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/module.lds 
$(DIR)/arch/$(KERNEL_ARCH) || :
-       [ -f $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/kernel/module.lds ] && \
-               ln -f $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/kernel/module.lds 
$(DIR)/arch/$(KERNEL_ARCH) || :
-       ln -s 
../../../../$(PACKAGE_NAME_HEADERS)/arch/$(KERNEL_ARCH)/kernel/Makefile 
$(DIR)/arch/$(KERNEL_ARCH)/kernel
+       cp -a $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/kernel/asm-offsets.s 
$(DIR)/arch/$(KERNEL_ARCH)/kernel || :
 
        cd $(SOURCE_DIR); \
        find include -mindepth 1 -maxdepth 1 \
@@ -306,24 +305,27 @@
        ln -sf asm-$(KERNEL_ARCH) $(DIR)/include/asm
 
        cd $(SOURCE_DIR); \
-       for dir in linux asm-generic $(foreach 
t,$(KERNEL_HEADER_DIRS),asm-$(t)); do \
+       for dir in linux asm-$(KERNEL_ARCH); do \
                mkdir '$(CURDIR)'/$(DIR)/include/$$dir; \
                for file in $$(find include/$$dir -mindepth 1 -maxdepth 1); do \
                        if [ -e '$(CURDIR)'/$(REF_DIR)/$$file ]; then \
                                ln -s 
--target-directory='$(CURDIR)'/$(DIR)/include/$$dir 
../../../$(PACKAGE_NAME_HEADERS)/$$file; \
-                       elif [ -d '$(CURDIR)'/${SOURCE_DIR}/$$file ]; then \
-                               cp -a '$(CURDIR)'/$(SOURCE_DIR)/$$file 
'$(CURDIR)'/$(DIR)/include/$$dir; \
                        else \
                                ln -f 
--target-directory='$(CURDIR)'/$(DIR)/include/$$dir 
'$(CURDIR)'/$(SOURCE_DIR)/$$file; \
                        fi \
                done \
        done
-       
-       mkdir -p $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)
-       ln -s /usr/src/$(PACKAGE_NAME) 
$(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/build
+
+       cd $(SOURCE_DIR); \
+       for dir in asm-generic $(foreach t,$(filter-out 
$(KERNEL_ARCH),$(KERNEL_HEADER_DIRS)),asm-$(t)); do \
+               ln -s --target-directory='$(CURDIR)'/$(DIR)/include 
../../$(PACKAGE_NAME_HEADERS)/$$dir; \
+       done
 
        ln -s ../$(PACKAGE_NAME_KBUILD)/scripts $(DIR)
 
+       mkdir -p $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)
+       ln -s /usr/src/$(PACKAGE_NAME) 
$(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/build
+
        $(MAKE_SELF) install-base
 
 install-libc-dev_$(ARCH): PACKAGE_NAME = linux-libc-dev

_______________________________________________
Kernel-svn-changes mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/kernel-svn-changes

Reply via email to