X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=Makefile;h=a1921f4b136595b9a41daa03ed53882c8f3bfcb5;hb=refs%2Ftags%2Fv0.4p0;hp=8bd9f1ad71c1994ad7acdb7f7aff582316fbc63e;hpb=d8ebef3f5afa40c90d4919b82c38067933d617aa;p=YACASL2.git diff --git a/Makefile b/Makefile index 8bd9f1a..a1921f4 100644 --- a/Makefile +++ b/Makefile @@ -6,22 +6,24 @@ clean src-clean gtags-clean \ test-clean doc-clean doc_inner-clean -CMD := casl2 comet2 dumpword +CMD := casl2 comet2 dumpword casl2rev CAT := cat CP := cp ECHO := /bin/echo +EXPR := expr GIT := git GREP := grep GTAGS := gtags INSTALL := install SED := sed +WC := wc WHICH := which -EXPR := expr XARGS := xargs prefix ?= ~ bindir ?= $(prefix)/bin +libdir ?= $(prefix)/share VERSION := $(shell $(CAT) VERSION) @@ -29,12 +31,12 @@ VERSIONGITREF := $(shell $(GIT) show-ref -s --tags $(VERSION)) MASTERGITREF := $(shell $(GIT) show-ref -s refs/heads/master) -VERSIONFILES = include/package.h \ - test/system/casl2/opt_v/0.txt \ - test/system/comet2/opt_v/0.txt \ +VERSIONFILES = include/version.h \ + test/system/casl2_opt/opt_v/0.txt \ + test/system/comet2_opt/opt_v/0.txt \ test/system/dumpword/opt_v/0.txt -all: build doc gtags +all: build INSTALL gtags build: $(MAKE) -C src all @@ -43,13 +45,12 @@ build: gtags: $(if $(strip $(shell $(WHICH) $(GTAGS))),$(GTAGS),@$(ECHO) '$(GTAGS): not found') -doc: - $(MAKE) -C doc base - $(MAKE) INSTALL - INSTALL: doc/install.txt $(CP) $< $@ +doc/install.txt: + $(MAKE) -C doc base + alldoc: $(MAKE) -C doc all @@ -59,11 +60,14 @@ doc_inner: check: $(MAKE) -sC test/system -install: casl2 comet2 dumpword install-info install-casl2lib +install: casl2 comet2 dumpword install-info $(INSTALL) -d $(bindir) $(INSTALL) $(CMD) $(bindir)/ -uninstall: uninstall-info uninstall-casl2lib +install-info: + $(MAKE) -C doc install-info + +uninstall: uninstall-info $(RM) $(prefix $(bindir)/,$(CMD)) version: $(VERSIONFILES) @@ -73,7 +77,7 @@ $(VERSIONFILES): VERSION @$(SED) -e "s/@@VERSION@@/$(VERSION)/g" $@.version >$@ gittag: - if test `$(GIT) status -s | wc -l` -gt 0; then $(ECHO) "Error: commit, first."; exit 1; fi; if test "$(VERSIONGITREF)" != "$(MASTERGITREF)"; then $(GIT) tag $(VERSION); fi + if test `$(GIT) status -s | $(WC) -l` -gt 0; then $(ECHO) "Error: commit, first."; exit 1; fi; if test "$(VERSIONGITREF)" != "$(MASTERGITREF)"; then $(GIT) tag $(VERSION); fi distclean: cmd-clean src-distclean gtags-clean version-clean clean