autom4te.cache
/snippet
+/exported.sh
/lib
missing
[submodule "gnulib"]
path = gnulib
url = git://git.savannah.gnu.org/gnulib.git
+[submodule "common"]
+ path = common
+ url = git://repo.or.cz/dxcommon.git
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I m4 -I common/m4
-EXTRA_DIST = m4/gnulib-cache.m4
-CLEANFILES =
+EXTRA_DIST = m4/gnulib-cache.m4
+CLEANFILES =
+MOSTLYCLEANFILES =
AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
-AM_LDFLAGS = -L$(top_builddir)/lib
-dist_man_MANS =
-dist_doc_DATA =
-noinst_HEADERS =
-lib_LTLIBRARIES =
-bin_PROGRAMS =
+dist_man_MANS =
+dist_doc_DATA =
+noinst_HEADERS =
+lib_LTLIBRARIES =
+noinst_LTLIBRARIES =
+bin_PROGRAMS =
include doc/Makefile.inc
include src/Makefile.inc
include src/gui/Makefile.inc
-
-SUBDIRS = lib .
+include lib/gnulib.mk
+++ /dev/null
-#!/bin/sh
-
-die()
-{
- echo $@ 1>&2
- exit 1
-}
-
-test -d m4 || mkdir m4
-test -d lib || mkdir lib
-
-git submodule update --init || echo "Failed to update Gnulib sources from git."
-if test -x gnulib/gnulib-tool; then
- gnulib/gnulib-tool --update || die "Failed to update gnulib."
-else
- die "Gnulib sources are not properly installed in gnulib/"
-fi
-
-aclocal -I m4 || die "Failed to run aclocal."
-autoheader || die "Failed to run autoheader."
-libtoolize --copy || die "Failed to run libtoolize."
-automake --add-missing || die "Failed to run automake."
-autoconf || die "Failed to run autoconf."
--- /dev/null
+#!/bin/sh
+#
+# Copyright © 2011-2012 Nick Bowler
+#
+# Simple script to get started from a fresh git checkout.
+#
+# License WTFPL2: Do What The Fuck You Want To Public License, version 2.
+# This is free software: you are free to do what the fuck you want to.
+# There is NO WARRANTY, to the extent permitted by law.
+
+scriptname=$0
+
+err() {
+ printf '%s: %s\n' "$scriptname" "$@" 1>&2
+}
+
+die() {
+ err "$@"
+ exit 1
+}
+
+: ${AUTORECONF=autoreconf}
+: ${GNULIB=gnulib}
+: ${GIT=git}
+: ${PERL=perl}
+
+$GIT submodule update --init || err "Failed to update submodules from git."
+
+if test -x $GNULIB/gnulib-tool; then
+ $GNULIB/gnulib-tool --update -S || die "Failed to update Gnulib."
+else
+ die "Gnulib sources are not properly installed in gnulib/."
+fi
+
+$PERL common/scripts/fix-gnulib.pl -o lib/gnulib.mk -i lib/gnulib.mk.in \
+ || die "Failed to fixup Gnulib makefile fragment."
+
+# Punt some automake-generated files so that Gentoo's wrapper script doesn't
+# try to detect the automake version in use.
+rm -f Makefile.in aclocal.m4
+$AUTORECONF -fis
--- /dev/null
+Subproject commit 3bc1572c6a889842c58ab9d1a7958708b2ba8a42
AC_HEADER_ASSERT
LT_INIT
gl_INIT
+
+m4_include([lib/gnulib.mk])
+
PKG_PROG_PKG_CONFIG
AC_ARG_ENABLE([lbximg],
AC_CONFIG_FILES([
Makefile
- lib/Makefile
])
AC_OUTPUT
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files fnmatch getopt-gnu
+# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk.in --conditional-dependencies --libtool --macro-prefix=gl --no-vc-files fnmatch getopt-gnu
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
gl_DOC_BASE([doc])
gl_TESTS_BASE([tests])
gl_LIB([libgnu])
-gl_MAKEFILE_NAME([])
+gl_MAKEFILE_NAME([gnulib.mk.in])
+gl_CONDITIONAL_DEPENDENCIES
gl_LIBTOOL
gl_MACRO_PREFIX([gl])
gl_PO_DOMAIN([])
bin_PROGRAMS += lbxtool
lbxtool_SOURCES = src/lbxtool.c
-lbxtool_LDADD = liblbx.la -lgnu
+lbxtool_LDADD = liblbx.la libgnu.la
+$(lbxtool_OBJECTS): $(gnulib_headers)
if BUILD_LBXIMG
bin_PROGRAMS += lbximg
lbximg_SOURCES = src/lbximg.c
-lbximg_LDADD = liblbx.la $(LIBPNG_LIBS) -lgnu
+lbximg_LDADD = liblbx.la libgnu.la $(LIBPNG_LIBS)
lbximg_CFLAGS = $(LIBPNG_CFLAGS)
+$(lbximg_OBJECTS): $(gnulib_headers)
endif