projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make install機能を追加
[YACASL2.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
01f60a9
..
b2f9ba1
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,64
+1,70
@@
-.PHONY: build check doc doxygen clean gtags htags clean_htags
-MKDIR = mkdir -p
-MV = mv
-DOXYGEN = doxygen
-GTAGS = gtags
-HTAGS = htags
-HTAGSFLAG = -anosx
+.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
-all: build gtags
+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:
build:
- $(MAKE) -C src
+ $(MAKE) -C src
all
-
check
:
- @$(
MAKE) -sC test/system
+
gtags
:
+ @$(
WHICH) $(GTAGS) >/dev/null && $(GTAGS) || $(ECHO) "$(GTAGS): not found"
-doc
:
- @$(MAKE) -sC doc
+doc
all: doc
+ $(MAKE) -C doc all
-doxygen: doc_inner
- @$(DOXYGEN)
+info:
+ $(MAKE) -C doc info
-gtags: clean_gtags
- @$(GTAGS)
+html:
+ $(MAKE) -C doc html
-htags: doc_inner
- @$(MAKE) clean_htags
- @$(MAKE) gtags
- @$(HTAGS) $(HTAGSFLAG) $<
- @$(MV) $</HTML $</htags
+doc-inner:
+ $(MAKE) -C doc_inner all
-
doc_inner
:
- @$(MKDIR) $@
+
check
:
+ $(MAKE) -sC test/system
-clean: clean_cmd clean_src clean_gtags clean_systemtest clean_unittest clean_doc clean_doc_inner
+install: casl2 comet2 dumpword install-info install-casl2lib
+ $(INSTALL) -d $(bindir)
+ $(INSTALL) casl2 comet2 dumpword $(bindir)/
-clean_cmd:
-
@rm -f casl2 comet2
dumpword
+uninstall: uninstall-info uninstall-casl2lib
+
$(RMF) $(bindir)/casl2 $(bindir)/comet2 $(bindir)/
dumpword
-
clean_src
:
- @$(MAKE) -sC src clean
+
install-info
:
+ $(MAKE) -C doc install-info
-
clean_gtags
:
- @
rm -f GPATH GRTAGS GSYMS GTAGS
+
uninstall-info
:
+ @
$(MAKE) -C doc uninstall-info
-clean_systemtest:
- @$(MAKE) -sC test/system/casl2 clean
- @$(MAKE) -sC test/system/comet2 clean
- @$(MAKE) -sC test/system/dumpword clean
+install-casl2lib:
+ $(MAKE) -C as/casl2lib install-casl2lib
-
clean_unittest
:
- @$(MAKE) -
sC test/unit clean
+
uninstall-casl2lib
:
+ @$(MAKE) -
C as/casl2lib uninstall-casl2lib
-clean_doc:
- @$(MAKE) -sC doc clean
+clean: clean-src clean-gtags clean-doc clean-doc-inner
+
+clean-src:
+ @$(MAKE) -sC src clean
-clean_doc_inner:
- @rm -rf doc_inner
+clean-gtags:
+ @$(RMF) GPATH GRTAGS GSYMS GTAGS
+
+clean-doc:
+ @$(MAKE) -sC doc clean
-clean
_htags
:
- @
rm -rf doc_inner/htags
+clean
-doc-inner
:
+ @
$(MAKE) -sC doc_inner clean
-clean
_doxygen
:
- @
rm -rf doc_inner/doxyge
n
+clean
-test
:
+ @
$(MAKE) -sC test clea
n