1 .PHONY: all build gtags \
6 clean src-clean gtags-clean \
7 test-clean doc-clean doc_inner-clean
9 CMD := casl2 comet2 dumpword
21 bindir ?= $(prefix)/bin
23 VERSION = $(shell $(CAT) VERSION)
24 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
30 $(CP) $(addprefix src/,$(CMD)) ./
33 $(if $(strip $(shell $(WHICH) $(GTAGS))),$(GTAGS),@$(ECHO) '$(GTAGS): not found')
39 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))
58 version: $(VERSIONFILES)
59 @$(ECHO) "YACASL2 Version: $(VERSION)"
61 $(VERSIONFILES): VERSION
62 @$(SED) -e "s/@@VERSION@@/$(VERSION)/g" $@.version >$@
67 distclean: cmd-clean src-distclean gtags-clean version-clean clean
69 clean: src-clean doc-clean doc_inner-clean
78 $(MAKE) -sC src distclean
81 $(RM) GPATH GRTAGS GSYMS GTAGS
87 $(MAKE) -sC doc_inner clean
93 $(MAKE) -sC test clean