summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-08-29 18:00:04 +0200
committerRobin Gareus <robin@gareus.org>2019-08-29 21:40:54 +0200
commitdab29eb8ade18259cf501d155cec012b85f22c9b (patch)
treece9c535c7be35bc0294a23b159c87be0db561be9 /tools
parent08644d8f2a35bfdd7d324bcd0c1ad74e5d868283 (diff)
Fix Lua-doc doxygen declaration extraction
Diffstat (limited to 'tools')
-rwxr-xr-xtools/doxy2json/ardourdoc.sh14
-rwxr-xr-xtools/doxy2json/postproc.sh7
-rwxr-xr-xtools/fmt-luadoc.php1
3 files changed, 13 insertions, 9 deletions
diff --git a/tools/doxy2json/ardourdoc.sh b/tools/doxy2json/ardourdoc.sh
index 975235dc51..c559e2fc15 100755
--- a/tools/doxy2json/ardourdoc.sh
+++ b/tools/doxy2json/ardourdoc.sh
@@ -14,25 +14,23 @@ time ./tools/doxy2json/doxy2json -j 4 \
$LLVMINCLUDE \
-D PACKAGE=\"doc\" \
-D PROGRAM_NAME=\"Ardour\" -D PROGRAM_VERSION=\"6\" -D LOCALEDIR=\"/\" \
- -D ARCH_X86 -D CONFIG_ARCH=\"x86_64\" -D WAF_BUILD \
+ -D ARCH_X86 -D CONFIG_ARCH=\"x86_64\" -D WAF_BUILD -D CANVAS_COMPATIBILITY=1 \
-D HAVE_AUBIO=1 -D HAVE_ALSA=1 -D HAVE_GLIB=1 -D HAVE_LIBS_LUA=1 -D HAVE_XML=1 -D PTFORMAT=1 \
-D HAVE_SAMPLERATE=1 -D HAVE_LV2=1 -D HAVE_LV2_1_10_0=1 -D HAVE_SERD=1 -D HAVE_SORD=1 -D HAVE_SRATOM=1 -D HAVE_LILV=1 -D HAVE_LV2_1_0_0=1 \
-D HAVE_SUIL=1 -D LV2_SUPPORT=1 -D LV2_EXTENDED=1 -D HAVE_GTK=1 -D HAVE_LIBS_GTKMM2EXT=1 \
-D HAVE_X11=1 -D LXVST_64BIT=1 -D LXVST_SUPPORT=1 -D HAVE_TAGLIB=1 -D HAVE_POSIX_MEMALIGN=1 -D HAVE_VAMPSDK=1 -D HAVE_VAMPHOSTSDK=1 -D HAVE_RUBBERBAND=1 -D ENABLE_NLS=1 \
- -D HAVE_CURL=1 -D HAVE_LO=1 -D HAVE_LRDF=1 -D _VAMP_NO_PLUGIN_NAMESPACE=1 \
+ -D HAVE_CURL=1 -D HAVE_LO=1 -D HAVE_LRDF=1 -D _VAMP_NO_PLUGIN_NAMESPACE=1 -D _VAMP_NO_HOST_NAMESPACE=1 \
-I libs/ardour -I libs/pbd -I libs/lua -I gtk2_ardour -I libs/temporal -I libs/audiographer -I libs/ptformat -I libs/fst \
- -I libs/ltc -I libs/evoral -I libs/canvas -I libs/gtkmm2ext -I libs/midi++2 -I libs/surfaces/control_protocol \
- -I libs/waveview -I libs/widgets -I libs -I build/libs/pbd -I build/libs/ardour -I build/gtk2_ardour \
- `pkg-config --cflags glib-2.0 glibmm-2.4 cairomm-1.0 gtkmm-2.4 libxml-2.0 lilv-0 suil-0 | sed 's/-std=c++11 //;s/-pthread //'` \
+ -I libs/libltc/ltc -I libs/evoral -I libs/canvas -I libs/gtkmm2ext -I libs/midi++2 -I libs/surfaces/control_protocol \
+ -I libs/zita-resampler -I libs/fluidsynth/fluidsynth -I libs/waveview -I libs/widgets \
+ -I libs -I build/libs/pbd -I build/libs/ardour -I build/gtk2_ardour \
+ `pkg-config --cflags glib-2.0 glibmm-2.4 cairomm-1.0 gtkmm-2.4 libxml-2.0 lilv-0 suil-0 raptor2 | sed 's/-std=c++11 //;s/-pthread //'` \
-X "_" -X "::" -X "sigc" -X "Atk::" -X "Gdk::" -X "Gtk::" -X "Gio::" \
-X "Glib::" -X "Pango::" -X "luabridge::" \
\
libs/ardour/*.cc libs/pbd/*.cc \
gtk2_ardour/*.cc \
- libs/libltc/ltc/ltc.h \
- /usr/include/cairomm-1.0/cairomm/context.h \
/usr/include/vamp-sdk/Plugin.h \
- ~/gtk/inst/include/cairomm-1.0/cairomm/context.h \
~/gtk/inst/include/vamp-sdk/Plugin.h \
> $TMPFILE
diff --git a/tools/doxy2json/postproc.sh b/tools/doxy2json/postproc.sh
index 6c74d5ff78..8dc6423d2f 100755
--- a/tools/doxy2json/postproc.sh
+++ b/tools/doxy2json/postproc.sh
@@ -23,11 +23,15 @@ foreach (json_decode (\$json, true) as \$a) {
\$a['decl'] = str_replace ('ARDOUR::sampleoffset_t', 'long', \$a['decl']);
\$a['decl'] = str_replace ('ARDOUR::frameoffset_t', 'long', \$a['decl']);
\$a['decl'] = str_replace ('ARDOUR::pframes_t', 'unsigned int', \$a['decl']);
+ \$a['decl'] = str_replace ('ARDOUR::Sample', 'float', \$a['decl']);
+ \$a['decl'] = str_replace ('ARDOUR::gain_t', 'float', \$a['decl']);
\$a['decl'] = str_replace ('samplepos_t', 'long', \$a['decl']);
\$a['decl'] = str_replace ('samplecnt_t', 'long', \$a['decl']);
\$a['decl'] = str_replace ('sampleoffset_t', 'long', \$a['decl']);
\$a['decl'] = str_replace ('frameoffset_t', 'long', \$a['decl']);
\$a['decl'] = str_replace ('pframes_t', 'unsigned int', \$a['decl']);
+ \$a['decl'] = preg_replace ('/\bSample\b/', 'float', \$a['decl']);
+ \$a['decl'] = str_replace ('gain_t', 'float', \$a['decl']);
\$a['decl'] = str_replace ('int64_t', 'long', \$a['decl']);
\$a['decl'] = str_replace ('uint8_t', 'unsigned char', \$a['decl']);
\$a['decl'] = str_replace ('uint64_t', 'unsigned long', \$a['decl']);
@@ -38,6 +42,9 @@ foreach (json_decode (\$json, true) as \$a) {
\$a['decl'] = str_replace ('const unsigned int', 'unsigned int', \$a['decl']);
\$a['decl'] = str_replace ('const unsigned long', 'unsigned long', \$a['decl']);
\$a['decl'] = str_replace (' ::Vamp::', ' Vamp::', \$a['decl']);
+ \$a['decl'] = str_replace ('Cairo::Context::set_line_join(LineJoin)', 'Cairo::Context::set_line_join(Cairo::LineJoin)', \$a['decl']);
+ \$a['decl'] = str_replace ('Cairo::Context::set_line_cap(LineCap)', 'Cairo::Context::set_line_cap(Cairo::LineCap)', \$a['decl']);
+ \$a['decl'] = str_replace ('Cairo::Context::set_operator(Operator)', 'Cairo::Context::set_operator(Cairo::Operator)', \$a['decl']);
\$canon = str_replace (' *', '*', \$a['decl']);
\$api[\$canon] = \$a;
}
diff --git a/tools/fmt-luadoc.php b/tools/fmt-luadoc.php
index aef277dbf8..ae333c8926 100755
--- a/tools/fmt-luadoc.php
+++ b/tools/fmt-luadoc.php
@@ -205,7 +205,6 @@ function canonical_decl ($b) {
if (!$first) { $rv .= ', '; }; $first = false;
if (empty ($a)) { continue; }
$a = preg_replace ('/([^>]) >/', '$1>', $a);
- $a = preg_replace ('/^Cairo::/', '', $a); // special case cairo enums
$a = preg_replace ('/([^ ])&/', '$1 &', $a);
$a = preg_replace ('/std::vector<([^>]*)> const/', 'const std::vector<$1>', $a);
$a = str_replace ('std::vector', 'vector', $a);