]> Git repositories of Nishi - tewi.git/commitdiff
add get-version
authorNishi <nishi@nishi.boats>
Wed, 18 Sep 2024 11:29:31 +0000 (11:29 +0000)
committerNishi <nishi@nishi.boats>
Wed, 18 Sep 2024 11:29:31 +0000 (11:29 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@53 8739d7e6-ffea-ec47-b151-bdff447c6205

Makefile

index d8d376718b6129d28ff88ddff4b4f9a6c2d98314..931106aabee1ddd6e08aef46a026a9112e3eced4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ include Platform/$(PLATFORM).mk
 
 FLAGS = PWD=$(PWD) PLATFORM=$(PLATFORM) PREFIX=$(PREFIX)
 
-.PHONY: all format clean ./Server ./Common ./Module ./Manpage
+.PHONY: all format clean ./Server ./Common ./Module ./Manpage get-version
 
 all: ./Server ./Module ./Manpage
 
@@ -30,6 +30,9 @@ all: ./Server ./Module ./Manpage
 format:
        clang-format --verbose -i `find ./Server ./Common ./Module "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h
 
+get-version:
+       @grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed -E 's/^"//g'
+
 clean:
        $(MAKE) -C ./Server $(FLAGS) clean
        $(MAKE) -C ./Module $(FLAGS) clean