バージョン反映の仕組みを更新
authorj8takagi <j8takagi@nifty.com>
Thu, 1 Nov 2012 09:53:28 +0000 (18:53 +0900)
committerj8takagi <j8takagi@nifty.com>
Thu, 1 Nov 2012 09:53:28 +0000 (18:53 +0900)
Makefile
VERSION
src/Makefile
test/system/casl2/opt_h/0.txt
test/system/casl2/opt_opterr/0.txt
test/system/casl2/opt_v/0.txt [new file with mode: 0644]
test/system/comet2/opt_h/0.txt
test/system/comet2/opt_opterr/0.txt
test/system/comet2/opt_v/0.txt [new file with mode: 0644]
test/system/dumpword/opt_v/0.txt [new file with mode: 0644]

index 6e145d7..5d57356 100644 (file)
--- 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 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.2p0
+0.2p2
index afb82a6..1da58bf 100644 (file)
@@ -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 $@ $^
index 335b97e..bf49402 100644 (file)
@@ -1 +1 @@
-Usage: ../../../../casl2 [-slLaAtTdh] [-oO[<OBJECTFILE>]] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE1[ FILE2  ...]
+Usage: ../../../../casl2 [-slLaAtTdvh] [-oO[<OBJECTFILE>]] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE1[ FILE2  ...]
index 335b97e..bf49402 100644 (file)
@@ -1 +1 @@
-Usage: ../../../../casl2 [-slLaAtTdh] [-oO[<OBJECTFILE>]] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE1[ FILE2  ...]
+Usage: ../../../../casl2 [-slLaAtTdvh] [-oO[<OBJECTFILE>]] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE1[ FILE2  ...]
diff --git a/test/system/casl2/opt_v/0.txt b/test/system/casl2/opt_v/0.txt
new file mode 100644 (file)
index 0000000..f945c59
--- /dev/null
@@ -0,0 +1 @@
+casl2 of YACASL2 version 0.2p2
index b4b0041..9385315 100644 (file)
@@ -1 +1 @@
-Usage: ../../../../comet2 [-tTdh] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE
+Usage: ../../../../comet2 [-tTdvh] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE
index b4b0041..9385315 100644 (file)
@@ -1 +1 @@
-Usage: ../../../../comet2 [-tTdh] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE
+Usage: ../../../../comet2 [-tTdvh] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE
diff --git a/test/system/comet2/opt_v/0.txt b/test/system/comet2/opt_v/0.txt
new file mode 100644 (file)
index 0000000..3953d3b
--- /dev/null
@@ -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 (file)
index 0000000..2841fe6
--- /dev/null
@@ -0,0 +1 @@
+dumpword of YACASL2 version 0.2p2