From: j8takagi Date: Thu, 1 Nov 2012 09:53:28 +0000 (+0900) Subject: バージョン反映の仕組みを更新 X-Git-Tag: 0.2p2~3^2~2 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfffda6171175500a16a36785ed414b251f826cf;p=YACASL2.git バージョン反映の仕組みを更新 --- diff --git a/Makefile b/Makefile index 6e145d7..5d57356 100644 --- a/Makefile +++ b/Makefile @@ -6,16 +6,17 @@ WHICH ?= which ECHO ?= echo INSTALL ?= install SED ?= sed +CAT ?= cat prefix ?= ~ bindir ?= $(prefix)/bin -casl2libdir ?= $(prefix)/yacasl2/casl2lib +casl2libdir ?= $(prefix)/lib/casl2 VERSIONFILES = include/package.h test/system/casl2/opt_v/0.txt test/system/comet2/opt_v/0.txt test/system/dumpword/opt_v/0.txt all: build info html gtags -build: version +build: $(MAKE) -C src all gtags: @@ -55,10 +56,11 @@ install-casl2lib: uninstall-casl2lib: @$(MAKE) -C as/casl2lib uninstall-casl2lib -version: $(VERSIONFILES) +version: VERSION $(VERSIONFILES) + @$(ECHO) "YACASL2 Version:" `$(CAT) VERSION` -$(VERSIONFILES): - for f in $(VERSIONFILES); do $(SED) -e "s/@@VERSION@@/`cat VERSION`/g" $$f.version >$$f; done +$(VERSIONFILES): VERSION + $(SED) -e "s/@@VERSION@@/`cat VERSION`/g" $@.version >$@ clean: clean-src clean-gtags clean-doc clean-doc-inner clean-version diff --git a/VERSION b/VERSION index e6ea989..48bfc31 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2p0 +0.2p2 diff --git a/src/Makefile b/src/Makefile index afb82a6..1da58bf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,9 +13,12 @@ CASL2SRC := struct.c hash.c ASSRC := assemble.c token.c label.c EXECSRC := exec.c dump.c -.PHONY: all clean +.PHONY: all version clean -all: ../casl2 ../comet2 ../dumpword ctags etags +all: version ../casl2 ../comet2 ../dumpword ctags etags + +version: + $(MAKE) -C .. version ../casl2: casl2.o $(subst .c,.o,$(COMMONSRC) $(CASL2SRC) $(ASSRC) $(EXECSRC)) $(CC) $(CFLAGS) -o $@ $^ diff --git a/test/system/casl2/opt_h/0.txt b/test/system/casl2/opt_h/0.txt index 335b97e..bf49402 100644 --- a/test/system/casl2/opt_h/0.txt +++ b/test/system/casl2/opt_h/0.txt @@ -1 +1 @@ -Usage: ../../../../casl2 [-slLaAtTdh] [-oO[]] [-M ] [-C ] FILE1[ FILE2 ...] +Usage: ../../../../casl2 [-slLaAtTdvh] [-oO[]] [-M ] [-C ] FILE1[ FILE2 ...] diff --git a/test/system/casl2/opt_opterr/0.txt b/test/system/casl2/opt_opterr/0.txt index 335b97e..bf49402 100644 --- a/test/system/casl2/opt_opterr/0.txt +++ b/test/system/casl2/opt_opterr/0.txt @@ -1 +1 @@ -Usage: ../../../../casl2 [-slLaAtTdh] [-oO[]] [-M ] [-C ] FILE1[ FILE2 ...] +Usage: ../../../../casl2 [-slLaAtTdvh] [-oO[]] [-M ] [-C ] FILE1[ FILE2 ...] diff --git a/test/system/casl2/opt_v/0.txt b/test/system/casl2/opt_v/0.txt new file mode 100644 index 0000000..f945c59 --- /dev/null +++ b/test/system/casl2/opt_v/0.txt @@ -0,0 +1 @@ +casl2 of YACASL2 version 0.2p2 diff --git a/test/system/comet2/opt_h/0.txt b/test/system/comet2/opt_h/0.txt index b4b0041..9385315 100644 --- a/test/system/comet2/opt_h/0.txt +++ b/test/system/comet2/opt_h/0.txt @@ -1 +1 @@ -Usage: ../../../../comet2 [-tTdh] [-M ] [-C ] FILE +Usage: ../../../../comet2 [-tTdvh] [-M ] [-C ] FILE diff --git a/test/system/comet2/opt_opterr/0.txt b/test/system/comet2/opt_opterr/0.txt index b4b0041..9385315 100644 --- a/test/system/comet2/opt_opterr/0.txt +++ b/test/system/comet2/opt_opterr/0.txt @@ -1 +1 @@ -Usage: ../../../../comet2 [-tTdh] [-M ] [-C ] FILE +Usage: ../../../../comet2 [-tTdvh] [-M ] [-C ] FILE diff --git a/test/system/comet2/opt_v/0.txt b/test/system/comet2/opt_v/0.txt new file mode 100644 index 0000000..3953d3b --- /dev/null +++ b/test/system/comet2/opt_v/0.txt @@ -0,0 +1 @@ +comet2 of YACASL2 version 0.2p2 diff --git a/test/system/dumpword/opt_v/0.txt b/test/system/dumpword/opt_v/0.txt new file mode 100644 index 0000000..2841fe6 --- /dev/null +++ b/test/system/dumpword/opt_v/0.txt @@ -0,0 +1 @@ +dumpword of YACASL2 version 0.2p2