]> git.draconx.ca Git - liblbx.git/commitdiff
build: Integrate Gnulib non-recursively using fix-gnulib.
authorNick Bowler <nbowler@draconx.ca>
Thu, 14 Mar 2013 00:10:47 +0000 (20:10 -0400)
committerNick Bowler <nbowler@draconx.ca>
Thu, 14 Mar 2013 00:55:12 +0000 (20:55 -0400)
.gitignore
.gitmodules
Makefile.am
autogen.sh [deleted file]
bootstrap [new file with mode: 0755]
common [new submodule]
configure.ac
m4/gnulib-cache.m4
src/Makefile.inc

index c7c56624c340f72008426b09287b5dabe8348d85..d86e878c416c22661ad683fe45bb599c43610426 100644 (file)
@@ -28,6 +28,7 @@ aclocal.m4
 autom4te.cache
 
 /snippet
+/exported.sh
 /lib
 
 missing
index 009ae439e17f5a7d068ab9c2eeb06851c175f255..9d11b2e3b191ca1cc61ede1786b0999c36aa9c82 100644 (file)
@@ -1,3 +1,6 @@
 [submodule "gnulib"]
        path = gnulib
        url = git://git.savannah.gnu.org/gnulib.git
+[submodule "common"]
+       path = common
+       url = git://repo.or.cz/dxcommon.git
index b5f27b17dc8370047f8f4122129b6d004a484c49..7be6e9c6f72c7fe08659ed59cf6bb95c36863db1 100644 (file)
@@ -4,22 +4,22 @@
 # 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
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755 (executable)
index 66a90e8..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/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."
diff --git a/bootstrap b/bootstrap
new file mode 100755 (executable)
index 0000000..460094f
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,41 @@
+#!/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
diff --git a/common b/common
new file mode 160000 (submodule)
index 0000000..3bc1572
--- /dev/null
+++ b/common
@@ -0,0 +1 @@
+Subproject commit 3bc1572c6a889842c58ab9d1a7958708b2ba8a42
index 0403ca170e78789a944461efd9aec7574865f0ec..2a3ddca5c01dd372a774a1f9fe68f5df9ff8f0f9 100644 (file)
@@ -20,6 +20,9 @@ gl_EARLY
 AC_HEADER_ASSERT
 LT_INIT
 gl_INIT
+
+m4_include([lib/gnulib.mk])
+
 PKG_PROG_PKG_CONFIG
 
 AC_ARG_ENABLE([lbximg],
@@ -54,7 +57,6 @@ AM_CONDITIONAL([BUILD_LBXGUI], [test x"$have_gtk" = x"yes"])
 
 AC_CONFIG_FILES([
        Makefile
-       lib/Makefile
 ])
 
 AC_OUTPUT
index 43eb7f3a8cecb2b55ffa009b0d2cc3b79dbc3681..1f1f05f010c1e81731c5b3071832468f1e327286 100644 (file)
@@ -27,7 +27,7 @@
 
 
 # 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([])
@@ -42,7 +42,8 @@ gl_PO_BASE([])
 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([])
index 1bd16f3c8ba9b06f0a04b3943528f484d63cac79..02008660fca58fdf64869d1e028665fffdffe4a2 100644 (file)
@@ -15,11 +15,13 @@ liblbx_la_LDFLAGS = -export-symbols-regex '^lbx_'
 
 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