aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/doc/examples/Makefile
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-09-02 16:56:23 +0200
committerLars Thorsen <[email protected]>2011-05-10 09:13:22 +0200
commit1a5796cd12061ebb21e7e51a0b7bdf05ed4786a7 (patch)
tree7d4a0418919b15ebe2ca9993c3a4a9999f6de006 /lib/xmerl/doc/examples/Makefile
parente3af9123e7ef9291535cafbd0ecb9d3309d674f7 (diff)
downloadotp-1a5796cd12061ebb21e7e51a0b7bdf05ed4786a7.tar.gz
otp-1a5796cd12061ebb21e7e51a0b7bdf05ed4786a7.tar.bz2
otp-1a5796cd12061ebb21e7e51a0b7bdf05ed4786a7.zip
xmerl: Add doc/examples directory
Needed by the test suite.
Diffstat (limited to 'lib/xmerl/doc/examples/Makefile')
-rw-r--r--lib/xmerl/doc/examples/Makefile61
1 files changed, 61 insertions, 0 deletions
diff --git a/lib/xmerl/doc/examples/Makefile b/lib/xmerl/doc/examples/Makefile
new file mode 100644
index 0000000000..2768ee1985
--- /dev/null
+++ b/lib/xmerl/doc/examples/Makefile
@@ -0,0 +1,61 @@
+ERLC = erlc
+EMULATOR = beam
+EBIN = .
+HTML = .
+XML = ./xml
+RM = rm -f
+
+# ----------------------------------------------------
+# Common Macros
+# ----------------------------------------------------
+include ../../vsn.mk
+VSN = $(XMERL_VSN)
+
+
+MODULES = \
+ xmerl_test \
+ test_html \
+ xserl_test \
+ mkdocs \
+ sdocbook2xhtml
+
+
+
+DOC_FILES = $(DOCS:%=$(HTML)/%.html)
+
+ERL_COMPILE_FLAGS += $(DEBUG) -I ../../include +warn_unused_wars +debug_info
+
+SUB_DIRECTORIES =
+
+#all: $(MODULES:%=$(EBIN)/%.$(EMULATOR)) xsm $(DOC_FILES)
+all opt: $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(DOC_FILES)
+
+info:
+ @echo "DOC_FILES: $(DOC_FILES)"
+
+clean:
+# @for d in $(SUB_DIRECTORIES); do \
+# cd $$d; $(MAKE) clean; \
+# done
+ $(RM) $(HTML)/*.html
+ $(RM) $(EBIN)/*.beam
+ $(RM) core *~
+
+debug: xsmdebug $(DOC_FILES)
+
+xsm:
+ @for d in $(SUB_DIRECTORIES); do \
+ cd $$d; $(MAKE); \
+ done
+
+xsmdebug:
+ @for d in $(SUB_DIRECTORIES); do \
+ cd $$d; $(MAKE) DEBUG=-Ddebug=1; \
+ done
+
+$(HTML)/%.html: $(XML)/%.xml
+ erl -noshell -pa ../../ebin -run mkdocs run $< $@ -s erlang halt
+
+$(EBIN)/%.beam: %.erl
+ $(ERLC) $(ERL_COMPILE_FLAGS) -o $(EBIN) $<
+