mirror of https://gitee.com/bigwinds/arangodb
405 lines
15 KiB
Makefile
405 lines
15 KiB
Makefile
# -*- mode: Makefile; -*-
|
|
|
|
## -----------------------------------------------------------------------------
|
|
## --SECTION-- DOCUMENTATION
|
|
## -----------------------------------------------------------------------------
|
|
|
|
MANUAL_DST=www@www.arangodb.org:/var/www/www.arangodb.org/avoc/manuals
|
|
|
|
OUTPUT_FOLDER=Doxygen/manuals/$(PACKAGE_VERSION)
|
|
|
|
|
|
################################################################################
|
|
### @brief pages
|
|
################################################################################
|
|
|
|
WIKI = \
|
|
Aql \
|
|
AqlExamples \
|
|
ArangoErrors \
|
|
CommandLine \
|
|
Communication \
|
|
Compiling \
|
|
DbaManual \
|
|
DbaManualAuthentication \
|
|
DbaManualBasics \
|
|
DbaManualDatafileDebugger \
|
|
DbaManualEmergencyConsole \
|
|
ExtendingAql \
|
|
FirstStepsArangoDB \
|
|
Glossary \
|
|
Graphs \
|
|
HandlingCollections \
|
|
HandlingDatabases \
|
|
HandlingDocuments \
|
|
HandlingEdges \
|
|
HandlingIndexes \
|
|
Home \
|
|
HttpAqlFunctions \
|
|
HttpBatch \
|
|
HttpCollection \
|
|
HttpCurrentDatabase \
|
|
HttpCursor \
|
|
HttpDatabase \
|
|
HttpGraph \
|
|
HttpImport \
|
|
HttpIndex \
|
|
HttpMisc \
|
|
HttpQuery \
|
|
HttpReplication \
|
|
HttpSimple \
|
|
HttpSystem \
|
|
HttpTransactions \
|
|
HttpTraversals \
|
|
HttpUser \
|
|
ImpManual \
|
|
ImpManualBasics \
|
|
ImplementorManual \
|
|
ImplementorManualArangoErrors \
|
|
IndexBitArray \
|
|
IndexCap \
|
|
IndexCapHttp \
|
|
IndexFulltext \
|
|
IndexFulltextHttp \
|
|
IndexGeo \
|
|
IndexGeoHttp \
|
|
IndexHash \
|
|
IndexHashHttp \
|
|
IndexSkiplist \
|
|
IndexSkiplistHttp \
|
|
InstallManual \
|
|
Installing \
|
|
JSModuleActions \
|
|
JSModuleConsole \
|
|
JSModuleFs \
|
|
JSModuleGraph \
|
|
JSModules \
|
|
NamingConventions \
|
|
NewFeatures11 \
|
|
NewFeatures12 \
|
|
NewFeatures13 \
|
|
NewFeatures14 \
|
|
RefManual \
|
|
RefManualArangoErrors \
|
|
RefManualReplication \
|
|
RestDocument \
|
|
RestEdge \
|
|
SimpleQueries \
|
|
Transactions \
|
|
Upgrading \
|
|
UpgradingGeneral \
|
|
Upgrading11 \
|
|
Upgrading12 \
|
|
Upgrading13 \
|
|
Upgrading14 \
|
|
UserManual \
|
|
UserManualActions \
|
|
UserManualArangosh \
|
|
UserManualFoxx \
|
|
UserManualFoxxManager \
|
|
UserManualReplication \
|
|
UserManualWebInterface \
|
|
jsUnity
|
|
|
|
################################################################################
|
|
### @brief TOC files
|
|
################################################################################
|
|
|
|
DOXYGEN_TOC = \
|
|
Documentation/DbaManual/DbaManual.md \
|
|
Documentation/ImplementorManual/ImplementorManual.md \
|
|
Documentation/InstallationManual/InstallationManual.md \
|
|
Documentation/Manual/Home.md \
|
|
Documentation/RefManual/RefManual.md \
|
|
Documentation/UserManual/UserManual.md \
|
|
Documentation/Manual/Upgrading.md
|
|
|
|
################################################################################
|
|
### @brief install man pages
|
|
################################################################################
|
|
|
|
dist_man_MANS += \
|
|
Documentation/man/man1/arangob.1 \
|
|
Documentation/man/man1/arangoimp.1 \
|
|
Documentation/man/man1/arangosh.1 \
|
|
Documentation/man/man8/rcarangod.8 \
|
|
Documentation/man/man8/arangod.8 \
|
|
Documentation/man/man8/arango-dfdb.8 \
|
|
Documentation/man/man8/foxx-manager.8
|
|
|
|
################################################################################
|
|
### @brief JavaScript files
|
|
################################################################################
|
|
|
|
DOXYGEN = \
|
|
Doxygen/js/actions/api-aqlfunction.c \
|
|
Doxygen/js/actions/api-collection.c \
|
|
Doxygen/js/actions/api-current-database.c \
|
|
Doxygen/js/actions/api-cursor.c \
|
|
Doxygen/js/actions/api-database.c \
|
|
Doxygen/js/actions/api-edges.c \
|
|
Doxygen/js/actions/api-explain.c \
|
|
Doxygen/js/actions/api-foxx.c \
|
|
Doxygen/js/actions/api-graph.c \
|
|
Doxygen/js/actions/api-index.c \
|
|
Doxygen/js/actions/api-query.c \
|
|
Doxygen/js/actions/api-simple.c \
|
|
Doxygen/js/actions/api-system.c \
|
|
Doxygen/js/actions/api-transaction.c \
|
|
Doxygen/js/actions/api-traversal.c \
|
|
Doxygen/js/actions/api-user.c \
|
|
Doxygen/js/common/bootstrap/module-console.c \
|
|
Doxygen/js/common/bootstrap/module-fs.c \
|
|
Doxygen/js/common/bootstrap/modules.c \
|
|
Doxygen/js/common/modules/jsunity.c \
|
|
Doxygen/js/common/modules/org/arangodb/aql/functions.c \
|
|
Doxygen/js/common/modules/org/arangodb/arango-collection-common.c \
|
|
Doxygen/js/common/modules/org/arangodb/arango-statement-common.c \
|
|
Doxygen/js/common/modules/org/arangodb/graph-common.c \
|
|
Doxygen/js/common/modules/org/arangodb/simple-query-common.c \
|
|
Doxygen/js/common/modules/org/arangodb/users-common.c \
|
|
Doxygen/js/server/modules/org/arangodb/actions.c \
|
|
Doxygen/js/server/modules/org/arangodb/arango-collection.c \
|
|
Doxygen/js/server/modules/org/arangodb/arango-database.c \
|
|
Doxygen/js/server/modules/org/arangodb/foxx.c \
|
|
Doxygen/js/server/modules/org/arangodb/foxx/authentication.c \
|
|
Doxygen/js/server/modules/org/arangodb/foxx/base_middleware.c \
|
|
Doxygen/js/server/modules/org/arangodb/foxx/controller.c \
|
|
Doxygen/js/server/modules/org/arangodb/foxx/format_middleware.c \
|
|
Doxygen/js/server/modules/org/arangodb/foxx/internals.c \
|
|
Doxygen/js/server/modules/org/arangodb/foxx/model.c \
|
|
Doxygen/js/server/modules/org/arangodb/foxx/repository.c \
|
|
Doxygen/js/server/modules/org/arangodb/foxx/request_context.c \
|
|
Doxygen/js/server/modules/org/arangodb/foxx/template_middleware.c \
|
|
Doxygen/js/server/modules/org/arangodb/graph.c \
|
|
Doxygen/js/server/modules/org/arangodb/graph/algorithms.c \
|
|
Doxygen/js/server/modules/org/arangodb/simple-query.c \
|
|
Doxygen/js/server/server.c
|
|
|
|
## -----------------------------------------------------------------------------
|
|
## --SECTION-- DOXYGEN
|
|
## -----------------------------------------------------------------------------
|
|
|
|
################################################################################
|
|
### @brief directory setup
|
|
################################################################################
|
|
|
|
.PHONY: Doxygen/js Doxygen/js/system Doxygen/js/modules
|
|
|
|
BUILT_SOURCES += Doxygen/.setup-directories
|
|
|
|
Doxygen/.setup-directories:
|
|
@test -d Doxygen/doc/images || mkdir -p Doxygen/doc/images
|
|
@test -d Doxygen/website/images || mkdir -p Doxygen/website/images
|
|
@test -d Doxygen/js/actions || mkdir -p Doxygen/js/actions
|
|
@test -d Doxygen/js/common/bootstrap || mkdir -p Doxygen/js/common/bootstrap
|
|
@test -d Doxygen/js/common/modules/org/arangodb/aql || mkdir -p Doxygen/js/common/modules/org/arangodb/aql
|
|
@test -d Doxygen/js/server/modules/org/arangodb/foxx || mkdir -p Doxygen/js/server/modules/org/arangodb/foxx
|
|
@test -d Doxygen/js/server/modules/org/arangodb/graph || mkdir -p Doxygen/js/server/modules/org/arangodb/graph
|
|
@test -d Doxygen/js/client || mkdir -p Doxygen/js/client
|
|
@test -d Doxygen/man/man1 || mkdir -p Doxygen/man/man1
|
|
@test -d Doxygen/man/man8 || mkdir -p Doxygen/man/man8
|
|
@test -d Doxygen/latex/images || mkdir -p Doxygen/latex/images
|
|
@test -d Doxygen/xml || mkdir -p Doxygen/xml
|
|
@touch $@
|
|
|
|
Doxygen/js/actions/%.c: @srcdir@/js/actions/%.js Doxygen/.setup-directories
|
|
@python @top_srcdir@/Documentation/Scripts/js2doxy.py $< > $@
|
|
|
|
Doxygen/js/common/bootstrap/%.c: @srcdir@/js/common/bootstrap/%.js Doxygen/.setup-directories
|
|
@python @top_srcdir@/Documentation/Scripts/js2doxy.py $< > $@
|
|
|
|
Doxygen/js/common/modules/%.c: @srcdir@/js/common/modules/%.js Doxygen/.setup-directories
|
|
@python @top_srcdir@/Documentation/Scripts/js2doxy.py $< > $@
|
|
|
|
Doxygen/js/server/%.c: @srcdir@/js/server/%.js Doxygen/.setup-directories
|
|
@python @top_srcdir@/Documentation/Scripts/js2doxy.py $< > $@
|
|
|
|
Doxygen/js/server/modules/%.c: @srcdir@/js/server/modules/%.js Doxygen/.setup-directories
|
|
@python @top_srcdir@/Documentation/Scripts/js2doxy.py $< > $@
|
|
|
|
Doxygen/xml/%.md: Doxygen/xml/%.xml
|
|
@python @top_srcdir@/Doxygen/Scripts/xml2md.py $< > $@
|
|
|
|
################################################################################
|
|
### @brief doxygen toc
|
|
################################################################################
|
|
|
|
.PHONY: doxygen-toc
|
|
|
|
doxygen-toc:
|
|
python @top_srcdir@/Documentation/Scripts/generateTOC.py $(DOXYGEN_TOC) >> Doxygen/toc.doxy.tmp
|
|
cmp -s Doxygen/toc.doxy Doxygen/toc.doxy.tmp || mv Doxygen/toc.doxy.tmp Doxygen/toc.doxy
|
|
@rm -f Doxygen/toc.doxy.tmp
|
|
|
|
Doxygen/toc.doxy: doxygen-toc
|
|
|
|
################################################################################
|
|
### @brief doxygen
|
|
################################################################################
|
|
|
|
.PHONY: doxygen
|
|
|
|
Doxygen/arango-html.doxy: Documentation/arango.template Doxygen/toc.doxy
|
|
sed -e 's:GENERATE_HTML *= *NO:GENERATE_HTML = YES:' -e 's:ENABLED_SECTIONS *=:ENABLED_SECTIONS = HTML:' < $< > $@
|
|
cat Doxygen/toc.doxy >> $@
|
|
|
|
doxygen: Doxygen/.setup-directories Doxygen/arango-html.doxy $(DOXYGEN)
|
|
$(MAKE) lib/BasicsC/voc-errors.h
|
|
doxygen Doxygen/arango-html.doxy > /dev/null
|
|
|
|
@for w in $(WIKI); do @top_srcdir@/Documentation/Scripts/html2html.sh --keep-title Doxygen/html/$$w.html Doxygen/website/$$w.html; done
|
|
cp -R @top_srcdir@/Documentation/images/* Doxygen/website/images
|
|
cp -R @top_srcdir@/Documentation/arangodb.css Doxygen/website
|
|
|
|
@for w in $(WIKI); do @top_srcdir@/Documentation/Scripts/html2html.sh --full-html --keep-title Doxygen/html/$$w.html Doxygen/doc/$$w.html; done
|
|
cp -R @top_srcdir@/Documentation/images/* Doxygen/doc/images
|
|
cp -R @top_srcdir@/Documentation/arangodb.css Doxygen/doc
|
|
|
|
################################################################################
|
|
### @brief latex
|
|
################################################################################
|
|
|
|
.PHONY: latex
|
|
|
|
Doxygen/arango-latex.doxy: Documentation/arango.template Doxygen/toc.doxy
|
|
sed -e 's:GENERATE_LATEX *= *NO:GENERATE_LATEX = YES:' -e 's:ENABLED_SECTIONS *=:ENABLED_SECTIONS = LATEX:' < $< > $@
|
|
cat Doxygen/toc.doxy >> $@
|
|
|
|
latex: Doxygen/.setup-directories Doxygen/arango-latex.doxy $(DOXYGEN)
|
|
$(MAKE) lib/BasicsC/voc-errors.h
|
|
doxygen Doxygen/arango-latex.doxy > /dev/null
|
|
|
|
echo "\def\arangodbversion{@PACKAGE_VERSION@}" > Doxygen/latex/version.tex
|
|
|
|
cp -R Documentation/latex/*.tex Doxygen/latex
|
|
cp -R Documentation/images Doxygen/latex/images
|
|
|
|
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/InstallManual.tex > Doxygen/latex/InstallManual.inc.tex
|
|
cd Doxygen/latex && pdflatex -interaction batchmode install-manual.tex || true
|
|
|
|
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/UserManual.tex > Doxygen/latex/UserManual.inc.tex
|
|
cd Doxygen/latex && pdflatex -interaction batchmode user-manual.tex || true
|
|
|
|
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/ImplementorManual.tex > Doxygen/latex/ImplementorManual.inc.tex
|
|
cd Doxygen/latex && pdflatex -interaction batchmode implementor-manual.tex || true
|
|
|
|
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/RefManual.tex > Doxygen/latex/RefManual.inc.tex
|
|
cd Doxygen/latex && pdflatex -interaction batchmode ref-manual.tex || true
|
|
|
|
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/DbaManual.tex > Doxygen/latex/DbaManual.inc.tex
|
|
cd Doxygen/latex && pdflatex -interaction batchmode dba-manual.tex || true
|
|
|
|
python @top_srcdir@/Documentation/Scripts/tex2tex.py Doxygen/latex/ImpManual.tex > Doxygen/latex/ImpManual.inc.tex
|
|
cd Doxygen/latex && pdflatex -interaction batchmode imp-manual.tex || true
|
|
|
|
################################################################################
|
|
### @brief man pages
|
|
################################################################################
|
|
|
|
.PHONY: man
|
|
|
|
man: Doxygen/.setup-directories
|
|
for section in 1 8; do for i in `ls Documentation/man$$section`; do sed -f Documentation/Scripts/man.sed -e "s/\<SECTION\>/$$section/" -e "s/\<COMMAND\>/$$i/g" -e "s/DATE/`date`/g" Documentation/man$$section/$$i > Doxygen/man/man$$section/$$i.$$section; done; done
|
|
|
|
## -----------------------------------------------------------------------------
|
|
## --SECTION-- EXAMPLES
|
|
## -----------------------------------------------------------------------------
|
|
|
|
################################################################################
|
|
### @brief generate json for swagger REST-API
|
|
################################################################################
|
|
|
|
.PHONY: swagger
|
|
|
|
swagger:
|
|
(python @srcdir@/Documentation/Scripts/generateSwaggerApi.py @srcdir@ @srcdir@/js/apps/aardvark/api-docs api-docs) > @srcdir@/js/apps/aardvark/api-docs.json
|
|
|
|
################################################################################
|
|
### @brief generate examples
|
|
################################################################################
|
|
|
|
.PHONY: examples
|
|
|
|
examples:
|
|
@rm -f /tmp/arangodb.examples
|
|
|
|
python @srcdir@/Documentation/Scripts/generateExamples.py \
|
|
--output-dir @builddir@/Documentation/Examples \
|
|
--arangosh-setup @srcdir@/Documentation/Examples/setup-arangosh.js \
|
|
@srcdir@/js/actions/*.js \
|
|
@srcdir@/Documentation/DbaManual/*.md \
|
|
@srcdir@/Documentation/UserManual/*.md \
|
|
@srcdir@/arangod/RestHandler/*.cpp \
|
|
> /tmp/arangosh.examples
|
|
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication true" PROTO=http
|
|
|
|
|
|
@builddir@/bin/arangosh \
|
|
-s \
|
|
-c @srcdir@/etc/relative/arangosh.conf \
|
|
--server.password "" \
|
|
--server.endpoint tcp://$(VOCHOST):$(VOCPORT) \
|
|
--javascript.execute /tmp/arangosh.examples
|
|
|
|
## -----------------------------------------------------------------------------
|
|
## --SECTION-- HELPERS
|
|
## -----------------------------------------------------------------------------
|
|
|
|
################################################################################
|
|
### @brief generate complete documentation including examples
|
|
################################################################################
|
|
|
|
.PHONY: documentation-complete
|
|
|
|
documentation-complete: doxygen examples swagger
|
|
|
|
################################################################################
|
|
### @brief cleanup
|
|
################################################################################
|
|
|
|
CLEANUP += \
|
|
Doxygen/.setup-directories \
|
|
Doxygen/*
|
|
|
|
|
|
################################################################################
|
|
## publish
|
|
################################################################################
|
|
|
|
.PHONY: publish publish-html publish-pdf publish-copy
|
|
|
|
publish: examples publish-html publish-pdf
|
|
make publish-copy
|
|
|
|
publish-copy:
|
|
cd Doxygen/manuals && scp -r "$(PACKAGE_VERSION)" $(MANUAL_DST)
|
|
|
|
publish-html:
|
|
$(MAKE) doxygen
|
|
mkdir -p $(OUTPUT_FOLDER)/images
|
|
@for w in $(WIKI); do cp Doxygen/website/$$w.html $(OUTPUT_FOLDER); done
|
|
@for i in `ls Doxygen/website/images/*.png`; do cp $$i $(OUTPUT_FOLDER)/images/; done
|
|
@cp Doxygen/website/arangodb.css $(OUTPUT_FOLDER)
|
|
@cp Documentation/Manual/shell_reference_card.pdf $(OUTPUT_FOLDER)
|
|
|
|
publish-pdf: $(OUTPUT_FOLDER)
|
|
$(MAKE) latex
|
|
cp Doxygen/latex/dba-manual.pdf $(OUTPUT_FOLDER)
|
|
cp Doxygen/latex/implementor-manual.pdf $(OUTPUT_FOLDER)
|
|
cp Doxygen/latex/install-manual.pdf $(OUTPUT_FOLDER)
|
|
cp Doxygen/latex/user-manual.pdf $(OUTPUT_FOLDER)
|
|
cp Doxygen/latex/ref-manual.pdf $(OUTPUT_FOLDER)
|
|
cp Doxygen/latex/imp-manual.pdf $(OUTPUT_FOLDER)
|
|
cp Documentation/Manual/shell_reference_card.pdf $(OUTPUT_FOLDER)
|
|
|
|
## -----------------------------------------------------------------------------
|
|
## --SECTION-- END-OF-FILE
|
|
## -----------------------------------------------------------------------------
|
|
|
|
## Local Variables:
|
|
## mode: outline-minor
|
|
## outline-regexp: "^\\(### @brief\\|## --SECTION--\\|# -\\*- \\)"
|
|
## End:
|