1 .PHONY: all build gtags check doc info html doc-inner install uninstall install-info uninstall-info install-casl2lib uninstall-casl2lib version gittag clean clean-src clean-gtags clean-test clean-doc clean-doc-inner
3 CMD := casl2 comet2 dumpword
15 bindir ?= $(prefix)/bin
17 VERSION = $(shell $(CAT) VERSION)
18 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
24 $(CP) $(addprefix src/,$(CMD)) ./
27 $(if $(strip $(shell $(WHICH) $(GTAGS))),$(GTAGS),@$(ECHO) '$(GTAGS): not found')
33 INSTALL: doc/install.txt
46 $(MAKE) -C doc_inner all
49 $(MAKE) -sC test/system
51 install: casl2 comet2 dumpword install-info install-casl2lib
52 $(INSTALL) -d $(bindir)
53 $(INSTALL) $(CMD) $(bindir)/
55 uninstall: uninstall-info uninstall-casl2lib
56 $(RM) $(prefix $(bindir)/,$(CMD))
59 $(MAKE) -C doc install-info
62 $(MAKE) -C doc uninstall-info
65 $(MAKE) -C as/casl2lib install-casl2lib
68 $(MAKE) -C as/casl2lib uninstall-casl2lib
70 version: $(VERSIONFILES)
71 @$(ECHO) "YACASL2 Version: $(VERSION)"
73 $(VERSIONFILES): VERSION
74 @$(SED) -e "s/@@VERSION@@/$(VERSION)/g" $@.version >$@
79 clean: clean-cmd clean-src clean-gtags clean-doc clean-doc-inner clean-version
85 @$(MAKE) -sC src clean
88 @$(RM) GPATH GRTAGS GSYMS GTAGS
91 @$(MAKE) -sC doc clean
94 @$(MAKE) -sC doc_inner clean
97 @$(RM) $(VERSIONFILES)
100 @$(MAKE) -sC test clean