X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=Makefile;h=6e145d7ce28e99c040c8462e10ddc5142d4374e8;hp=97d6a63146d93e76e2f19e67ef74c15fdabfad5b;hb=8b76a2371ab7fc325f11b9164a73e899f98072f0;hpb=a03cc04e5b00700df26f25b4e934a93ee2396878 diff --git a/Makefile b/Makefile index 97d6a63..6e145d7 100644 --- a/Makefile +++ b/Makefile @@ -1,38 +1,81 @@ -.PHONY: build check doc doxygen clean gtags htags -MKDIR = mkdir -p -DOXYGEN = doxygen -GTAGS = gtags -HTAGS = htags -HTAGSFLAG = --map-file -anos --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 -build: - $(MAKE) -C src +GTAGS ?= gtags +RMF ?= rm -f +WHICH ?= which +ECHO ?= echo +INSTALL ?= install +SED ?= sed -check: - @$(MAKE) -sC test/system +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 -doc: - @$(MAKE) -sC doc +all: build info html gtags -doxygen: htags - @$(DOXYGEN) +build: version + $(MAKE) -C src all gtags: - @$(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 + +install: casl2 comet2 dumpword install-info install-casl2lib + $(INSTALL) -d $(bindir) + $(INSTALL) casl2 comet2 dumpword $(bindir)/ + +uninstall: uninstall-info uninstall-casl2lib + $(RMF) $(bindir)/casl2 $(bindir)/comet2 $(bindir)/dumpword -htags: doc/doxygen/html gtags - @$(HTAGS) $(HTAGSFLAG) $$$f; done + +clean: clean-src clean-gtags clean-doc clean-doc-inner clean-version + +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)