summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <gp@n-dimensional.de>2005-12-25 19:16:24 +0000
committerHans Ulrich Niedermann <gp@n-dimensional.de>2005-12-25 19:16:24 +0000
commitb893f50556c2989a1991497bc2cad5b9ab5d6934 (patch)
tree433eaba46ea1c9dff49403a5d9a301fbe0381843 /tests
parent6bc1ad85754a28a45dc091e7f98eda5ceefa4154 (diff)
downloadlibgphoto2-b893f50556c2989a1991497bc2cad5b9ab5d6934.tar.gz
let test-camera-list rely on libtool wrapper script to find the library; only install the required subdirectories for camera list; shorten path to test camlib dir to stay under 128 character limit; remove obsolete INCLUDES definition from Makefile.am
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8334 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am7
-rw-r--r--tests/check-camera-list.in29
2 files changed, 20 insertions, 16 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index dc86d7592..789f81a8b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,8 +1,3 @@
-
-INCLUDES = \
- -I$(top_srcdir)/libgphoto2 \
- -I$(top_srcdir)/libgphoto2_port/libgphoto2_port
-
check_PROGRAMS = test-camera-list
check_SCRIPTS = \
@@ -42,6 +37,7 @@ test_camera_list_LDADD = \
clean-local:
rm -rf _inst
+ rm -f _camlibs
%.sh: %.in
@echo "Creating $@"
@@ -53,3 +49,4 @@ clean-local:
-e 's|@MAKE\@|$(MAKE)|g' \
< "$<" > "$@"
@chmod +x $@
+
diff --git a/tests/check-camera-list.in b/tests/check-camera-list.in
index fa68de09b..768bc915e 100644
--- a/tests/check-camera-list.in
+++ b/tests/check-camera-list.in
@@ -15,26 +15,33 @@ echo "top_builddir=$top_builddir"
CAMLIBS="${DESTDIR}${camlibdir}"
+pwd="$(pwd)"
if test -d "${CAMLIBS}"; then
- :
-elif test -d "$(pwd)/_inst/${camlibdir}"; then
- DESTDIR="$(pwd)/_inst"
- CAMLIBS="${DESTDIR}${camlibdir}"
+ echo "Found camlibs in default install dir."
:
else
- DESTDIR="$(pwd)/_inst"
+ echo "Going to use our own camlib installation"
+ DESTDIR="${pwd}/_inst"
CAMLIBS="${DESTDIR}${camlibdir}"
- (cd "${top_builddir}" && ${MAKE} DESTDIR="$DESTDIR" install)
+ 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"
+ echo "Test installation successful"
else
- echo "Test installation failed"
- exit 1
+ echo "Test installation failed"
+ exit 1
fi
fi
-LD_LIBRARY_PATH="$DESTDIR$libdir:$LD_LIBRARY_PATH"
-export LD_LIBRARY_PATH
+#LD_LIBRARY_PATH="$DESTDIR$libdir:$LD_LIBRARY_PATH"
+#export LD_LIBRARY_PATH
echo "Using camlib dir: $CAMLIBS"
export CAMLIBS