diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-08-30 09:11:14 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-08-30 10:50:02 -0400 |
commit | 12b93bd0d5ab6b66ba002af8b282d32c713254dd (patch) | |
tree | e8af92e1903bbd9f940ade04cc3f7c5ee028626b | |
parent | bf483586a2304f8d60b077aee36370d2cb211da7 (diff) |
Add basic autotools files.
* Makefile.am: New file.
* autogen.sh: New file.
* configure.ac: New file.
* env.in: New file.
* guile.am: New file.
* pre-inst-env.in: New file.
* .gitignore: Ignore auto-generated files.
-rw-r--r-- | .gitignore | 10 | ||||
-rw-r--r-- | Makefile.am | 32 | ||||
-rwxr-xr-x | autogen.sh | 3 | ||||
-rw-r--r-- | configure.ac | 22 | ||||
-rw-r--r-- | env.in | 14 | ||||
-rw-r--r-- | guile.am | 19 | ||||
-rwxr-xr-x | pre-inst-env | 6 | ||||
-rw-r--r-- | pre-inst-env.in | 30 |
8 files changed, 130 insertions, 6 deletions
@@ -1 +1,11 @@ *.go +/Makefile +/Makefile.in +/aclocal.m4 +/autom4te.cache/ +/build-aux/ +/config.log +/config.status +/configure +/env +/pre-inst-env diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..fe3d545 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,32 @@ +# guix-web - Web interface for GNU Guix +# Copyright © 2014 David Thompson <davet@gnu.org> +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU Affero General Public License +# as published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/>. + +include guile.am + +moddir=$(prefix)/share/guile/site/2.0 +godir=$(libdir)/guile/2.0/ccache + +SOURCES = \ + guix-web/config.scm \ + guix-web/controller.scm \ + guix-web/package.scm \ + guix-web/render.scm \ + guix-web/server.scm \ + guix-web/util.scm \ + guix-web/view.scm + +EXTRA_DIST += env.in diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..e756b42 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,3 @@ +#! /bin/sh + +autoreconf -vif diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..bba1175 --- /dev/null +++ b/configure.ac @@ -0,0 +1,22 @@ +dnl -*- Autoconf -*- + +AC_INIT(guix-web, 0.1.0) +AC_CONFIG_SRCDIR(guix-web) +AC_CONFIG_AUX_DIR([build-aux]) +AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability foreign]) +AM_SILENT_RULES([yes]) + +GUILE_PROGS + +if $GUILE_TOOLS | grep -q compile; then + # everything cool + true +else + AC_MSG_ERROR([Guile 2.0 required.]) +fi + +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([env], [chmod +x env]) +AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env]) + +AC_OUTPUT @@ -0,0 +1,14 @@ +#!/bin/sh + +GUILE_LOAD_PATH=@abs_top_srcdir@:$GUILE_LOAD_PATH +if test "@abs_top_srcdir@" != "@abs_top_builddir@"; then + GUILE_LOAD_PATH=@abs_top_builddir@:$GUILE_LOAD_PATH +fi +GUILE_LOAD_COMPILED_PATH=@abs_top_builddir@:$GUILE_LOAD_PATH +PATH=@abs_top_builddir@/bin:$PATH + +export GUILE_LOAD_PATH +export GUILE_LOAD_COMPILED_PATH +export PATH + +exec "$@" diff --git a/guile.am b/guile.am new file mode 100644 index 0000000..dc1e63f --- /dev/null +++ b/guile.am @@ -0,0 +1,19 @@ +GOBJECTS = $(SOURCES:%.scm=%.go) + +nobase_mod_DATA = $(SOURCES) $(NOCOMP_SOURCES) +nobase_go_DATA = $(GOBJECTS) + +# Make sure source files are installed first, so that the mtime of +# installed compiled files is greater than that of installed source +# files. See +# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html> +# for details. +guile_install_go_files = install-nobase_goDATA +$(guile_install_go_files): install-nobase_modDATA + +CLEANFILES = $(GOBJECTS) +EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES) +GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat +SUFFIXES = .scm .go +.scm.go: + $(AM_V_GEN)$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<" diff --git a/pre-inst-env b/pre-inst-env deleted file mode 100755 index cd6ad23..0000000 --- a/pre-inst-env +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -export PATH="$PWD/scripts:$PATH" -export GUILE_LOAD_PATH="$PWD:$GUILE_LOAD_PATH" - -exec "$@" diff --git a/pre-inst-env.in b/pre-inst-env.in new file mode 100644 index 0000000..0c30967 --- /dev/null +++ b/pre-inst-env.in @@ -0,0 +1,30 @@ +#!/bin/sh + +# guix-web - Web interface for GNU Guix +# Copyright © 2014 David Thompson <davet@gnu.org> +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU Affero General Public License +# as published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/>. + +abs_top_srcdir="`cd "@abs_top_srcdir@" > /dev/null; pwd`" +abs_top_builddir="`cd "@abs_top_builddir@" > /dev/null; pwd`" + +GUILE_LOAD_COMPILED_PATH="$abs_top_builddir${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH" +GUILE_LOAD_PATH="$abs_top_builddir:$abs_top_srcdir${GUILE_LOAD_PATH:+:}:$GUILE_LOAD_PATH" +export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH + +PATH="$abs_top_builddir/scripts:$PATH" +export PATH + +exec "$@" |