X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=f3cf09743ba055c1840e7416f267dd1a1a3fe9ec;hb=5a0b93b00048075ae279ec2dbb6c0ebaf9ad7a3c;hp=ccc16d766bd6823e0e0e3f285a182d5071d90a8d;hpb=d015828479a131d3b422980c44748f7a10de8f91;p=YACASL2.git diff --git a/Makefile b/Makefile index ccc16d7..f3cf097 100644 --- a/Makefile +++ b/Makefile @@ -1,38 +1,82 @@ -.PHONY: build check doc doxygen clean gtags htags -MKDIR = mkdir -p -DOXYGEN = doxygen -GTAGS = gtags -HTAGS = htags -HTAGSFLAG = --map-file -anosx --tree-view +.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 + +GTAGS ?= gtags +RMF ?= rm -f +WHICH ?= which +ECHO ?= echo +INSTALL ?= install +SED ?= sed +CAT ?= cat + +prefix ?= ~ +bindir ?= $(prefix)/bin + +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 docall gtags build: - $(MAKE) -C src + $(MAKE) -C src all + +gtags: + @$(WHICH) $(GTAGS) >/dev/null && $(GTAGS) || $(ECHO) "$(GTAGS): not found" + +docall: + $(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: htags - @$(DOXYGEN) +uninstall: uninstall-info uninstall-casl2lib + $(RMF) $(bindir)/casl2 $(bindir)/comet2 $(bindir)/dumpword -gtags: - @$(GTAGS) +install-info: + $(MAKE) -C doc install-info + +uninstall-info: + @$(MAKE) -C doc uninstall-info + +install-casl2lib: + $(MAKE) -C as/casl2lib install-casl2lib + +uninstall-casl2lib: + @$(MAKE) -C as/casl2lib uninstall-casl2lib + +version: VERSION $(VERSIONFILES) + @$(ECHO) "YACASL2 Version:" `$(CAT) VERSION` -htags: doc/doxygen/html gtags - @$(HTAGS) $(HTAGSFLAG) $$@ -doc/doxygen/html: - @$(MKDIR) $@ +clean: clean-src clean-gtags clean-doc clean-doc-inner clean-version -clean: +clean-src: @$(MAKE) -sC src clean - @$(MAKE) -sC test/system/casl2 clean - @$(MAKE) -sC test/system/comet2 clean - @$(MAKE) -sC test/system/dumpword clean - @$(MAKE) -sC test/unit clean - @rm -rf doc/doxygen/* - @rm -f casl2 comet2 dumpword - @rm -f GPATH GRTAGS GSYMS GTAGS - @rm -rf HTML + +clean-gtags: + @$(RMF) GPATH GRTAGS GSYMS GTAGS + +clean-doc: + @$(MAKE) -sC doc clean + +clean-doc-inner: + @$(MAKE) -sC doc_inner clean + +clean-test: + @$(MAKE) -sC test clean + +clean-version: + @$(RMF) $(VERSIONFILES)