Skip to content

Commit c3dc06b

Browse files
committed
If HEAD is not a tag, opt for describing light tags
1 parent 1e05a3c commit c3dc06b

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ FLEX_TARGET(SourceScanner "src/sourceScanner/lexer" "src/sourceScanner/yylex.cc
88
string(SUBSTRING ${FLEX_VERSION} 0 1 FLEX_VERSION_MAJOR)
99
string(SUBSTRING ${FLEX_VERSION} 2 1 FLEX_VERSION_MINOR)
1010

11-
add_definitions(-DVERSION="2.0.9" -DFLEX_VERSION_MAJOR=${FLEX_VERSION_MAJOR} -DFLEX_VERSION_MINOR=${FLEX_VERSION_MINOR})
11+
add_definitions(-DVERSION="2.0.9-1-g1e05a3c" -DFLEX_VERSION_MAJOR=${FLEX_VERSION_MAJOR} -DFLEX_VERSION_MINOR=${FLEX_VERSION_MINOR})
1212
link_libraries(gomp bobcat gnutls)
1313
add_definitions(-fopenmp)
1414
add_executable(ccbuild src/ccbuild.cc src/MD5Info/statics.cc src/MD5Info/save.cc src/MD5Info/old.cc src/MD5Info/load.cc src/MD5Info/hashFilenameFor.cc src/MD5Info/getInstance.cc src/MD5Info/destroy.cc src/MD5Info/contentHash.cc src/MD5Info/MD5Info.cc src/options/statics.cc src/system/username.cc src/system/uname.cc src/system/trimmed.cc src/system/trim.cc src/system/system.cc src/system/statics.cc src/system/sleep.cc src/system/resolveTest.cc src/system/projectName.cc src/system/parseArguments.cc src/system/mkdtemp.cc src/system/md5.cc src/system/makefileForAll.cc src/system/makefileFor.cc src/system/localSourcesInto.cc src/system/lib.cc src/system/inspect.cc src/system/icmake.cc src/system/exit.cc src/system/dotgraphForAll.cc src/system/dotgraphFor.cc src/system/distclean.cc src/system/destroy.cc src/system/depsFor.cc src/system/collectTargets.cc src/system/clean.cc src/system/check.cc src/system/changeTo.cc src/system/buildAll.cc src/system/build.cc src/system/batchCompile.cc src/system/addArguments.cc src/system/aapForAll.cc src/system/aapFor.cc src/string/toUpper.cc src/string/replace.cc src/globallocks/statics.cc src/globals/statics.cc src/globals/indexoperator.cc src/globals/globals.cc src/globals/getInstance.cc src/globals/destroy.cc src/fileSystem/touch.cc src/fileSystem/rmIfExists.cc src/fileSystem/rmDirectoryIfExists.cc src/fileSystem/rename.cc src/fileSystem/recursiveGlobDirectoriesInto.cc src/fileSystem/newer.cc src/fileSystem/modTime.cc src/fileSystem/isReadable.cc src/fileSystem/isDirectory.cc src/fileSystem/globSourceFilesInto.cc src/fileSystem/globInto.cc src/fileSystem/globFilesInto.cc src/fileSystem/globDirectoriesInto.cc src/fileSystem/fileName.cc src/fileSystem/fileExists.cc src/fileSystem/ensureDirectory.cc src/fileSystem/directoryName.cc src/fileSystem/cwd.cc src/fileSystem/cleanPath.cc src/fileSystem/baseName.cc src/fileSystem/absolutePath.cc src/problem/problem.cc src/resolver/statics.cc src/resolver/resolver.cc src/resolver/resolveInto.cc src/resolver/resolve.cc src/resolver/loadIfExists.cc src/resolver/getInstance.cc src/resolver/expand.cc src/resolver/destroy.cc src/compiler/statics.cc src/compiler/splitInto.cc src/compiler/precompileCommand.cc src/compiler/precompile.cc src/compiler/operator_add.cc src/compiler/linkCommand.cc src/compiler/link.cc src/compiler/libCommand.cc src/compiler/lib.cc src/compiler/countFirstLinkerArguments.cc src/compiler/compileCommand.cc src/compiler/compile.cc src/compiler/cls.cc src/compiler/ar.cc src/compiler/addObject.cc src/compiler/addArgument.cc src/sources/statics.cc src/sources/sources.cc src/sources/reloadStaleSources.cc src/sources/indexoperator.cc src/sources/getInstance.cc src/sources/erase.cc src/sources/destroy.cc src/source/upToDate.cc src/source/stale.cc src/source/source.cc src/source/setType.cc src/source/scan.cc src/source/reload.cc src/source/producesOutput.cc src/source/outputFilename.cc src/source/markAsDone.cc src/source/isObjectTarget.cc src/source/isLocalHeader.cc src/source/isLibTarget.cc src/source/isInternalHeader.cc src/source/isHeader.cc src/source/isBinTarget.cc src/source/hasSourceExtension.cc src/source/genDeps.cc src/source/directory.cc src/source/directDeps.cc src/source/dependencies.cc src/source/changed.cc src/source/buildObjectTarget.cc src/source/buildHeader.cc src/source/buildBinTarget.cc src/source/build.cc src/source/basenameWithoutExtension.cc src/sourceScanner/storeLocal.cc src/sourceScanner/storeIgnore.cc src/sourceScanner/storeGlobal.cc src/sourceScanner/sourceScanner.cc src/sourceScanner/includes.cc src/sourceScanner/hasMainFunction.cc src/sourceScanner/hasDefine.cc src/arguments/values.cc src/arguments/value.cc src/arguments/statics.cc src/arguments/outputOptions.cc src/arguments/initialize.cc src/arguments/getInstance.cc src/arguments/flagged.cc src/arguments/destroy.cc src/arguments/clear.cc src/arguments/arguments.cc ${FLEX_SourceScanner_OUTPUTS})

doc/ccbuild/ccbuild.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<book>
66
<title>&ccb; - A strict developer's build utility
77
<author>A. Bram Neijt
8-
<version>2.0.9
8+
<version>2.0.9-1-g1e05a3c
99
<abstract>This document is a general usage manual to &ccb;. It will introduce ways of
1010
using &ccb;. It will also explain &ccb;'s behaviour in more words then the manual does.
1111
The newest version of &ccb; can be found at the <url name="https://github.com/bneijt/ccbuild" id="https://github.com/bneijt/ccbuild">

update_cmakelists.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ fi
4040
$CCBUILD md5 --recursive-include . "${PSOURCE}" > MD5SUMS
4141
SOURCES=`egrep .cc$ MD5SUMS | sed -r 's/^[a-z0-9]+ //; s/ /\\ /' | tr '\n' ' '`
4242
VERSION=$(git tag --points-at HEAD)
43+
if [ -z "$VERSION" ]; then
44+
VERSION=$(git describe --tags)
45+
fi
4346

4447
#Write CMakeLists.txt
4548
cat > CMakeLists.txt <<EOF

0 commit comments

Comments
 (0)