forked from seehuhn/jvjsdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
70 lines (61 loc) · 2.19 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
## Process this file with automake to produce Makefile.in
# Copyright 2011 Jochen Voss <voss@seehuhn.de>
EXTRA_DIST = jvjsdoc.py template.html jsdoc.css search.js jsdoc.js deps.js
BUILT_SOURCES = config.py jsdoc.js deps.js
bin_SCRIPTS = jvjsdoc
pkgpython_PYTHON = config.py # more files will be included later
pkgdata_DATA = template.html jsdoc.css jsdoc.js
ALL = search.js
JSFLAGS=--warning_level=VERBOSE \
--summary_detail_level=2 \
--define=goog.DEBUG=false \
--compilation_level=ADVANCED_OPTIMIZATIONS
config.py: configure.ac Makefile.am
cd $(srcdir) && \
echo "# config.py - jvjsdoc configuration and version" >$@ && \
echo "# (autogenerated by Makefile.am, do not edit)" >>$@ && \
echo "" >>$@ && \
echo "PACKAGE=\"$(PACKAGE)\"" >>$@ && \
echo "VERSION=\"$(VERSION)\"" >>$@ && \
echo "CLOSURE_BASE=\"$(CLOSURE_BASE)\"" >>$@ && \
echo "DATA_DIR=\"$(pkgdatadir)\"" >>$@
deps.js: $(ALL)
if test "x$(CLOSURE_DEPSWRITER)" = "x"; then \
echo "error: depswriter.py not found" 1>&2; \
echo " configure with --with-closure-library to rebuild" 1>&2; \
exit 1; \
fi
$(CLOSURE_DEPSWRITER) \
--root_with_prefix=". `cd $(srcdir) && pwd`" \
--output_file=$@
jsdoc.js: $(ALL) deps.js
if test "x$(CLOSURE_BUILDER)" = "x"; then \
echo "error: closurebuilder.py not found" 1>&2; \
echo " configure with --with-closure-library to rebuild" 1>&2; \
exit 1; \
fi
if test "x$(CLOSURE_COMPILER)" = "x"; then \
echo "error: compiler.jar not found" 1>&2; \
echo " configure with --with-closure-compiler to rebuild" 1>&2; \
exit 1; \
fi
$(CLOSURE_BUILDER) \
--root=$(CLOSURE_LIBRARY) \
--root=. \
--output_mode=compiled \
--compiler_jar=$(CLOSURE_COMPILER) \
--compiler_flags=--js=$(CLOSURE_BASE)/deps.js \
$(foreach f, $(JSFLAGS),--compiler_flags=$(f)) \
--namespace=jvjsdoc \
--output_file=$@
@echo ""
chmod 644 $@
jvjsdoc: jvjsdoc.py Makefile.am
echo "#! /usr/bin/env @PYTHON@" >$@
echo "# WARNING: automatically generated from $<, do not edit" >>$@
echo "#" >>$@
sed -e "1 d" \
-e "s;^# FIX PATH$$;sys.path = ['$(pkgpythondir)'] + sys.path;" \
$< >>$@
chmod +x jvjsdoc
CLEANFILES = jvjsdoc config.py