-
-
Notifications
You must be signed in to change notification settings - Fork 905
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build libgumbo via autotools and rebuild on source changes
- Implement a minimal autotools build for libgumbo. - Make `rake gumbo:test` use the same libgumbo.a used to build the nokogiri extension. - Make changes to `gumbo-parser/src` trigger a rebuild of libgumbo.
- Loading branch information
1 parent
f306126
commit 3c85081
Showing
12 changed files
with
116 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
build | ||
googletest | ||
src/*.o | ||
fuzzer/build | ||
src/libgumbo.a | ||
/build | ||
/googletest | ||
/src/*.o | ||
/fuzzer/build | ||
/src/libgumbo.a | ||
/aclocal.m4 | ||
/autom4te.cache/ | ||
/configure | ||
/configure.in | ||
Makefile.in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
if HAS_TESTS | ||
SUBDIRS = src test | ||
else | ||
SUBDIRS = src | ||
endif |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Ignore everything in this directory except for this file. | ||
# Credit: https://stackoverflow.com/a/932982 | ||
* | ||
!/.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
AC_INIT([Gumbo], [1.0]) | ||
AC_CONFIG_SRCDIR([src/nokogiri_gumbo.h]) | ||
AC_CONFIG_AUX_DIR([build-aux]) | ||
AM_INIT_AUTOMAKE([subdir-objects foreign serial-tests no-dist no-installinfo no-installman -Wall]) | ||
AC_PROG_RANLIB | ||
AC_PROG_CC | ||
AC_PROG_CXX | ||
AM_PROG_AR | ||
AM_CONDITIONAL([HAS_TESTS], [test -d "${srcdir}/test"]) | ||
AC_CONFIG_FILES([Makefile src/Makefile test/Makefile]) | ||
AC_OUTPUT |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
lib_LIBRARIES = libgumbo.a | ||
libgumbo_a_SOURCES = \ | ||
ascii.c \ | ||
attribute.c \ | ||
char_ref.c \ | ||
error.c \ | ||
foreign_attrs.c \ | ||
parser.c \ | ||
string_buffer.c \ | ||
string_piece.c \ | ||
svg_attrs.c \ | ||
svg_tags.c \ | ||
tag.c \ | ||
tag_lookup.c \ | ||
token_buffer.c \ | ||
tokenizer.c \ | ||
utf8.c \ | ||
util.c \ | ||
vector.c | ||
include_HEADERS = nokogiri_gumbo.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
check_LIBRARIES = libgtest_main.a | ||
libgtest_main_a_SOURCES = ../googletest/src/gtest-all.cc ../googletest/src/gtest_main.cc | ||
libgtest_main_a_CPPFLAGS = -I$(top_srcdir)/googletest/include -I$(top_srcdir)/googletest | ||
libgtest_main_a_CXXFLAGS = -pthread | ||
|
||
check_PROGRAMS = gumbotest | ||
gumbotest_SOURCES = attribute.cc \ | ||
parser.cc \ | ||
string_buffer.cc \ | ||
string_piece.cc \ | ||
test_utils.cc \ | ||
token_buffer.cc \ | ||
tokenizer.cc \ | ||
utf8.cc \ | ||
vector.cc | ||
|
||
gumbotest_LDADD = libgtest_main.a ../src/libgumbo.a | ||
gumbotest_LDFLAGS = -pthread | ||
gumbotest_CPPFLAGS = -I$(top_srcdir)/googletest/include -I$(top_srcdir)/src | ||
|
||
TESTS = gumbotest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters