aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-09-03 13:21:28 -0700
committerLuis R. Rodriguez <lrodriguez@atheros.com>2008-09-03 13:21:28 -0700
commit7c74e49b9774ae6a75e5438c1be05dcded8a384a (patch)
tree2a12e842e5dbdf5846993ecd22f4b7986ada9bef
parentec6e0e2ab61d1102add7939a7629f0db2260e63c (diff)
downloadcompat-wireless-2.6-old-7c74e49b9774ae6a75e5438c1be05dcded8a384a.tar.gz
Remove dependency on compat-release and git-describe, the build
using git will use .compat_autoconf_ but the tarball uses the right version. Whatever, it builds now :) Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r--Makefile3
-rwxr-xr-xscripts/gen-compat-autoconf.sh15
2 files changed, 10 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index e6af79c..16562fe 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@ export PWD := $(shell pwd)
export COMPAT_CONFIG=config.mk
export CONFIG_CHECK=.$(COMPAT_CONFIG)_md5sum.txt
export COMPAT_AUTOCONF=include/linux/compat_autoconf.h
-export CREL=$(shell cat $(PWD)/compat-release)
+-export CREL=$(shell cat $(PWD)/compat-release)
export CREL_PRE:=.compat_autoconf_
export CREL_CHECK:=$(CREL_PRE)$(CREL)
@@ -184,6 +184,7 @@ uninstall:
@echo
clean:
+ @rm -f compat-release
@if [ -d net -a -d $(KLIB_BUILD) ]; then \
$(MAKE) -C $(KLIB_BUILD) M=$(PWD) clean ;\
fi
diff --git a/scripts/gen-compat-autoconf.sh b/scripts/gen-compat-autoconf.sh
index 57065a8..f753b17 100755
--- a/scripts/gen-compat-autoconf.sh
+++ b/scripts/gen-compat-autoconf.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2007 Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
+# Copyright 2007, 2008 Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
#
# Use this to parse a small .config equivalent looking file to generate
# our own autoconf.h. This file has defines for each config option
@@ -28,13 +28,16 @@ if [ ! -f $COMPAT_CONFIG ]; then
exit
fi
-if [ ! -f $COMPAT_RELEASE -o ! -f $KERNEL_RELEASE ]; then
- echo "Error: $COMPAT_RELEASE or $KERNEL_RELEASE file is missing"
- exit
+if [ ! -f $COMPAT_RELEASE ]; then
+ which git 2>&1 > /dev/null
+ if [ $? -ne 0 ]; then
+ echo "You need git to generate $COMPAT_RELEASE file"
+ exit
+ fi
+ git describe > $COMPAT_RELEASE
fi
CREL=$(cat $COMPAT_RELEASE)
-KREL=$(cat $KERNEL_RELEASE)
DATE=$(date)
# Defines a CONFIG_ option if not defined yet, this helps respect
@@ -130,10 +133,8 @@ cat <<EOF
* Automatically generated C config: don't edit
* $DATE
* compat-wireless-2.6: $CREL
- * linux-2.6: $KREL
*/
#define COMPAT_RELEASE "$CREL"
-#define COMPAT_KERNEL_RELEASE "$KREL"
EOF
# Checks user is compiling against a kernel we support