compat-wireless: add support for COMPAT_BASE version prinout
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Thu, 17 May 2012 03:17:45 +0000 (20:17 -0700)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Thu, 17 May 2012 03:17:45 +0000 (20:17 -0700)
The COMPAT_BASE prints out the tag from where we pulled
compat.git code from. This is useful when debugging code
and verifying what version of compat was used.

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
.gitignore
Makefile
scripts/admin-update.sh

index 881d0b4c3919fa2e755f0affd4a8fd8c66a9bd9b..fbda6ffe489660a4a82a18900a659e24e51a1346 100644 (file)
@@ -10,6 +10,7 @@ Module.symvers
 module.order
 .pc
 code-metrics.txt
+.compat_base
 .compat_base_tree
 .compat_base_tree_version
 .compat_version
index 11602dc370910bc5755d261bfe7b92fe6c4df5b6..969325543ef39e4b2375580ebc7c1bbd43bbe8c6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -70,6 +70,7 @@ $(error "The path to this compat-wireless directory has spaces in it." \
 endif
 
 export CFLAGS += \
+        -DCOMPAT_BASE="\"$(shell cat $(PWD)/.compat_base)\"" \
         -DCOMPAT_BASE_TREE="\"$(shell cat $(PWD)/.compat_base_tree)\"" \
         -DCOMPAT_BASE_TREE_VERSION="\"$(shell cat $(PWD)/.compat_base_tree_version)\"" \
         -DCOMPAT_PROJECT="\"Compat-wireless\"" \
index 7e095b42b1b42927efae6c0b2f293d163c3f571e..4e0445f4987739d9b99bef4d73183d7609b2dcc9 100755 (executable)
@@ -597,6 +597,11 @@ GIT_REMOTE=$(git config branch.${GIT_BRANCH}.remote)
 GIT_REMOTE=${GIT_REMOTE:-origin}
 GIT_REMOTE_URL=$(git config remote.${GIT_REMOTE}.url)
 GIT_REMOTE_URL=${GIT_REMOTE_URL:-unknown}
+
+cd $GIT_COMPAT_TREE
+git describe > $DIR/.compat_base
+cd $DIR
+
 echo -e "${GREEN}Updated${NORMAL} from local tree: ${BLUE}${GIT_TREE}${NORMAL}"
 echo -e "Origin remote URL: ${CYAN}${GIT_REMOTE_URL}${NORMAL}"
 cd $DIR
@@ -633,10 +638,12 @@ if [ -d ./.git ]; then
        cd $DIR
        echo -e "\nBase tree: ${GREEN}$(cat .compat_base_tree)${NORMAL}" >> $CODE_METRICS
        echo -e "Base tree version: ${PURPLE}$(cat .compat_base_tree_version)${NORMAL}" >> $CODE_METRICS
+       echo -e "compat.git: ${CYAN}$(cat .compat_base)${NORMAL}" >> $CODE_METRICS
        echo -e "compat-wireless release: ${YELLOW}$(cat .compat_version)${NORMAL}" >> $CODE_METRICS
 
 fi
 
+
 echo -e "Code metrics archive: ${GREEN}http://bit.ly/H6BTF7${NORMAL}" >> $CODE_METRICS
 
 cat $CODE_METRICS