diff options
-rw-r--r-- | Makefile.am | 84 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | sample/Makefile.am | 9 | ||||
-rw-r--r-- | src/Makefile.am | 40 | ||||
-rw-r--r-- | src/config.h.in | 2 | ||||
-rw-r--r-- | test/Makefile.am | 27 | ||||
-rw-r--r-- | test/testc.c (renamed from src/testc.c) | 0 | ||||
-rw-r--r-- | test/testu.c (renamed from src/testu.c) | 0 |
8 files changed, 77 insertions, 96 deletions
diff --git a/Makefile.am b/Makefile.am index c82933b..9e6bcab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,45 +1,14 @@ ## Makefile.am for Oniguruma -encdir = $(top_srcdir)/enc -sampledir = $(top_srcdir)/sample -libname = libonig.la ACLOCAL_AMFLAGS = -I m4 -#AM_CFLAGS = -DNOT_RUBY AM_CFLAGS = AM_CPPFLAGS = -I$(top_srcdir) -I$(includedir) -SUBDIRS = . sample - -include_HEADERS = oniguruma.h oniggnu.h onigposix.h -lib_LTLIBRARIES = $(libname) - -libonig_la_SOURCES = regint.h regparse.h regenc.h st.h \ - regerror.c regparse.c regext.c regcomp.c regexec.c reggnu.c \ - regenc.c regsyntax.c regtrav.c regversion.c st.c \ - regposix.c regposerr.c \ - $(encdir)/unicode.c $(encdir)/ascii.c $(encdir)/utf8.c \ - $(encdir)/utf16_be.c $(encdir)/utf16_le.c \ - $(encdir)/utf32_be.c $(encdir)/utf32_le.c \ - $(encdir)/euc_jp.c $(encdir)/sjis.c $(encdir)/iso8859_1.c \ - $(encdir)/iso8859_2.c $(encdir)/iso8859_3.c \ - $(encdir)/iso8859_4.c $(encdir)/iso8859_5.c \ - $(encdir)/iso8859_6.c $(encdir)/iso8859_7.c \ - $(encdir)/iso8859_8.c $(encdir)/iso8859_9.c \ - $(encdir)/iso8859_10.c $(encdir)/iso8859_11.c \ - $(encdir)/iso8859_13.c $(encdir)/iso8859_14.c \ - $(encdir)/iso8859_15.c $(encdir)/iso8859_16.c \ - $(encdir)/euc_tw.c $(encdir)/euc_kr.c $(encdir)/big5.c \ - $(encdir)/gb18030.c $(encdir)/koi8_r.c $(encdir)/cp1251.c - -libonig_la_LDFLAGS = -version-info $(LTVERSION) +SUBDIRS = src test sample EXTRA_DIST = oniguruma.pc.in HISTORY README.ja index.html index_ja.html \ doc/API doc/API.ja doc/RE doc/RE.ja doc/FAQ doc/FAQ.ja \ - win32/Makefile win32/config.h win32/testc.c \ - $(encdir)/koi8.c $(encdir)/mktable.c \ - $(sampledir)/encode.c $(sampledir)/listcap.c $(sampledir)/names.c \ - $(sampledir)/posix.c $(sampledir)/simple.c $(sampledir)/sql.c \ - $(sampledir)/syntax.c + win32/Makefile win32/config.h win32/testc.c bin_SCRIPTS = onig-config @@ -59,52 +28,3 @@ oniguruma.pc: $(srcdir)/oniguruma.pc.in Makefile pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = oniguruma.pc - -dll: - $(CXX) -shared -Wl,--output-def,libonig.def -o libonig.dll *.o \ - $(LIBS) - strip libonig.dll - -# Ruby TEST -rtest: - $(RUBYDIR)/ruby -w -Ke $(srcdir)/test.rb - -# character-types-table source generator -mktable: $(encdir)/mktable.c $(srcdir)/regenc.h - $(CC) -I$(top_srcdir) -o mktable $(encdir)/mktable.c - - -# TEST -TESTS = testc testp testcu - -check_PROGRAMS = testc testp testcu - -atest: testc testp testcu - @echo "[Oniguruma API, ASCII/EUC-JP check]" - @$(top_builddir)/testc | grep RESULT - @echo "[POSIX API, ASCII/EUC-JP check]" - @$(top_builddir)/testp | grep RESULT - @echo "[Oniguruma API, UTF-16 check]" - @$(top_builddir)/testcu | grep RESULT - -testc_SOURCES = testc.c -testc_LDADD = libonig.la - -testp_SOURCES = testc.c -testp_LDADD = libonig.la -testp_CFLAGS = -DPOSIX_TEST - -testcu_SOURCES = testu.c -testcu_LDADD = libonig.la - - -#testc.c: $(srcdir)/test.rb $(srcdir)/testconv.rb -# ruby -Ke $(srcdir)/testconv.rb < $(srcdir)/test.rb > $@ - -#testu.c: $(srcdir)/test.rb $(srcdir)/testconvu.rb -# ruby -Ke $(srcdir)/testconvu.rb $(srcdir)/test.rb > $@ - -#win32/testc.c: $(srcdir)/test.rb $(srcdir)/testconv.rb -# ruby -Ke $(srcdir)/testconv.rb -win < $(srcdir)/test.rb | nkf -cs > $@ - -## END OF FILE diff --git a/configure.ac b/configure.ac index 2f4ba7c..f01ae71 100644 --- a/configure.ac +++ b/configure.ac @@ -4,16 +4,9 @@ AC_INIT(onig, 5.9.6) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([-Wno-portability 1.14]) -AC_CONFIG_HEADER(config.h) +AC_CONFIG_HEADER(src/config.h) -dnl default value for RUBYDIR -RUBYDIR=".." -AC_ARG_WITH(rubydir, - [ --with-rubydir=RUBYDIR specify value for RUBYDIR (default ..)], - [ RUBYDIR=$withval ]) -AC_SUBST(RUBYDIR) - dnl default value for STATISTICS STATISTICS="" AC_ARG_WITH(statistics, @@ -91,4 +84,4 @@ if test "$_cv_stdarg" = yes; then fi -AC_OUTPUT([Makefile onig-config sample/Makefile], [chmod +x onig-config]) +AC_OUTPUT([Makefile src/Makefile test/Makefile sample/Makefile onig-config], [chmod +x onig-config]) diff --git a/sample/Makefile.am b/sample/Makefile.am index 2d0f4ec..04386e1 100644 --- a/sample/Makefile.am +++ b/sample/Makefile.am @@ -1,8 +1,9 @@ noinst_PROGRAMS = encode listcap names posix simple sql syntax crnl -libname = $(top_builddir)/libonig.la -LDADD = $(libname) -AM_CPPFLAGS = -I$(top_srcdir) -I$(includedir) +lib_onig = ../src/libonig.la +LDADD = $(lib_onig) + +AM_CPPFLAGS = -I$../src -I$(includedir) encode_SOURCES = encode.c listcap_SOURCES = listcap.c @@ -13,7 +14,7 @@ sql_SOURCES = sql.c syntax_SOURCES = syntax.c -sampledir = $(top_builddir)/sample +sampledir = . test: encode listcap names posix simple sql syntax @$(sampledir)/encode diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..6b67c8c --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,40 @@ +## Makefile.am for Oniguruma +libname = libonig.la + +AM_CFLAGS = +AM_CPPFLAGS = -I$(top_srcdir) -I$(includedir) + +include_HEADERS = oniguruma.h oniggnu.h onigposix.h +lib_LTLIBRARIES = $(libname) + +libonig_la_SOURCES = regint.h regparse.h regenc.h st.h \ + regerror.c regparse.c regext.c regcomp.c regexec.c reggnu.c \ + regenc.c regsyntax.c regtrav.c regversion.c st.c \ + regposix.c regposerr.c \ + unicode.c ascii.c utf8.c \ + utf16_be.c utf16_le.c \ + utf32_be.c utf32_le.c \ + euc_jp.c sjis.c iso8859_1.c \ + iso8859_2.c iso8859_3.c \ + iso8859_4.c iso8859_5.c \ + iso8859_6.c iso8859_7.c \ + iso8859_8.c iso8859_9.c \ + iso8859_10.c iso8859_11.c \ + iso8859_13.c iso8859_14.c \ + iso8859_15.c iso8859_16.c \ + euc_tw.c euc_kr.c big5.c \ + gb18030.c koi8_r.c cp1251.c + +libonig_la_LDFLAGS = -version-info $(LTVERSION) + +EXTRA_DIST = koi8.c mktable.c + +dll: + $(CXX) -shared -Wl,--output-def,libonig.def -o libonig.dll *.o \ + $(LIBS) + strip libonig.dll + + +# character-types-table source generator +mktable: mktable.c regenc.h + $(CC) -I$(top_srcdir) -o mktable mktable.c diff --git a/src/config.h.in b/src/config.h.in index 9fa4c14..130ba01 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -1,4 +1,4 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ +/* src/config.h.in. Generated from configure.ac by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 0000000..699f5ea --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,27 @@ +## Makefile.am for Oniguruma +lib_onig = ../src/libonig.la + +AM_CFLAGS = +AM_CPPFLAGS = -I../src -I$(includedir) + +TESTS = testc testp testcu + +check_PROGRAMS = testc testp testcu + +all_test: testc testp testcu + @echo "[Oniguruma API, ASCII/EUC-JP check]" + @./testc | grep RESULT + @echo "[POSIX API, ASCII/EUC-JP check]" + @./testp | grep RESULT + @echo "[Oniguruma API, UTF-16 check]" + @./testcu | grep RESULT + +testc_SOURCES = testc.c +testc_LDADD = $(lib_onig) + +testp_SOURCES = testc.c +testp_LDADD = $(lib_onig) +testp_CFLAGS = -DPOSIX_TEST + +testcu_SOURCES = testu.c +testcu_LDADD = $(lib_onig) diff --git a/src/testc.c b/test/testc.c index 6a8c778..6a8c778 100644 --- a/src/testc.c +++ b/test/testc.c diff --git a/src/testu.c b/test/testu.c index 5652988..5652988 100644 --- a/src/testu.c +++ b/test/testu.c |