From: <hu...@us...> - 2006-09-29 15:15:42
|
Revision: 9231 http://svn.sourceforge.net/gphoto/?rev=9231&view=rev Author: hun Date: 2006-09-29 08:15:04 -0700 (Fri, 29 Sep 2006) Log Message: ----------- configure/make cleanup removing about 60 lines of make/check/config code * generate check- scripts from config.status * use libexecdir for print-* utilities * let utilsdir be defined from configure * require libexif >= 0.6.13; automatically update libgphoto2.pc with that. * get rid of "make check" local installation * moved some tests from "make check" to "make installcheck" * use one common rule file for "make installcheck" Modified Paths: -------------- trunk/libgphoto2/Makefile.am trunk/libgphoto2/bindings/csharp/Makefile.am trunk/libgphoto2/configure.in trunk/libgphoto2/libgphoto2/libgphoto2.pc.in trunk/libgphoto2/packaging/generic/Makefile.am trunk/libgphoto2/packaging/linux-hotplug/Makefile.am trunk/libgphoto2/tests/Makefile.am trunk/libgphoto2/tests/ddb/Makefile.am Added Paths: ----------- trunk/libgphoto2/bindings/csharp/check-camera-list.sh.in trunk/libgphoto2/bindings/csharp/check-sizes.sh.in trunk/libgphoto2/installcheck.mk trunk/libgphoto2/tests/check-camera-list.sh.in trunk/libgphoto2/tests/ddb/check-ddb.sh.in Removed Paths: ------------- trunk/libgphoto2/bindings/csharp/check-camera-list.in trunk/libgphoto2/bindings/csharp/check-sizes.in trunk/libgphoto2/tests/check-camera-list.in trunk/libgphoto2/tests/ddb/check-ddb.in Modified: trunk/libgphoto2/Makefile.am =================================================================== --- trunk/libgphoto2/Makefile.am 2006-09-29 12:05:39 UTC (rev 9230) +++ trunk/libgphoto2/Makefile.am 2006-09-29 15:15:04 UTC (rev 9231) @@ -5,7 +5,7 @@ bin_SCRIPTS = gphoto2-config -EXTRA_DIST = HACKING MAINTAINERS makefile.os2 os2mak.inc TESTERS CHANGES +EXTRA_DIST = HACKING MAINTAINERS makefile.os2 os2mak.inc TESTERS CHANGES installcheck.mk # Note: @subdirs@ lists all the directories from AC_CONFIG_SUBDIRS() SUBDIRS = . @subdirs@ libgphoto2 camlibs tests po bindings packaging doc Modified: trunk/libgphoto2/bindings/csharp/Makefile.am =================================================================== --- trunk/libgphoto2/bindings/csharp/Makefile.am 2006-09-29 12:05:39 UTC (rev 9230) +++ trunk/libgphoto2/bindings/csharp/Makefile.am 2006-09-29 15:15:04 UTC (rev 9231) @@ -58,7 +58,8 @@ BUILT_SOURCES = testsizes.c TestSizes.cs testsizes_SOURCES = testsizes.c -TESTS = $(check_SCRIPTS) +TESTS = check-sizes.sh +INSTALL_TESTS = check-camera-list.sh CLEANFILES = \ TestGphoto2Sharp.exe \ @@ -72,7 +73,6 @@ endif - EXTRA_DIST = \ libgphoto2-sharp.dll.config \ libgphoto2-sharp.pc.in \ @@ -81,28 +81,13 @@ TestGphoto2Sharp.cs \ testsizes-typelist.txt \ testsizes-createsource.sh \ - check-sizes.in \ - check-camera-list.in + check-sizes.sh.in \ + check-camera-list.sh.in -clean-local: - rm -rf _inst - rm -f _camlibs - testsizes.c: testsizes-typelist.txt $(srcdir)/testsizes-createsource.sh sh $(srcdir)/testsizes-createsource.sh c < $< > $@ TestSizes.cs: testsizes-typelist.txt $(srcdir)/testsizes-createsource.sh sh $(srcdir)/testsizes-createsource.sh csharp < $< > $@ -.in.sh: - @echo "Creating $@" - @sed \ - -e 's|@top_builddir\@|$(top_builddir)|g' \ - -e 's|@camlibdir\@|$(camlibdir)|g' \ - -e 's|@libdir\@|$(libdir)|g' \ - -e 's|@DESTDIR\@|$(DESTDIR)|g' \ - -e 's|@MAKE\@|$(MAKE)|g' \ - -e 's|@MONO\@|$(MONO)|g' \ - < "$<" > "$@" - @chmod +x $@ - +include $(top_srcdir)/installcheck.mk Deleted: trunk/libgphoto2/bindings/csharp/check-camera-list.in =================================================================== --- trunk/libgphoto2/bindings/csharp/check-camera-list.in 2006-09-29 12:05:39 UTC (rev 9230) +++ trunk/libgphoto2/bindings/csharp/check-camera-list.in 2006-09-29 15:15:04 UTC (rev 9231) @@ -1,59 +0,0 @@ -#!/bin/sh - -top_builddir="@top_builddir@" -camlibdir="@camlibdir@" -libdir="@libdir@" -DESTDIR="@DESTDIR@" -MAKE="@MAKE@" - -echo "---------------------" -pwd -echo "camlibdir=$camlibdir" -echo "libdir=$libdir" -echo "DESTDIR=$DESTDIR" -echo "top_builddir=$top_builddir" - -CAMLIBS="${DESTDIR}${camlibdir}" - -pwd="$(pwd)" -if test -d "${CAMLIBS}"; then - echo "Found camlibs in default install dir." - : -else - echo "Going to use our own camlib installation" - DESTDIR="${pwd}/_inst" - CAMLIBS="${DESTDIR}${camlibdir}" - for reldir in \ - libgphoto2_port/libgphoto2_port \ - libgphoto2 \ - camlibs - do - (cd "${top_builddir}/${reldir}" && ${MAKE} DESTDIR="$DESTDIR" install) - done - ln -s "${CAMLIBS}" "_camlibs" - CAMLIBS="${pwd}/_camlibs" - if test -d "${CAMLIBS}"; then - echo "Test installation successful" - else - echo "Test installation failed" - exit 1 - fi -fi - -#LD_LIBRARY_PATH="$DESTDIR$libdir:$LD_LIBRARY_PATH" -#export LD_LIBRARY_PATH -export LD_LIBRARY_PATH="$top_builddir/libgphoto2/.libs${LD_LIBRARY_PATH+=:}${LD_LIBRARY_PATH}" -echo "Using camlib dir: $CAMLIBS" -export CAMLIBS - -echo "=====================" -pwd -echo "camlibdir=$camlibdir" -echo "libdir=$libdir" -echo "DESTDIR=$DESTDIR" -echo "top_builddir=$top_builddir" -echo "CAMLIBS=$CAMLIBS" -echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -echo "#####################" - -@MONO@ $(dirname "$0")/TestGphoto2Sharp.exe Copied: trunk/libgphoto2/bindings/csharp/check-camera-list.sh.in (from rev 9222, trunk/libgphoto2/bindings/csharp/check-camera-list.in) =================================================================== --- trunk/libgphoto2/bindings/csharp/check-camera-list.sh.in (rev 0) +++ trunk/libgphoto2/bindings/csharp/check-camera-list.sh.in 2006-09-29 15:15:04 UTC (rev 9231) @@ -0,0 +1,37 @@ +#!/bin/sh +# "make installcheck" testcase: +# Lists all cameras found by the libgphoto2 C# bindings. +# Fails if no cameras are found. + +set -e + +debug=: +#debug=false + +prefix="${prefix-"@prefix@"}" +exec_prefix="${exec_prefix-"@exec_prefix@"}" +libdir="${libdir-"@libdir@"}" +libexecdir="${libexecdir-"@libexecdir@"}" +camlibdir="${camlibdir-"@camlibdir@"}" +CAMLIBS="${DESTDIR}${camlibdir}" +export CAMLIBS +LD_LIBRARY_PATH="${DESTDIR}/${libdir}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" +export LD_LIBRARY_PATH + +if test -d "${CAMLIBS}"; then :; else + echo "camlibs directory '${CAMLIBS}' does not exist" + exit 13 +fi + +if "$debug"; then + echo "=====================" + pwd + echo "camlibdir=$camlibdir" + echo "libdir=$libdir" + echo "DESTDIR=$DESTDIR" + echo "CAMLIBS=$CAMLIBS" + echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" + echo "#####################" +fi + +@MONO@ $(dirname "$0")/TestGphoto2Sharp.exe Deleted: trunk/libgphoto2/bindings/csharp/check-sizes.in =================================================================== --- trunk/libgphoto2/bindings/csharp/check-sizes.in 2006-09-29 12:05:39 UTC (rev 9230) +++ trunk/libgphoto2/bindings/csharp/check-sizes.in 2006-09-29 15:15:04 UTC (rev 9231) @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -trap "rm sizes-csharp.tmp sizes-c.tmp" EXIT - -$(dirname "$0")/testsizes > sizes-c.tmp -@MONO@ $(dirname "$0")/TestSizes.exe > sizes-csharp.tmp - -diff -u sizes-c.tmp sizes-csharp.tmp Copied: trunk/libgphoto2/bindings/csharp/check-sizes.sh.in (from rev 9222, trunk/libgphoto2/bindings/csharp/check-sizes.in) =================================================================== --- trunk/libgphoto2/bindings/csharp/check-sizes.sh.in (rev 0) +++ trunk/libgphoto2/bindings/csharp/check-sizes.sh.in 2006-09-29 15:15:04 UTC (rev 9231) @@ -0,0 +1,14 @@ +#!/bin/sh +# "make check" testcase: +# Compare byte sizes of structures defined in the C and C# versions of +# libgphoto2. +# Fails if any size does not match. + +set -e + +trap "rm sizes-csharp.tmp sizes-c.tmp" EXIT + +$(dirname "$0")/testsizes > sizes-c.tmp +@MONO@ $(dirname "$0")/TestSizes.exe > sizes-csharp.tmp + +diff -u sizes-c.tmp sizes-csharp.tmp Modified: trunk/libgphoto2/configure.in =================================================================== --- trunk/libgphoto2/configure.in 2006-09-29 12:05:39 UTC (rev 9230) +++ trunk/libgphoto2/configure.in 2006-09-29 15:15:04 UTC (rev 9231) @@ -350,6 +350,17 @@ dnl --------------------------------------------------------------------------- +dnl utility installation directory +dnl +dnl FIXME: Proper definition of libexecdir. +dnl --------------------------------------------------------------------------- + +utilsdir="\${libexecdir}/${PACKAGE_TARNAME}" +AC_ARG_VAR([utilsdir],[Directory where utilities like print-camera-list will be installed]) +AC_SUBST([utilsdir]) + + +dnl --------------------------------------------------------------------------- dnl camlib installation directory dnl --------------------------------------------------------------------------- AC_MSG_CHECKING([where to install camlibs]) @@ -359,7 +370,7 @@ ],[ camlibdir="$withval" ],[ - camlibdir='$(libdir)/$(PACKAGE_TARNAME)/$(PACKAGE_VERSION)' + camlibdir="\${libdir}/${PACKAGE_TARNAME}/${PACKAGE_VERSION}" ]) AC_MSG_RESULT([${camlibdir}]) AC_SUBST([camlibdir]) @@ -456,7 +467,7 @@ dnl libexif is available from dnl http://www.sourceforge.net/projects/libexif dnl --------------------------------------------------------------------------- -GP_CHECK_LIBRARY([LIBEXIF],[libexif],[], +GP_CHECK_LIBRARY([LIBEXIF],[libexif],[>= 0.6.13], [libexif/exif-data.h],[exif_data_new],[ # Check for libexif version dnl FIXME: Use AC_CHECK_MEMBER? @@ -531,9 +542,9 @@ # Create output files # --------------------------------------------------------------------------- AC_CONFIG_FILES([ -po/Makefile.in README Makefile +gphoto2-config camlibs/Makefile camlibs/adc65/Makefile camlibs/agfa-cl20/Makefile @@ -593,16 +604,18 @@ camlibs/toshiba/Makefile camlibs/toshiba/pdrm11/Makefile camlibs/enigma13/Makefile +libgphoto2/Makefile +libgphoto2/libgphoto2.pc tests/Makefile +tests/check-camera-list.sh tests/ddb/Makefile -libgphoto2/Makefile -libgphoto2/libgphoto2.pc -gphoto2-config +tests/ddb/check-ddb.sh packaging/Makefile packaging/linux-hotplug/Makefile packaging/generic/Makefile packaging/rpm/Makefile packaging/rpm/package.spec +po/Makefile.in doc/Makefile doc/Doxyfile doc/api/Makefile @@ -610,8 +623,17 @@ bindings/csharp/Makefile bindings/csharp/AssemblyInfo.cs bindings/csharp/libgphoto2-sharp.pc +bindings/csharp/check-camera-list.sh +bindings/csharp/check-sizes.sh +],[ +dnl This relies on this code being called for each of the above files +dnl with ac_file set to the filename. + if echo "$ac_file" | grep '.sh$' > /dev/null; then + if test -f "$ac_file"; then + chmod +x "$ac_file" + fi + fi ]) -#bindings/java/Makefile AC_OUTPUT GP_CAMLIBS_CHECK_SUBDIRS Added: trunk/libgphoto2/installcheck.mk =================================================================== --- trunk/libgphoto2/installcheck.mk (rev 0) +++ trunk/libgphoto2/installcheck.mk 2006-09-29 15:15:04 UTC (rev 9231) @@ -0,0 +1,27 @@ +# FIXME: Only run this if not cross-compiling +installcheck-local: $(INSTALL_TESTS) + @total=0; failed=0; success=0; ignored=0; \ + echo "Running \"installcheck\" test cases..."; \ + for script in $(INSTALL_TESTS); do \ + echo "Test case: $$script"; \ + total="$$(expr $$total + 1)"; \ + if "./$$script"; then \ + echo "SUCCEEDED: $$script"; \ + success="$$(expr $$success + 1)"; \ + else \ + s="$$?"; \ + if test "$$s" = "77"; then \ + echo "FAILURE IGNORED (return code $$s): $$script"; \ + ignored="$$(expr $$ignored + 1)"; \ + else \ + echo "FAILED (return code $$s): $$script"; \ + failed="$$(expr $$failed + 1)"; \ + fi; \ + fi; \ + done; \ + echo "Test summary: $$success succeeded, $$failed failed, $$ignored failures ignored, $$total tests in total."; \ + if test "$$failed" -gt 0; then \ + echo "Error: One or more \"installcheck\" testcases have failed."; \ + exit 1; \ + fi + Property changes on: trunk/libgphoto2/installcheck.mk ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/libgphoto2/libgphoto2/libgphoto2.pc.in =================================================================== --- trunk/libgphoto2/libgphoto2/libgphoto2.pc.in 2006-09-29 12:05:39 UTC (rev 9230) +++ trunk/libgphoto2/libgphoto2/libgphoto2.pc.in 2006-09-29 15:15:04 UTC (rev 9231) @@ -9,6 +9,6 @@ Description: Library for easy access to digital cameras URL: http://gphoto.org/proj/libgphoto2/ Version: @VERSION@ -Requires: libgphoto2_port >= 0.6.2, libexif >= 0.6.13 +Requires: libgphoto2_port >= 0.6.2, @REQUIREMENTS_FOR_LIBEXIF@ Libs: -L${libdir} -lgphoto2 -lm Cflags: -I${includedir}/gphoto2 Modified: trunk/libgphoto2/packaging/generic/Makefile.am =================================================================== --- trunk/libgphoto2/packaging/generic/Makefile.am 2006-09-29 12:05:39 UTC (rev 9230) +++ trunk/libgphoto2/packaging/generic/Makefile.am 2006-09-29 15:15:04 UTC (rev 9231) @@ -1,6 +1,3 @@ -# FIXME: utilsdir be modifiable by a ./configure option to adapt to local -# policies -utilsdir = $(libdir)/$(PACKAGE) utils_PROGRAMS = print-camera-list # print_camera_list_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) Modified: trunk/libgphoto2/packaging/linux-hotplug/Makefile.am =================================================================== --- trunk/libgphoto2/packaging/linux-hotplug/Makefile.am 2006-09-29 12:05:39 UTC (rev 9230) +++ trunk/libgphoto2/packaging/linux-hotplug/Makefile.am 2006-09-29 15:15:04 UTC (rev 9231) @@ -8,9 +8,6 @@ hotplugdoc_DATA = usbcam.console usbcam.group usbcam.user usbcam.x11-app -# FIXME: utilsdir be modifiable by a ./configure option to adapt to local -# policies -utilsdir = $(libdir)/$(PACKAGE) utils_PROGRAMS = print-usb-usermap print_usb_usermap_SOURCE = print-usb-usermap.c Modified: trunk/libgphoto2/tests/Makefile.am =================================================================== --- trunk/libgphoto2/tests/Makefile.am 2006-09-29 12:05:39 UTC (rev 9230) +++ trunk/libgphoto2/tests/Makefile.am 2006-09-29 15:15:04 UTC (rev 9231) @@ -6,32 +6,11 @@ check-camera-list.sh EXTRA_DIST = \ - check-camera-list.in + check-camera-list.sh.in # TESTS = $(check_SCRIPTS) -# FIXME: Only run this if not cross-compiling -installcheck-local: test-camera-list - @export CAMLIBS="$(DESTDIR)$(camlibdir)"; \ - total=0; failed=0; success=0; \ - echo "Running \"installcheck\" test cases..."; \ - for script in test-camera-list; do \ - echo "Test case: $$script"; \ - total="$$(expr $$total + 1)"; \ - if "./$$script"; then \ - echo "SUCCEEDED: $$script"; \ - success="$$(expr $$success + 1)"; \ - else \ - s="$$?"; \ - echo "FAILED (return code $$s): $$script"; \ - failed="$$(expr $$failed + 1)"; \ - fi; \ - done; \ - echo "Test summary: $$success succeeded, $$failed failed, $$total in total."; \ - if test "$$failed" -gt 0; then \ - echo "Error: One or more \"installcheck\" testcases have failed."; \ - exit 1; \ - fi +INSTALL_TESTS = check-camera-list.sh CLEANFILES = $(check_SCRIPTS) @@ -60,18 +39,4 @@ $(LIBEXIF_LIBS) \ $(INTLLIBS) -clean-local: - rm -rf _inst - rm -f _camlibs - -.in.sh: - @echo "Creating $@" - @sed \ - -e 's|@top_builddir\@|$(top_builddir)|g' \ - -e 's|@camlibdir\@|$(camlibdir)|g' \ - -e 's|@libdir\@|$(libdir)|g' \ - -e 's|@DESTDIR\@|$(DESTDIR)|g' \ - -e 's|@MAKE\@|$(MAKE)|g' \ - < "$<" > "$@" - @chmod +x $@ - +include $(top_srcdir)/installcheck.mk Deleted: trunk/libgphoto2/tests/check-camera-list.in =================================================================== --- trunk/libgphoto2/tests/check-camera-list.in 2006-09-29 12:05:39 UTC (rev 9230) +++ trunk/libgphoto2/tests/check-camera-list.in 2006-09-29 15:15:04 UTC (rev 9231) @@ -1,58 +0,0 @@ -#!/bin/sh - -top_builddir="@top_builddir@" -camlibdir="@camlibdir@" -libdir="@libdir@" -DESTDIR="@DESTDIR@" -MAKE="@MAKE@" - -echo "---------------------" -pwd -echo "camlibdir=$camlibdir" -echo "libdir=$libdir" -echo "DESTDIR=$DESTDIR" -echo "top_builddir=$top_builddir" - -CAMLIBS="${DESTDIR}${camlibdir}" - -pwd="$(pwd)" -if test -d "${CAMLIBS}"; then - echo "Found camlibs in default install dir." - : -else - echo "Going to use our own camlib installation" - DESTDIR="${pwd}/_inst" - CAMLIBS="${DESTDIR}${camlibdir}" - for reldir in \ - libgphoto2_port/libgphoto2_port \ - libgphoto2 \ - camlibs - do - (cd "${top_builddir}/${reldir}" && ${MAKE} DESTDIR="$DESTDIR" install) - done - ln -s "${CAMLIBS}" "_camlibs" - CAMLIBS="${pwd}/_camlibs" - if test -d "${CAMLIBS}"; then - echo "Test installation successful" - else - echo "Test installation failed" - exit 1 - fi -fi - -#LD_LIBRARY_PATH="$DESTDIR$libdir:$LD_LIBRARY_PATH" -#export LD_LIBRARY_PATH -echo "Using camlib dir: $CAMLIBS" -export CAMLIBS - -echo "=====================" -pwd -echo "camlibdir=$camlibdir" -echo "libdir=$libdir" -echo "DESTDIR=$DESTDIR" -echo "top_builddir=$top_builddir" -echo "CAMLIBS=$CAMLIBS" -echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -echo "#####################" - -./test-camera-list Copied: trunk/libgphoto2/tests/check-camera-list.sh.in (from rev 9222, trunk/libgphoto2/tests/check-camera-list.in) =================================================================== --- trunk/libgphoto2/tests/check-camera-list.sh.in (rev 0) +++ trunk/libgphoto2/tests/check-camera-list.sh.in 2006-09-29 15:15:04 UTC (rev 9231) @@ -0,0 +1,38 @@ +#!/bin/sh +# "make installcheck" testcase: +# Lists all cameras found by libgphoto2. +# Fails if no cameras are found. + +set -ex + +debug=: +#debug=false + +prefix="${prefix-"@prefix@"}" +exec_prefix="${exec_prefix-"@exec_prefix@"}" +libdir="${libdir-"@libdir@"}" +libexecdir="${libexecdir-"@libexecdir@"}" +camlibdir="${camlibdir-"@camlibdir@"}" +CAMLIBS="${DESTDIR}${camlibdir}" +export CAMLIBS +LD_LIBRARY_PATH="${DESTDIR}/${libdir}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" +export LD_LIBRARY_PATH + + +if test -d "${CAMLIBS}"; then :; else + echo "camlibs directory '${CAMLIBS}' does not exist" + exit 13 +fi + +if "$debug"; then + echo "=====================" + pwd + echo "camlibdir=$camlibdir" + echo "libdir=$libdir" + echo "DESTDIR=$DESTDIR" + echo "CAMLIBS=$CAMLIBS" + echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" + echo "#####################" +fi + +./test-camera-list Property changes on: trunk/libgphoto2/tests/check-camera-list.sh.in ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: trunk/libgphoto2/tests/ddb/Makefile.am =================================================================== --- trunk/libgphoto2/tests/ddb/Makefile.am 2006-09-29 12:05:39 UTC (rev 9230) +++ trunk/libgphoto2/tests/ddb/Makefile.am 2006-09-29 15:15:04 UTC (rev 9231) @@ -12,32 +12,11 @@ EXTRA_DIST = \ README.ddb \ - check-ddb.in \ + check-ddb.sh.in \ ddb-txt.l \ ddb-txt.y -# FIXME: Only run this if not cross-compiling -installcheck-local: $(check_SCRIPTS) - @export CAMLIBS="$(DESTDIR)$(camlibdir)"; \ - total=0; failed=0; success=0; \ - echo "Running \"installcheck\" test cases..."; \ - for script in $(check_SCRIPTS); do \ - echo "Test case: $$script"; \ - total="$$(expr $$total + 1)"; \ - if "./$$script"; then \ - echo "SUCCEEDED: $$script"; \ - success="$$(expr $$success + 1)"; \ - else \ - s="$$?"; \ - echo "FAILED (return code $$s): $$script"; \ - failed="$$(expr $$failed + 1)"; \ - fi; \ - done; \ - echo "Test summary: $$success succeeded, $$failed failed, $$total in total."; \ - if test "$$failed" -gt 0; then \ - echo "Error: One or more \"installcheck\" testcases have failed."; \ - exit 1; \ - fi +INSTALL_TESTS = $(check_SCRIPTS) # TESTS = $(check_SCRIPTS) @@ -64,15 +43,10 @@ clean-local: rm -f *.s *.i -.in.sh: - @echo "Creating $@" - @sed \ - -e 's|@top_builddir\@|$(top_builddir)|g' \ - -e 's|@camlibdir\@|$(camlibdir)|g' \ - < "$<" > "$@" - @chmod +x $@ +check-ddb.sh: check-ddb.sh.in $(top_builddir)/packaging/generic/print-camera-list test-ddb -check-ddb.sh: check-ddb.in $(top_builddir)/packaging/generic/print-camera-list test-ddb - $(top_builddir)/packaging/generic/print-camera-list: cd $(top_builddir)/packaging/generic && $(MAKE) print-camera-list + +include $(top_srcdir)/installcheck.mk + Deleted: trunk/libgphoto2/tests/ddb/check-ddb.in =================================================================== --- trunk/libgphoto2/tests/ddb/check-ddb.in 2006-09-29 12:05:39 UTC (rev 9230) +++ trunk/libgphoto2/tests/ddb/check-ddb.in 2006-09-29 15:15:04 UTC (rev 9231) @@ -1,41 +0,0 @@ -#!/bin/sh - -set -e - -export CAMLIBS="@camlibdir@" - -true ./test-ddb<<EOF -# This is a pre-alpha test example - -device "Canon PowerShot G1" -{ - driver "canon"; - operations config; - - interface serial - { - speeds 9600, 19200, 38400, 57600, 115200; - }; - interface usb - { - vendor 0x04a9; - product 0x3040; - }; -}; - -device "Canon PowerShot G2" -{ - driver "canon"; - interface usb - { - vendor 0x04a9; - product 0x3055; - }; -}; - -EOF - -@top_builddir@/packaging/generic/print-camera-list gp2ddb > gp2ddb.txt -true ./test-ddb gp2ddb.txt - -./test-ddb --compare < gp2ddb.txt Copied: trunk/libgphoto2/tests/ddb/check-ddb.sh.in (from rev 9222, trunk/libgphoto2/tests/ddb/check-ddb.in) =================================================================== --- trunk/libgphoto2/tests/ddb/check-ddb.sh.in (rev 0) +++ trunk/libgphoto2/tests/ddb/check-ddb.sh.in 2006-09-29 15:15:04 UTC (rev 9231) @@ -0,0 +1,37 @@ +#!/bin/sh +# "make installcheck" testcase: +# Compares camera list printed by by print-camera-list and parsed by +#test-ddb with the camera list from gp_abilities_list_load(). +# Fails if differences are found. + +set -ex + +debug=: +#debug=false + +prefix="${prefix-"@prefix@"}" +exec_prefix="${exec_prefix-"@exec_prefix@"}" +libdir="${libdir-"@libdir@"}" +libexecdir="${libexecdir-"@libexecdir@"}" +camlibdir="${camlibdir-"@camlibdir@"}" +utilsdir="${utilsdir-"@utilsdir@"}" +CAMLIBS="${DESTDIR}${camlibdir}" +export CAMLIBS +LD_LIBRARY_PATH="${DESTDIR}/${libdir}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" +export LD_LIBRARY_PATH + +if "$debug"; then + echo "=====================" + pwd + echo "camlibdir=$camlibdir" + echo "libdir=$libdir" + echo "utilsdir=$utilsdir" + echo "DESTDIR=$DESTDIR" + echo "CAMLIBS=$CAMLIBS" + echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" + echo "#####################" +fi + +${DESTDIR}${utilsdir}/print-camera-list gp2ddb > gp2ddb.txt + +./test-ddb --compare < gp2ddb.txt This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |