Skip to content

Commit

Permalink
Autotools are impossible to love.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Celis committed Jul 3, 2013
1 parent 5cd4cda commit 4a52a01
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 13 deletions.
3 changes: 0 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ SUBDIRS = src test bin example

EXTRA_DIST = README.md support

dist-hook:
mv $(distdir)/README.md $(distdir)/README

sign-dist: dist
gpg -a --output $(distdir).tar.gz.sig --detach-sig $(distdir).tar.gz

Expand Down
2 changes: 1 addition & 1 deletion bin/runtests.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ if [ $# -eq 0 ]; then
fi

export ABS_TOP_SRCDIR="@abs_top_srcdir@";
DYLD_LIBRARY_PATH=@abs_top_builddir@/src @GUILE@ -L @abs_top_builddir@/src -L @abs_top_srcdir@/src -L @abs_top_srcdir@/support/scheme -l @abs_top_builddir@/src/line-pragma.scm "$@";
DYLD_LIBRARY_PATH=@abs_top_builddir@/src @GUILE@ -L @abs_top_builddir@/src -L @abs_top_srcdir@/src -L @abs_top_srcdir@/support/scheme -l @abs_top_srcdir@/src/line-pragma.scm "$@";
20 changes: 15 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([emacsy], [0.1], [[email protected]])
# We'll try to use semantic versioning. http://semver.org
AC_INIT([emacsy], [0.1.0], [[email protected]])
AC_CONFIG_AUX_DIR([support/build-aux])
# Lies.
#AM_INIT_GUILE_MODULE
Expand Down Expand Up @@ -94,14 +95,23 @@ AC_CONFIG_FILES([ Makefile
support/pkg-config/emacsy.pc
support/pkg-config/not-installed/emacsy.pc
example/Makefile
], [chmod +x bin/runtests])
], [chmod +x bin/runtests test/print-install.sh test/works-without-noweb.sh test/dummy.sh])
dnl We can point the example to the build directory.
dnl export EMACSY_CFLAGS="-I${ac_abs_top_builddir}/src/emacsy"
dnl export EMACSY_LIBS="-L${ac_abs_top_builddir}/src/emacsy/.libs"

dnl Autotools are impossible to love.
export EMACSY_CFLAGS="-I`pwd`/src/emacsy"
export EMACSY_LIBS="-L`pwd`/src/emacsy/.libs -lemacsy"
export EMACSY_MODULE="`pwd`/src"
if test -f configure; then
abs_top_srcdir="`pwd`";
abs_top_builddir="`pwd`";
elif test -f ../configure; then
abs_top_srcdir="`pwd`/..";
abs_top_builddir="`pwd`";
else
AC_MSG_ERROR([Can't detect src and build directories.])
fi
export EMACSY_CFLAGS="-I${abs_top_srcdir}/src/emacsy"
export EMACSY_LIBS="-L${abs_top_builddir}/src/emacsy/.libs -lemacsy"
export EMACSY_MODULE="${abs_top_srcdir}/src"
AC_CONFIG_SUBDIRS([example/hello-emacsy])
AC_OUTPUT
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ NOWEB_FILES = line-pragma.nw
NOWEB_PRODUCTS = line-pragma.scm
CLEANFILES =
BUILT_SOURCES =
EXTRA_DIST =
EXTRA_DIST = convenience-lambda.scm

include $(top_srcdir)/support/automake/noweb.am
4 changes: 2 additions & 2 deletions src/emacsy/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NOWEB_DOCS = emacsy.pdf
#
#NOWEB_DOCS = command-paper.pdf

EXTRA_DIST = $(NOWEB_DOCS)
EXTRA_DIST = $(NOWEB_DOCS) $(SCHEME_TESTS)

NOWEB_FILES = emacsy.nw emacsy-c-api.nw windows.nw event.nw util.nw \
keymap.nw command.nw buffer.nw block.nw klecl.nw \
Expand Down Expand Up @@ -78,6 +78,6 @@ preview-local: $(NOWEB_DOCS)
open -a Skim.app $^ || open -a Preview.app $^

dist-hook:
mv $(distdir)/*.pdf $(top_distdir)
cp $(distdir)/*.pdf $(top_distdir)


2 changes: 1 addition & 1 deletion test/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#TESTS_ENVIRONMENT = /bin/bash -x
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = /bin/bash -x

EXTRA_DIST = minibuffer-test-dir dummy.sh

TESTS=works-without-noweb.sh print-install.sh dummy.sh

Expand Down
Empty file modified test/dummy.sh
100644 → 100755
Empty file.

0 comments on commit 4a52a01

Please sign in to comment.