Convert to autotools

This commit is contained in:
Dane Johnson 2024-11-18 12:22:04 -06:00
parent 921d770986
commit eac30fae76
5 changed files with 31 additions and 29 deletions

7
.gitignore vendored
View File

@ -1,3 +1,8 @@
build/ build/
*.go build-aux/
autom4te.cache/
*.m4
Makefile Makefile
configure
configure~

12
Makefile.am Normal file
View File

@ -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 $@

View File

@ -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 $@

8
configure vendored
View File

@ -1,8 +0,0 @@
#!/usr/bin/bash
case $1 in
--prefix)
sed '1i\'INSTALL_PREFIX="$2" < Makefile.in > Makefile
shift 2
;;
esac

12
configure.ac Normal file
View File

@ -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