Changeset 1474

Show
Ignore:
Timestamp:
03/14/06 01:23:02 (3 years ago)
Author:
proski
Message:

Eliminate warning about missing SNAPSHOT.

When generating svnversion.h, don't use any make $(shell) constructs -
they are calculated whether the shell script needs them ot not.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Makefile

    r1460 r1474  
    6161.PHONY: svnversion.h 
    6262svnversion.h: 
    63         echo -n '#define SVNVERSION "' > $@ 
    6463        if [ -d .svn ]; then \ 
    65                 echo -n "$(shell svnversion -nc . | sed -e 's/^[^:]*://;s/[A-Za-z]//')" >> $@; \ 
     64                ver=`svnversion -nc . | sed -e 's/^[^:]*://;s/[A-Za-z]//'`; \ 
    6665        elif [ -s SNAPSHOT ]; then \ 
    67                 echo -n "$(shell sed -e '/^Revision: */!d;s///;q' SNAPSHOT)" >> $@; \ 
     66                ver=`sed -e '/^Revision: */!d;s///;q' SNAPSHOT`; \ 
    6867        else \ 
    69                 echo -n "$(shell date +%F)" >> $@; \ 
    70         fi 
    71         echo '"' >> $@ 
     68                ver=`date +%F`; \ 
     69        fi; \ 
     70        echo "#define SVNVERSION \"$$ver\"" > $@ 
    7271 
    7372# conflicts with the 'tools' subdirectory