r914 - linux-kernel-headers/branches/lkh-branch-2.6.12/debian
Author: gotom
Date: 2005-05-27 15:26:09 +0000 (Fri, 27 May 2005)
New Revision: 914
Modified:
linux-kernel-headers/branches/lkh-branch-2.6.12/debian/changelog
linux-kernel-headers/branches/lkh-branch-2.6.12/debian/generate-asm.sh
linux-kernel-headers/branches/lkh-branch-2.6.12/debian/rules
Log:
- Bastian Blank <waldi@debian.org>
- debian/rules: Add powerpc64 support. (Closes: #268078)
- debian/generate-asm.sh: Likewise.
Modified: linux-kernel-headers/branches/lkh-branch-2.6.12/debian/changelog
===================================================================
--- linux-kernel-headers/branches/lkh-branch-2.6.12/debian/changelog 2005-05-27 14:38:42 UTC (rev 913)
+++ linux-kernel-headers/branches/lkh-branch-2.6.12/debian/changelog 2005-05-27 15:26:09 UTC (rev 914)
@@ -1,3 +1,13 @@
+linux-kernel-headers (2.6.12+0rc5-2) experimental; urgency=low
+
+ * GOTO Masanori <gotom@debian.org>
+
+ - Bastian Blank <waldi@debian.org>
+ - debian/rules: Add powerpc64 support. (Closes: #268078)
+ - debian/generate-asm.sh: Likewise.
+
+ -- GOTO Masanori <gotom@debian.org> Sat, 28 May 2005 00:00:34 +0900
+
linux-kernel-headers (2.6.12+0rc5-1) experimental; urgency=low
* GOTO Masanori <gotom@debian.org>
Modified: linux-kernel-headers/branches/lkh-branch-2.6.12/debian/generate-asm.sh
===================================================================
--- linux-kernel-headers/branches/lkh-branch-2.6.12/debian/generate-asm.sh 2005-05-27 14:38:42 UTC (rev 913)
+++ linux-kernel-headers/branches/lkh-branch-2.6.12/debian/generate-asm.sh 2005-05-27 15:26:09 UTC (rev 914)
@@ -2,67 +2,87 @@
# Idea borrowed from RedHat's kernel package
-if [ -n "$1" ]; then
- if [ ! -d "$1" ]; then
- echo "$1" does not exist, or is not a directory
- exit 1
- fi
- cd $1
-else
- cd /usr/include
+arch="$1"
+dir_in="$2"
+dir_out="$3"
+
+if [ ! -d "$dir_in" ]; then
+ echo "$dir_in" does not exist, or is not a directory
+ exit 1
fi
-if [ ! -d asm-sparc ] || [ ! -d asm-sparc64 ] ; then
- echo E: asm-sparc and asm-sparc64 must exist, or you will have problems
+case "$arch" in
+ powerpc)
+ define_biarch="__powerpc64__"
+ kernel_arch="ppc"
+ kernel_arch_biarch="ppc64"
+ ;;
+ sparc)
+ define_biarch="__arch64__"
+ kernel_arch="sparc"
+ kernel_arch_biarch="sparc64"
+ ;;
+ *)
+ echo Invalid architeture >&2
+ exit 1
+esac
+
+asm_dir="asm-$kernel_arch"
+asm_dir_biarch="asm-$kernel_arch_biarch"
+
+if [ ! -d "$dir_in/$asm_dir" ] || [ ! -d "$dir_in/$asm_dir_biarch" ] ; then
+ echo E: $asm_dir and $asm_dir_biarch must exist, or you will have problems
exit 1
fi
-rm -rf asm
-mkdir asm
+mkdir -p $dir_out/asm
+cp -a $dir_in/$asm_dir $dir_out/$asm_dir
+cp -a $dir_in/$asm_dir_biarch $dir_out/$asm_dir_biarch
-for h in `( ls asm-sparc; ls asm-sparc64 ) | grep '\.h$' | sort -u`; do
- name=`echo $h | tr a-z. A-Z_`
+dirs=$((( cd "$dir_in/$asm_dir"; find . -type d ); ( cd "$dir_in/$asm_dir_biarch"; find . -type d )) | sort -u )
+files=$((( cd "$dir_in/$asm_dir"; find . -name "*.h" -type f ); ( cd "$dir_in/$asm_dir_biarch"; find . -name "*.h" -type f )) | sort -u )
+
+for h in $dirs; do
+ mkdir -p "$dir_out/asm/$h"
+done
+
+for h in $files; do
+ name=$(echo $h | tr a-z. A-Z_)
+ file_out="$dir_out/asm/$h"
# common header
- cat > asm/$h << EOF
+ cat > $file_out << EOF
/* All asm/ files are generated and point to the corresponding
- * file in asm-sparc or asm-sparc64. To regenerate, run "generate-asm"
+ * file in $asm_dir or $asm_dir_biarch.
*/
-#ifndef __SPARCSTUB__${name}__
-#define __SPARCSTUB__${name}__
-
EOF
# common for sparc and sparc64
- if [ -f asm-sparc/$h ] && [ -f asm-sparc64/$h ]; then
- cat >> asm/$h <<EOF
-#ifdef __arch64__
-#include <asm-sparc64/$h>
+ if [ -f $dir_in/$asm_dir/$h ] && [ -f $dir_in/$asm_dir_biarch/$h ]; then
+ cat >> $file_out <<EOF
+#ifdef $define_biarch
+# include <$asm_dir_biarch/$h>
#else
-#include <asm-sparc/$h>
+# include <$asm_dir/$h>
#endif
EOF
- # sparc only
- elif [ -f asm-sparc/$h ]; then
- cat >> asm/$h <<EOF
-#ifndef __arch64__
-#include <asm-sparc/$h>
+ elif [ -f $dir_in/$asm_dir/$h ]; then
+ cat >> $file_out <<EOF
+#ifdef $define_biarch
+# error This header is not available for $kernel_arch_biarch
+#else
+# include <$asm_dir/$h>
#endif
EOF
- # sparc64 only
else
- cat >> asm/$h <<EOF
-#ifdef __arch64__
-#include <asm-sparc64/$h>
+ cat >> $file_out <<EOF
+#ifdef $define_biarch
+# include <$asm_dir_biarch/$h>
+#else
+# error This header is not available for $kernel_arch
#endif
EOF
fi
- # common footer
- cat >> asm/$h <<EOF
-
-#endif /* !__SPARCSTUB__${name}__ */
-EOF
-
done
Modified: linux-kernel-headers/branches/lkh-branch-2.6.12/debian/rules
===================================================================
--- linux-kernel-headers/branches/lkh-branch-2.6.12/debian/rules 2005-05-27 14:38:42 UTC (rev 913)
+++ linux-kernel-headers/branches/lkh-branch-2.6.12/debian/rules 2005-05-27 15:26:09 UTC (rev 914)
@@ -27,17 +27,13 @@
lkh-install: stamp-lkh-install
stamp-lkh-install: build
+ rm -rf $(includedir)
install -d $(includedir)
install -d $(includedir)/linux
-ifeq ($(kernel_arch),sparc)
- # Sparc and Sparc64 have separate headers. Generate wrappers.
- cp -a include/asm-sparc $(includedir)/asm-sparc
- cp -a include/asm-sparc64 $(includedir)/asm-sparc64
- mkdir include/asm
- sh debian/generate-asm.sh $(includedir)
+ifneq (,$(findstring $(DEB_HOST_ARCH), powerpc sparc))
+ sh debian/generate-asm.sh $(DEB_HOST_ARCH) include $(includedir)
else
- rm -rf $(includedir)/asm
cp -a include/asm-$(kernel_arch) $(includedir)/asm
endif
Reply to: