GTAGS := gtags
INSTALL := install
SED := sed
-SEDI := $(SED) -i
WC := wc
WHICH := which
XARGS := xargs
CMDFILES := casl2 comet2 dumpword casl2rev comet2monitor
-YEAR := $(shell $(DATE) '+%Y')
+YEAR = $(shell $(DATE) '+%Y')
all: copyright INSTALL build gtags
if test `$(GIT) status -s | $(WC) -l` -gt 0; then $(ECHO) "Error: commit, first."; exit 1; fi; if test "$(VERSIONGITREF)" != "$(MAINGITREF)"; then $(GIT) tag $(VERSION); fi
copyright:
- $(SEDI) 's/Copyright (c) 2010-20[0-9][0-9]/Copyright (c) 2010-$(YEAR)/g' LICENSE README
- $(SEDI) 's/Copyright @copyright{} 2010-20[0-9][0-9]/Copyright @copyright{} 2010-$(YEAR)/g' doc/*.texi
+ $(SED) -i.bak 's/Copyright (c) 2010-20[0-9][0-9]/Copyright (c) 2010-$(YEAR)/g' LICENSE README && $(RM) *.bak
distclean: cmd-clean src-distclean gtags-clean version-clean clean
-RMR := $(RM) -r
SED := sed
+DATE := date
DOCS := install manual
CSS := style.css
INSTALL-INFO-TARGETS := yacasl2.info
+YEAR := $(shell $(DATE) '+%Y')
+
.PHONY: base all info html htmls pdf casl2_spec distclean clean
-base: install.txt info html
+base: copyright install.txt info html
all: base htmls pdf casl2_spec
+copyright:
+ $(SED) -i.sed_bak 's/Copyright @copyright{} 2010-20[0-9][0-9]/Copyright @copyright{} 2010-$(YEAR)/g' *.texi && $(RM) *.sed_bak
+
info: yacasl2.info
html: $(addsuffix .html,$(DOCS))
# makeで作成されたドキュメントはすべて削除
distclean: clean texinfo-distclean
- $(RM) install.txt *.info *.html *_html *.pdf
+ $(RM) install.txt *.info *.html *_html *.pdf *.sed_bak
$(MAKE) -C casl2_spec distclean
# make baseで作成されたドキュメントは残す
clean: texinfo-clean
- $(RM) *.bak
+ $(RM) *.sed_bak
$(MAKE) -C casl2_spec clean
include texinfo.mk