X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=6e145d7ce28e99c040c8462e10ddc5142d4374e8;hb=4dacfc4d9d163108765ab13e03cff7670e63640a;hp=a84983ccd9893f5a6e983952db05dc88625dd822;hpb=ab8b8f03997a5bbb8051ad260406f2e8d4f8ff57;p=YACASL2.git diff --git a/Makefile b/Makefile index a84983c..6e145d7 100644 --- a/Makefile +++ b/Makefile @@ -1,64 +1,81 @@ -.PHONY: build check doc doxygen clean gtags htags clean_htags -MKDIR = mkdir -p -MV = mv -DOXYGEN = doxygen -GTAGS = gtags -HTAGS = htags -HTAGSFLAG = -anosx +.PHONY: all build gtags check doc info html doc-inner install uninstall install-info uninstall-info install-casl2lib uninstall-casl2lib version clean clean-src clean-gtags clean-test clean-doc clean-doc-inner -all: build gtags +GTAGS ?= gtags +RMF ?= rm -f +WHICH ?= which +ECHO ?= echo +INSTALL ?= install +SED ?= sed -build: - $(MAKE) -C src +prefix ?= ~ +bindir ?= $(prefix)/bin +casl2libdir ?= $(prefix)/yacasl2/casl2lib + +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 + $(MAKE) -C src all + +gtags: + @$(WHICH) $(GTAGS) >/dev/null && $(GTAGS) || $(ECHO) "$(GTAGS): not found" + +docall: doc + $(MAKE) -C doc all + +info: + $(MAKE) -C doc info + +html: + $(MAKE) -C doc html + +doc-inner: + $(MAKE) -C doc_inner all check: - @$(MAKE) -sC test/system + $(MAKE) -sC test/system -doc: - @$(MAKE) -sC doc +install: casl2 comet2 dumpword install-info install-casl2lib + $(INSTALL) -d $(bindir) + $(INSTALL) casl2 comet2 dumpword $(bindir)/ -doxygen: doc_inner - @$(DOXYGEN) +uninstall: uninstall-info uninstall-casl2lib + $(RMF) $(bindir)/casl2 $(bindir)/comet2 $(bindir)/dumpword -gtags: clean_gtags - @if test `which $(GTAGS)`; then $(GTAGS); fi +install-info: + $(MAKE) -C doc install-info -htags: doc_inner - @$(MAKE) clean_htags - @$(MAKE) gtags - @$(HTAGS) $(HTAGSFLAG) $< - @$(MV) $$$f; done -clean_gtags: - @rm -f GPATH GRTAGS GSYMS GTAGS +clean: clean-src clean-gtags clean-doc clean-doc-inner clean-version -clean_systemtest: - @$(MAKE) -sC test/system/casl2 clean - @$(MAKE) -sC test/system/comet2 clean - @$(MAKE) -sC test/system/dumpword clean +clean-src: + @$(MAKE) -sC src clean -clean_unittest: - @$(MAKE) -sC test/unit clean +clean-gtags: + @$(RMF) GPATH GRTAGS GSYMS GTAGS -clean_doc: +clean-doc: @$(MAKE) -sC doc clean -clean_doc_inner: - @rm -rf doc_inner +clean-doc-inner: + @$(MAKE) -sC doc_inner clean -clean_htags: - @rm -rf doc_inner/htags +clean-test: + @$(MAKE) -sC test clean -clean_doxygen: - @rm -rf doc_inner/doxygen +clean-version: + @$(RMF) $(VERSIONFILES)