From 12b93bd0d5ab6b66ba002af8b282d32c713254dd Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 30 Aug 2014 09:11:14 -0400 Subject: 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. --- .gitignore | 10 ++++++++++ Makefile.am | 32 ++++++++++++++++++++++++++++++++ autogen.sh | 3 +++ configure.ac | 22 ++++++++++++++++++++++ env.in | 14 ++++++++++++++ guile.am | 19 +++++++++++++++++++ pre-inst-env | 6 ------ pre-inst-env.in | 30 ++++++++++++++++++++++++++++++ 8 files changed, 130 insertions(+), 6 deletions(-) create mode 100644 Makefile.am create mode 100755 autogen.sh create mode 100644 configure.ac create mode 100644 env.in create mode 100644 guile.am delete mode 100755 pre-inst-env create mode 100644 pre-inst-env.in diff --git a/.gitignore b/.gitignore index e796b66..9136c65 100644 --- a/.gitignore +++ b/.gitignore @@ -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 +# +# 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 +# . + +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 diff --git a/env.in b/env.in new file mode 100644 index 0000000..db507ca --- /dev/null +++ b/env.in @@ -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 +# +# 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 +# +# 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 +# . + +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 "$@" -- cgit v1.2.3