Commit 52180eff authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Fix installation + README.

parent 9843707c
.PHONY: all install
CFLAGS=-Wall $(shell pkg-config --cflags gumbo) $(shell guile-config compile)
LDLIBS=$(shell pkg-config --libs gumbo) $(shell guile-config link)
GUILE_SITE_DIR=$(shell guile -c "(display (%site-dir))")
GUILE_CCACHE_DIR=$(shell guile -c "(display (%site-ccache-dir))")
all: ${TARGET}
all: ${TARGET} gumbo.go
guile-gumbo.o: guile-gumbo.x
%.o: %.c
$(CC) -c $(CFLAGS) -o $@ -fPIC $<
$(CC) -O2 -c $(CFLAGS) -o $@ -fPIC $<
%.x: %.c
guile-snarf -o $@ $(CFLAGS) $<
%.go: %.scm
guild compile -o $@ $<
${TARGET}: guile-gumbo.o
$(CC) -shared -o $@ -fPIC $^ $(LDLIBS)
install: all
install -m 644 -Dt ${DESTDIR}${GUILE_CCACHE_DIR}/sxml/ gumbo.go
install -m 644 -Dt ${DESTDIR}${GUILE_SITE_DIR}/sxml/ gumbo.scm
install -Dt ${DESTDIR}/usr/lib/
-rm *.o
-rm *.so
-rm *.x
-rm *.go
Guile Bindings for Gumbo
Guile bindings for the
[Gumbo HTML5 parser](
Contains the Guile module `(sxml gumbo)`, which exports the single method
(html->sxml "Hello")
⇒ (*TOP* (html (head) (body "Hello")))
(html->sxml "<!doctype html><title>Minimum valid document</title>")
⇒ (*TOP* (*PI* "html") (html (head (title "Minimum valid document")) (body)))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment