summaryrefslogtreecommitdiffstats
path: root/driver/Makefile
diff options
context:
space:
mode:
authorVasilii Chernov <vchernov@inr.ru>2016-02-24 18:24:22 +0100
committerVasilii Chernov <vchernov@inr.ru>2016-02-24 18:24:22 +0100
commitb0a034e6ef4a958235a56ebde0831c0f30a84d30 (patch)
treea1f46d2d536c692edd6b17efc61ac9fefef2796b /driver/Makefile
parentda842568b94b0e00c1709ae01f441a7424c15b87 (diff)
parent3ea1907f3169e0233d3a32a7d470af3c34b6f967 (diff)
downloadpcitool-b0a034e6ef4a958235a56ebde0831c0f30a84d30.tar.gz
pcitool-b0a034e6ef4a958235a56ebde0831c0f30a84d30.tar.bz2
pcitool-b0a034e6ef4a958235a56ebde0831c0f30a84d30.tar.xz
pcitool-b0a034e6ef4a958235a56ebde0831c0f30a84d30.zip
Merge with Suren branch. Fix memory leaks.
Diffstat (limited to 'driver/Makefile')
-rw-r--r--driver/Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/driver/Makefile b/driver/Makefile
index 83a8c46..c26a84a 100644
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -20,8 +20,8 @@ default:
echo "No compiler of $$GCC_MAJOR series is installed" ;\
exit 1 ;\
fi ;\
- GCC_VERSION=`$$CC --version | head -n 1 | tr ' ' '\n' | grep -e "[0-9]\+\.[0-9]" | head -n 1` ;\
- if [ $$KERNEL_GCC_VERSION != $$GCC_VERSION ]; then \
+ GCC_VERSION=`$$CC --version | head -n 1 | tr ' ' '\n' | grep -e "[0-9]\+\.[0-9]" | tail -n 1` ;\
+ if [ $$KERNEL_GCC_VERSION != $$GCC_VERSION -a -z "$$RELAXED_GCC_CHECK" ]; then \
echo "The $$GCC_VERSION of $$GCC_MAJOR series is installed" ;\
exit 1 ;\
fi ;\
@@ -29,6 +29,17 @@ default:
else \
CC=$(CC) ;\
fi ;\
+ build_revision=`bzr revno` ;\
+ build_author=`bzr log -r$$build_revision | grep committer | cut -c 12-` ;\
+ build_path=`pwd` ;\
+ build_branch=`bzr nick` ;\
+ build_lastmod=`find . -type f -name '*.[ch]' -printf '%TY/%Tm/%Td %TH:%TM:%TS %p\n' | grep -E -v 'build.h|mod.c' | sort -n | tail -n 1 | cut -d ' ' -f 1-2 | cut -d '.' -f 1` ;\
+ build_changes=`bzr status -SV | cut -c 5- | tr \\\n " "` ;\
+ build_user=`whoami` ;\
+ build_date=`date "+%Y/%m/%d %H:%M:%S"` ;\
+ build="Built at $$build_date by $$build_user" ;\
+ revision="Revision $$build_revision from $$build_branch by $$build_author at $$build_path, last modification from $$build_lastmod" ;\
+ echo -e "#define PCIDRIVER_BUILD \"$$build\"\\n#define PCIDRIVER_REVISION \"$$revision\"\\n#define PCIDRIVER_CHANGES \"$$build_changes\"\\n" > build.h ;\
$(MAKE) $(CFLAGS) -C $(KERNELDIR) M=$(PWD) CC=$$CC modules
install: