diff --git a/.gitignore b/.gitignore index d727743..e3d6042 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ build/ -*.go -Makefile \ No newline at end of file +build-aux/ +autom4te.cache/ +*.m4 + +Makefile +configure +configure~ diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..467350e --- /dev/null +++ b/Makefile.am @@ -0,0 +1,12 @@ +SOURCES = d-.scm +GOBJECTS = $(SOURCES:%.scm=%.go) +GUILD = @GUILD@ + +moddir=$(GUILE_SITE) +godir=$(GUILE_SITE_CCACHE) + +nobase_dist_mod_DATA = $(SOURCES) +nobase_go_DATA = $(GOBJECTS) + +%.go: %.scm + $(GUILD) compile $^ -o $@ diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 9508f23..0000000 --- a/Makefile.in +++ /dev/null @@ -1,19 +0,0 @@ -.PHONY: all clean test install dist distclean - -all: d-.go -clean: - rm -rf d-.go -test: - guile -L . test.scm -install: d-.scm d-.go - install -D -t "$(INSTALL_PREFIX)/share/guile/site/3.0/" d-.scm - install -D -t "$(INSTALL_PREFIX)/lib/guile/3.0/site-ccache/" d-.go -uninstall: - rm -f "$(INSTALL_PREFIX)/share/guile/site/3.0/d-.scm" - rm -f "$(INSTALL_PREFIX)/lib/guile/3.0/site-ccache/d-.go" -dist: - tar cvzf d-PRERELEASE.tar.gz configure Makefile.in test.scm d-.scm -distclean: clean - rm Makefile -%.go: %.scm - guild compile $^ -o $@ diff --git a/configure b/configure deleted file mode 100755 index 7f667aa..0000000 --- a/configure +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/bash - -case $1 in - --prefix) - sed '1i\'INSTALL_PREFIX="$2" < Makefile.in > Makefile - shift 2 - ;; -esac diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f6398ec --- /dev/null +++ b/configure.ac @@ -0,0 +1,12 @@ +AC_INIT([guile-d-], [0.1.0]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([foreign]) + +PKG_CHECK_MODULES([GUILE], [guile-3.0]) +GUILE_SITE_DIR +GUILE_PROGS + +AC_CONFIG_FILES([Makefile]) + +AC_OUTPUT