Changeset 1437

Show
Ignore:
Timestamp:
02/03/06 13:41:25 (6 years ago)
Author:
mrenzmann
Message:

Print information about SVN revision or date of build along with
the normal version information when modules get loaded.

Signed-off-by: Kel Modderman <kelrin@tpg.com.au>

Original patch slightly modified.

Signed-off-by: Michael Renzmann <mrenzmann@otaku42.de>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Makefile

    r1413 r1437  
    5252DIRS=   ${DIRS_MODULES} ${TOOLS} 
    5353 
    54 all: modules tools 
     54all: svnversion.h modules tools 
    5555 
    5656modules: configcheck 
     
    5959                $(MAKE) -C $$i || exit 1; \ 
    6060        done 
     61 
     62.PHONY: svnversion.h 
     63svnversion.h: 
     64        echo -n '#define SVNVERSION "' > $@ 
     65        if [ -d .svn ]; then \ 
     66                echo -n "$(shell svnversion -nc . | sed -e 's/^[^:]*://;s/[A-Za-z]//')" >> $@; \ 
     67        else \ 
     68                echo -n "$(shell date +%F)" >> $@; \ 
     69        fi 
     70        echo '"' >> $@ 
    6171 
    6272# conflicts with the 'tools' subdirectory 
     
    104114        done 
    105115        rm -rf ${SYMBOLSDIR} 
     116        rm -f svnversion.h 
    106117 
    107118info: 
  • trunk/ath/if_ath_ahb.c

    r1426 r1437  
    401401 */ 
    402402#include "version.h" 
    403 static char *version = ATH_PCI_VERSION " (Atheros/multi-bss)"; 
     403#include "svnversion.h" 
     404static char *version = ATH_PCI_VERSION " (svn " SVNVERSION ")"; 
    404405static char *dev_info = "ath_ahb"; 
    405406 
  • trunk/ath/if_ath_pci.c

    r1435 r1437  
    299299 */ 
    300300#include "version.h" 
    301 static char *version = ATH_PCI_VERSION " (Atheros/multi-bss)"; 
     301#include "svnversion.h" 
     302static char *version = ATH_PCI_VERSION " (svn " SVNVERSION ")"; 
    302303static char *dev_info = "ath_pci"; 
    303304 
  • trunk/ath_rate/amrr/amrr.c

    r1426 r1437  
    553553#endif 
    554554 
    555 static char *version = "0.1"; 
     555#include "svnversion.h" 
     556static char *version = "0.1 (svn " SVNVERSION ")"; 
    556557static char *dev_info = "ath_rate_amrr"; 
    557558 
  • trunk/ath_rate/onoe/onoe.c

    r1426 r1437  
    501501#endif 
    502502 
    503 static char *version = "1.0"; 
     503#include "svnversion.h" 
     504static char *version = "1.0 (svn " SVNVERSION ")"; 
    504505static char *dev_info = "ath_rate_onoe"; 
    505506 
  • trunk/ath_rate/sample/sample.c

    r1426 r1437  
    104104 */ 
    105105 
    106  
    107 static char *version = "1.2"; 
     106#include "svnversion.h" 
     107static char *version = "1.2 (svn " SVNVERSION ")"; 
    108108static char *dev_info = "ath_rate_sample"; 
    109109 
  • trunk/net80211/ieee80211_linux.c

    r1433 r1437  
    731731 */ 
    732732#include "version.h" 
    733 static char *version = WLAN_VERSION " (Atheros/multi-bss)"; 
     733#include "svnversion.h" 
     734static char *version = WLAN_VERSION " (svn " SVNVERSION ")"; 
    734735static char *dev_info = "wlan"; 
    735736