help support tarball/zip distributions with binaries
authorHans Ulrich Niedermann <hun@n-dimensional.de>
Mon, 26 Dec 2005 00:39:51 +0000 (01:39 +0100)
committerHans Ulrich Niedermann <hun@n-dimensional.de>
Mon, 26 Dec 2005 00:39:51 +0000 (01:39 +0100)
Makefile.am
binary/Makefile.am [new file with mode: 0644]
configure.ac

index 56da179..e308764 100644 (file)
@@ -1,6 +1,10 @@
-SUBDIRS = m4m po libexif test doc
+SUBDIRS = m4m po libexif test doc binary
 
-EXTRA_DIST = @PACKAGE_TARNAME@.spec autogen.sh
+if SHIP_BINARIES
+README_W32_XDIST = README-Win32.txt
+endif
+
+EXTRA_DIST = @PACKAGE_TARNAME@.spec autogen.sh $(README_W32_XDIST)
 
 ACLOCAL_AMFLAGS = -I m4m
 
@@ -30,7 +34,7 @@ $(srcdir)/ChangeLog.cvs:
                usermap=""; \
        fi; \
        (cd "$(srcdir)" && cvs2cl $${usermap} -f "ChangeLog.cvs")
-       
+
 .PHONY: cvs-tag-release
 cvs-tag-release:
        @tag="$$(echo "$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-release" | sed 's|\.|_|g')"; \
diff --git a/binary/Makefile.am b/binary/Makefile.am
new file mode 100644 (file)
index 0000000..067716b
--- /dev/null
@@ -0,0 +1,13 @@
+if SHIP_BINARIES
+
+EXTRA_DIST = include bin
+
+SH_DIST_HOOK = dist-ship-binary-hook
+dist-ship-binary-hook include bin:
+       cd "$(top_builddir)" && $(MAKE) includedir="$(PWD)/include" DESTDIR="" prefix="$(PWD)/tmp" install
+       mkdir -p "$(PWD)/bin"
+       cp "$(PWD)/tmp/bin/"*.dll "bin/"
+
+endif
+
+dist-hook: $(SH_DIST_HOOK)
index 740ca34..cb9f9af 100644 (file)
@@ -2,7 +2,7 @@ AC_PREREQ(2.59)
 AC_INIT([EXIF library],[0.6.13],[libexif-devel@lists.sourceforge.net],[libexif])
 AC_CONFIG_SRCDIR([libexif/exif-data.h])
 AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([gnu 1.8 dist-bzip2])
+AM_INIT_AUTOMAKE([gnu 1.8 dist-bzip2 dist-zip])
 
 if test ! -d "$srcdir/m4m"; then
 AC_MSG_ERROR([
@@ -59,6 +59,22 @@ dnl that will always be available
 AX_NEED_STDINT_H([libexif/_stdint.h])
 
 
+dnl ------------------------------------------------------------------------
+dnl Whether we're supposed to ship binaries in the tarball
+dnl ------------------------------------------------------------------------
+
+ship_binaries=false
+AC_ARG_ENABLE([ship-binaries],
+[AS_HELP_STRING([--enable-ship-binaries],
+[Whether to ship binaries in the tarball [default=no]])],[
+       if test x$enableval = xyes; then
+               ship_binaries=true
+       fi
+])
+AM_CONDITIONAL([SHIP_BINARIES],[$ship_binaries])
+GP_CONFIG_MSG([Ship binaries in tarball],[$ship_binaries])
+
+
 dnl ---------------------------------------------------------------------------
 dnl Whether -lm is required for our math functions
 dnl ---------------------------------------------------------------------------
@@ -148,6 +164,7 @@ AC_CONFIG_FILES([
   doc/Doxyfile
   doc/Doxyfile-internals
   libexif/libexif.pc
+  binary/Makefile
 ])
 AC_OUTPUT