mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-04-21 14:40:42 +02:00
check: Test that the pcfiledir variable is output correctly
This commit is contained in:
parent
9294307b21
commit
2808a5497c
1 changed files with 14 additions and 5 deletions
|
|
@ -3,18 +3,27 @@
|
|||
set -e
|
||||
. ${srcdir}/common
|
||||
|
||||
# Test if pcfiledir metadata variable is substituted correctly
|
||||
RESULT="-I${srcdir}/include -L${srcdir}/lib -lfoo"
|
||||
run_test --cflags --libs pcfiledir
|
||||
|
||||
# Convert abs_top_srcdir to Windows format if necessary.
|
||||
# Convert absolute directories to Windows format if necessary.
|
||||
if [ "$native_win32" = yes ]; then
|
||||
# Assume we have cmd to do the conversion, except we have to escape
|
||||
# the command switch on MSYS.
|
||||
[ "$OSTYPE" = msys ] && opt="\\/C" || opt="/C"
|
||||
abs_top_srcdir=$($WINE cmd $opt echo "$abs_top_srcdir")
|
||||
abs_srcdir=$($WINE cmd $opt echo "$abs_srcdir")
|
||||
fi
|
||||
|
||||
# See if the pcfiledir variable is defined. First, with the path
|
||||
# built from the relative PKG_CONFIG_LIBDIR. Second, with the path
|
||||
# built from the full path to the pc file.
|
||||
RESULT=$srcdir
|
||||
run_test --variable=pcfiledir pcfiledir
|
||||
RESULT=$abs_srcdir
|
||||
run_test --variable=pcfiledir "$abs_srcdir/pcfiledir.pc"
|
||||
|
||||
# Test if pcfiledir metadata variable is substituted correctly
|
||||
RESULT="-I${srcdir}/include -L${srcdir}/lib -lfoo"
|
||||
run_test --cflags --libs pcfiledir
|
||||
|
||||
# Test prefix redefinition for .pc files in pkgconfig directory. Try .pc
|
||||
# files with both unexpanded and expanded variables. Use the absolute
|
||||
# directory for the search path so that pkg-config can strip enough
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue