X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=Makefile;h=b2f9ba17afffa70f2fb249cc73f0a1476f32c75f;hp=d7e61eea175db567e2cd9fbc76f0c55df84538c5;hb=123e1c84b369e6f1c7b28c72e6902e4742628be4;hpb=e07b6371cc8a59c6793a895e968ff2c6cf28181b diff --git a/Makefile b/Makefile index d7e61ee..b2f9ba1 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,70 @@ -prefix = $(HOME) -CLEANDIR = src test/integration test/unit -.PHPNY: all clean check install uninstall -all: - make -C src +.PHONY: all build gtags check doc info html doc-inner install uninstall install-info uninstall-info install-casl2lib uninstall-casl2lib clean clean-src clean-gtags clean-test clean-doc clean-doc-inner + +GTAGS ?= gtags +RMF ?= rm -f +WHICH ?= which +ECHO ?= echo +INSTALL ?= install + +prefix ?= ~ +bindir ?= $(prefix)/bin +casl2libdir ?= $(prefix)/yacasl2/casl2lib + +all: build info html gtags + +build: + $(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/integration -clean: - @for target in $(CLEANDIR); do $(MAKE) -sC $$target clean; done -install: all - @if test -d $(prefix); then \ - install -s ./casl2 $(prefix)/casl2; \ - install -s ./comet2 $(prefix)/comet2; \ - install -s ./dumpword $(prefix)/dumpword; \ - fi -uninstall: - @if test -d $(prefix); then \ - rm -f $(prefix)/casl2 $(prefix)/comet2 $(prefix)/dumpword; \ - fi + $(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 + +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 + +clean: clean-src clean-gtags clean-doc clean-doc-inner + +clean-src: + @$(MAKE) -sC src clean + +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