summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/Doxyfile.in14
-rw-r--r--doc/Makefile11
-rw-r--r--doc/Makefile.am28
-rwxr-xr-xdoc/gen_hangulkeyboards.py3
4 files changed, 37 insertions, 19 deletions
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index 1fdd062..19c7c59 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -450,13 +450,13 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = ../hangul/hangul.h \
- ../hangul/hangulctype.c \
- ../hangul/hangulinputcontext.c \
- ../hangul/hangulkeyboard.c \
- ../hangul/hanja.c \
- mainpage.dox \
- hangulkeyboards.dox
+INPUT = @top_srcdir@/hangul/hangul.h \
+ @top_srcdir@/hangul/hangulctype.c \
+ @top_srcdir@/hangul/hangulinputcontext.c \
+ @top_srcdir@/hangul/hangulkeyboard.c \
+ @top_srcdir@/hangul/hanja.c \
+ @srcdir@/mainpage.dox \
+ @builddir@/hangulkeyboards.dox
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
diff --git a/doc/Makefile b/doc/Makefile
deleted file mode 100644
index 1db3dbf..0000000
--- a/doc/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-doc: Doxyfile hangulkeyboards.dox
- doxygen
-
-hangulkeyboards.dox: gen_hangulkeyboards.py
- ./gen_hangulkeyboards.py > $@
-
-Doxyfile: Doxyfile.in
- cd .. && ./config.status doc/$@
-
-clean:
- rm -rf html
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..5bfcc8a
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,28 @@
+# libhangul
+# Copyright (C) 2018 Choe Hwanjin
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+.DELETE_ON_ERROR:
+
+doc: Doxyfile hangulkeyboards.dox
+ doxygen Doxyfile
+
+hangulkeyboards.dox: gen_hangulkeyboards.py ../hangul/hangulkeyboard.h
+ $(srcdir)/gen_hangulkeyboards.py $(top_srcdir)/hangul/hangulkeyboard.h > $@
+
+clean-local:
+ -rm -f hangulkeyboards.dox
+ -rm -rf html
diff --git a/doc/gen_hangulkeyboards.py b/doc/gen_hangulkeyboards.py
index 4176c81..701b0cb 100755
--- a/doc/gen_hangulkeyboards.py
+++ b/doc/gen_hangulkeyboards.py
@@ -8,7 +8,7 @@ table = {}
current_name = ''
current_table = []
-src = open('../hangul/hangulkeyboard.h', 'r')
+src = open(sys.argv[1], 'r')
for i in src.readlines():
pos = i.find('hangul_keyboard_table_')
if pos >= 0:
@@ -27,6 +27,7 @@ for i in src.readlines():
if len(current_name) > 0:
code = int(i.split()[0].replace(',', ''), 16)
current_table.append(code)
+src.close()
def jamo_to_compat_jamo(code):
table = [