Getting version information now out of the backends main file.

merge-requests/1/head
Gerhard Jaeger 2004-07-16 11:32:04 +00:00
rodzic 472a85788d
commit 2c42298a29
3 zmienionych plików z 18 dodań i 16 usunięć

Wyświetl plik

@ -34,7 +34,7 @@ fi
echo -e "\b\b\b - done." echo -e "\b\b\b - done."
# #
# # Version checks...
# #
echo -e "\nCheck for kernelversion:" echo -e "\nCheck for kernelversion:"
if [ "$OSMINOR" == "6" ]; then if [ "$OSMINOR" == "6" ]; then
@ -48,6 +48,9 @@ else
exit -2 exit -2
fi fi
#
# Setup...
#
echo -e "Build-directory: \n"$BUILD_DIR echo -e "Build-directory: \n"$BUILD_DIR
echo -n "Removing build-directory..." echo -n "Removing build-directory..."
rm -rf $BUILD_DIR rm -rf $BUILD_DIR
@ -62,7 +65,7 @@ echo -n "Linking source files..."
C_FILES=`ls $SRC_DIR/plustek-pp_*.c` C_FILES=`ls $SRC_DIR/plustek-pp_*.c`
H_FILES=`ls $SRC_DIR/plustek-pp_*.h` H_FILES=`ls $SRC_DIR/plustek-pp_*.h`
for F in $C_FILES $H_FILES $SRC_DIR/plustek-pp.h; do for F in $C_FILES $H_FILES $SRC_DIR/plustek-pp.h $SRC_DIR/plustek_pp.c; do
ln -s $F . ln -s $F .
done done
echo -e "\b\b\b - done." echo -e "\b\b\b - done."
@ -71,14 +74,21 @@ echo -n "Copying Makefile to build-directory..."
cp $MAKEFILE Makefile cp $MAKEFILE Makefile
echo -e "\b\b\b - done." echo -e "\b\b\b - done."
#
# Building the module...
#
echo "Making the module..." echo "Making the module..."
if [ "$OSMINOR" == "4" ]; then if [ "$OSMINOR" == "4" ]; then
make all $1 make all $1
else else
make -C /lib/modules/$KERNEL_V/build/ SUBDIRS=$BUILD_DIR modules $1 make -C /lib/modules/$KERNEL_V/build/ SUBDIRS=$BUILD_DIR modules $1
fi fi
RES=$?
cd .. cd ..
if [ $RES != 0 ]; then
echo "There were some build errors..."
exit -1
fi
echo "done." echo "done."
echo "Should I install the module?" echo "Should I install the module?"

Wyświetl plik

@ -28,8 +28,7 @@ REF = cxref
# #
# common compiler options # common compiler options
# #
OPT = -fomit-frame-pointer -D_PTDRV_V1=$(VERSION1) \ OPT = -fomit-frame-pointer -D_PTDRV_VERSTR=\"$(VERSIONSTR)\"
-D_PTDRV_V0=$(VERSION0) -D_PTDRV_BUILD=$(BUILD)
# #
# cxref options # cxref options
@ -52,9 +51,8 @@ REFOPT = -xref-all -index-all -html32
ifeq ($(LINUXVERSION),) ifeq ($(LINUXVERSION),)
LINUXVERSION = $(shell uname -r) LINUXVERSION = $(shell uname -r)
endif endif
VERSION0 = $(shell cat ./../VERSION0)
VERSION1 = $(shell cat ./../VERSION1) VERSIONSTR = $(shell grep "define BACKEND_VERSION" $(SRC_DIR)/plustek_pp.c | cut -b25-50 )
BUILD = $(shell cat ./../BUILD)
# Change it here or specify it on the "make" commandline # Change it here or specify it on the "make" commandline
ifeq ($(HEADER_PATH),) ifeq ($(HEADER_PATH),)

Wyświetl plik

@ -10,23 +10,17 @@ ifeq ($(LINUXVERSION),)
endif endif
LINUXRELEASE = $(shell uname -r | cut -d'.' -f3) LINUXRELEASE = $(shell uname -r | cut -d'.' -f3)
VERSION0 = $(shell cat $(SUBDIRS)/../VERSION0) VERSIONSTR = $(shell grep "define BACKEND_VERSION" $(PWD)/plustek_pp.c | cut -b25-50 )
VERSION1 = $(shell cat $(SUBDIRS)/../VERSION1)
BUILD = $(shell cat $(SUBDIRS)/../BUILD)
# #
# extra flags # extra flags
# #
EXTRA_CFLAGS += -D_PTDRV_V1=$(VERSION1) -D_PTDRV_V0=$(VERSION0) -D_PTDRV_BUILD=$(BUILD) EXTRA_CFLAGS += -D_PTDRV_VERSTR=\"$(VERSIONSTR)\"
ifeq ($(DEBUG),y) ifeq ($(DEBUG),y)
EXTRA_CFLAGS += -DDEBUG EXTRA_CFLAGS += -DDEBUG
endif endif
ifeq ($(shell test `uname -r | cut -d'.' -f3` -lt 6 && echo 1),1)
EXTRA_CFLAGS += -mhard-float
endif
# #
# the module name # the module name
# #