Install the config files for cross debs under /usr/$(host), but link them
to the default system location under /usr. This way the commands: wx-config --prefix=/usr/$(host) and wx-config --prefix=/usr --host=$(host) are much more congruent in their action. Another nail in the coffin for inplace hacks. Link $srcdir/include to the build dir so that --prefix=$build_dir really does point to a realistic looking installed development environment. I don't know why I didn't do this instead of (ab)using --exec-prefix to 'fix' this simple omission for so long. Probably because it is much more obvious if contrib is out of the picture. That makes it a little more work right now, but long term this is a very clean and correct thing to do. It completely absolves us of the two independent variables problem, and of the tree becoming bogus without actually being stale. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
154
configure
vendored
154
configure
vendored
@@ -40903,6 +40903,16 @@ fi
|
||||
|
||||
|
||||
|
||||
for c in `ls $srcdir/contrib/include/wx 2> /dev/null`; do
|
||||
ac_config_links="$ac_config_links include/wx-$WX_RELEASE$WX_FLAVOUR/wx/$c:contrib/include/wx/$c"
|
||||
|
||||
done
|
||||
for f in `ls $srcdir/include/wx 2> /dev/null`; do
|
||||
ac_config_links="$ac_config_links include/wx-$WX_RELEASE$WX_FLAVOUR/wx/$f:include/wx/$f"
|
||||
|
||||
done
|
||||
|
||||
|
||||
if test "$wxUSE_GUI" = "yes"; then
|
||||
SUBDIRS="samples demos utils contrib"
|
||||
else SUBDIRS="samples utils"
|
||||
@@ -41484,6 +41494,9 @@ $config_files
|
||||
Configuration headers:
|
||||
$config_headers
|
||||
|
||||
Configuration links:
|
||||
$config_links
|
||||
|
||||
Configuration commands:
|
||||
$config_commands
|
||||
|
||||
@@ -41611,6 +41624,8 @@ do
|
||||
"version-script" ) CONFIG_FILES="$CONFIG_FILES version-script" ;;
|
||||
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||
"$mk" ) CONFIG_FILES="$CONFIG_FILES $mk" ;;
|
||||
"include/wx-$WX_RELEASE$WX_FLAVOUR/wx/$c" ) CONFIG_LINKS="$CONFIG_LINKS include/wx-$WX_RELEASE$WX_FLAVOUR/wx/$c:contrib/include/wx/$c" ;;
|
||||
"include/wx-$WX_RELEASE$WX_FLAVOUR/wx/$f" ) CONFIG_LINKS="$CONFIG_LINKS include/wx-$WX_RELEASE$WX_FLAVOUR/wx/$f:include/wx/$f" ;;
|
||||
"wx-config" ) CONFIG_COMMANDS="$CONFIG_COMMANDS wx-config" ;;
|
||||
"lib/wx/include/${TOOLCHAIN_FULLNAME}/wx/setup.h" ) CONFIG_HEADERS="$CONFIG_HEADERS lib/wx/include/${TOOLCHAIN_FULLNAME}/wx/setup.h:setup.h.in" ;;
|
||||
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
|
||||
@@ -41626,6 +41641,7 @@ done
|
||||
if $ac_need_defaults; then
|
||||
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
|
||||
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
|
||||
test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
|
||||
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
|
||||
fi
|
||||
|
||||
@@ -42460,6 +42476,144 @@ done
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<\_ACEOF
|
||||
|
||||
#
|
||||
# CONFIG_LINKS section.
|
||||
#
|
||||
|
||||
for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
|
||||
ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
|
||||
ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
|
||||
|
||||
{ echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
|
||||
echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
|
||||
|
||||
if test ! -r $srcdir/$ac_source; then
|
||||
{ { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
|
||||
echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
rm -f $ac_dest
|
||||
|
||||
# Make relative symlinks.
|
||||
ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
|
||||
$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$ac_dest" : 'X\(//\)[^/]' \| \
|
||||
X"$ac_dest" : 'X\(//\)$' \| \
|
||||
X"$ac_dest" : 'X\(/\)' \| \
|
||||
. : '\(.\)' 2>/dev/null ||
|
||||
echo X"$ac_dest" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
|
||||
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
|
||||
/^X\(\/\/\)$/{ s//\1/; q; }
|
||||
/^X\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
{ if $as_mkdir_p; then
|
||||
mkdir -p "$ac_dest_dir"
|
||||
else
|
||||
as_dir="$ac_dest_dir"
|
||||
as_dirs=
|
||||
while test ! -d "$as_dir"; do
|
||||
as_dirs="$as_dir $as_dirs"
|
||||
as_dir=`(dirname "$as_dir") 2>/dev/null ||
|
||||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$as_dir" : 'X\(//\)[^/]' \| \
|
||||
X"$as_dir" : 'X\(//\)$' \| \
|
||||
X"$as_dir" : 'X\(/\)' \| \
|
||||
. : '\(.\)' 2>/dev/null ||
|
||||
echo X"$as_dir" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
|
||||
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
|
||||
/^X\(\/\/\)$/{ s//\1/; q; }
|
||||
/^X\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`
|
||||
done
|
||||
test ! -n "$as_dirs" || mkdir $as_dirs
|
||||
fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
|
||||
echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
|
||||
{ (exit 1); exit 1; }; }; }
|
||||
|
||||
ac_builddir=.
|
||||
|
||||
if test "$ac_dest_dir" != .; then
|
||||
ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
|
||||
# A "../" for each directory in $ac_dir_suffix.
|
||||
ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
|
||||
else
|
||||
ac_dir_suffix= ac_top_builddir=
|
||||
fi
|
||||
|
||||
case $srcdir in
|
||||
.) # No --srcdir option. We are building in place.
|
||||
ac_srcdir=.
|
||||
if test -z "$ac_top_builddir"; then
|
||||
ac_top_srcdir=.
|
||||
else
|
||||
ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
|
||||
fi ;;
|
||||
[\\/]* | ?:[\\/]* ) # Absolute path.
|
||||
ac_srcdir=$srcdir$ac_dir_suffix;
|
||||
ac_top_srcdir=$srcdir ;;
|
||||
*) # Relative path.
|
||||
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
|
||||
ac_top_srcdir=$ac_top_builddir$srcdir ;;
|
||||
esac
|
||||
|
||||
# Do not use `cd foo && pwd` to compute absolute paths, because
|
||||
# the directories may not exist.
|
||||
case `pwd` in
|
||||
.) ac_abs_builddir="$ac_dest_dir";;
|
||||
*)
|
||||
case "$ac_dest_dir" in
|
||||
.) ac_abs_builddir=`pwd`;;
|
||||
[\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
|
||||
*) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
|
||||
esac;;
|
||||
esac
|
||||
case $ac_abs_builddir in
|
||||
.) ac_abs_top_builddir=${ac_top_builddir}.;;
|
||||
*)
|
||||
case ${ac_top_builddir}. in
|
||||
.) ac_abs_top_builddir=$ac_abs_builddir;;
|
||||
[\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
|
||||
*) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
|
||||
esac;;
|
||||
esac
|
||||
case $ac_abs_builddir in
|
||||
.) ac_abs_srcdir=$ac_srcdir;;
|
||||
*)
|
||||
case $ac_srcdir in
|
||||
.) ac_abs_srcdir=$ac_abs_builddir;;
|
||||
[\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
|
||||
*) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
|
||||
esac;;
|
||||
esac
|
||||
case $ac_abs_builddir in
|
||||
.) ac_abs_top_srcdir=$ac_top_srcdir;;
|
||||
*)
|
||||
case $ac_top_srcdir in
|
||||
.) ac_abs_top_srcdir=$ac_abs_builddir;;
|
||||
[\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
|
||||
*) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
|
||||
case $srcdir in
|
||||
[\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
|
||||
*) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
|
||||
esac
|
||||
|
||||
# Try a symlink, then a hard link, then a copy.
|
||||
ln -s $ac_rel_source $ac_dest 2>/dev/null ||
|
||||
ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
|
||||
cp -p $srcdir/$ac_source $ac_dest ||
|
||||
{ { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
|
||||
echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
done
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<\_ACEOF
|
||||
|
||||
#
|
||||
# CONFIG_COMMANDS section.
|
||||
#
|
||||
|
13
configure.in
13
configure.in
@@ -6134,6 +6134,19 @@ AC_CONFIG_COMMANDS([ wx-config
|
||||
LN_S="${LN_S}"
|
||||
])
|
||||
|
||||
dnl When contrib is gone, this is all we will need:
|
||||
dnl AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR/wx:include/wx ])
|
||||
|
||||
dnl Until then, we need to be a little more extravagent to create
|
||||
dnl a 'real' working $prefix subtree in each build dir. Doing this
|
||||
dnl really does make them otherwise identical to an installed set.
|
||||
for c in `ls $srcdir/contrib/include/wx 2> /dev/null`; do
|
||||
AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR/wx/$c:contrib/include/wx/$c ])
|
||||
done
|
||||
for f in `ls $srcdir/include/wx 2> /dev/null`; do
|
||||
AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR/wx/$f:include/wx/$f ])
|
||||
done
|
||||
|
||||
|
||||
dnl Configure samples, contrib etc. directories, but only if they are present:
|
||||
if test "$wxUSE_GUI" = "yes"; then
|
||||
|
26
debian/rules
vendored
26
debian/rules
vendored
@@ -633,12 +633,23 @@ install-msw-dev: build-msw-shared-stamp build-msw-static-stamp
|
||||
dh_installdirs
|
||||
dh_install $(objdir_msw_shared)/lib/*.dll* usr/$(cross_host)/lib
|
||||
dh_install $(objdir_msw_shared)/lib/wx/include usr/$(cross_host)/lib/wx
|
||||
dh_install $(objdir_msw_shared)/lib/wx/config/$(cross_host)* usr/lib/wx/config
|
||||
dh_install $(objdir_msw_shared)/lib/wx/config/$(cross_host)* usr/$(cross_host)/lib/wx/config
|
||||
dh_install $(objdir_msw_static)/lib/*.a usr/$(cross_host)/lib
|
||||
dh_install $(objdir_msw_static)/lib/wx/include usr/$(cross_host)/lib/wx
|
||||
dh_install $(objdir_msw_static)/lib/wx/config/$(cross_host)* usr/lib/wx/config
|
||||
dh_install $(objdir_msw_static)/lib/wx/config/$(cross_host)* usr/$(cross_host)/lib/wx/config
|
||||
$(cross_host)-strip --strip-debug debian/$(package_msw_dev)/usr/$(cross_host)/lib/*.a
|
||||
|
||||
@# As a special case for the cross packages, we link their config
|
||||
@# under /usr as well as under the normal cross prefix. This way
|
||||
@# --prefix=/usr/$(cross_host) and --prefix=/usr --host=$(cross_host)
|
||||
@# will have a congruent effect on wx-config.
|
||||
@( for f in `ls -1 debian/$(package_msw_dev)/usr/$(cross_host)/lib/wx/config`; do \
|
||||
all_cfg="$${all_cfg} usr/$(cross_host)/lib/wx/config/$$f usr/lib/wx/config/$$f"; \
|
||||
echo "linking cross config /usr/$(cross_host)/lib/wx/config/$$f"; \
|
||||
done; \
|
||||
dh_link $${all_cfg}; \
|
||||
)
|
||||
|
||||
install-msw-dbg: DH_OPTIONS=-p$(package_msw_dbg)
|
||||
install-msw-dbg: build-msw-dbg-stamp
|
||||
dh_testdir
|
||||
@@ -647,10 +658,17 @@ install-msw-dbg: build-msw-dbg-stamp
|
||||
dh_installdirs
|
||||
dh_install $(objdir_msw_dbg)/lib/*.dll* usr/$(cross_host)/lib
|
||||
dh_install $(objdir_msw_dbg)/lib/wx/include usr/$(cross_host)/lib/wx
|
||||
dh_install $(objdir_msw_dbg)/lib/wx/config/$(cross_host)* usr/lib/wx/config
|
||||
dh_install $(objdir_msw_dbg)/lib/wx/config/$(cross_host)* usr/$(cross_host)/lib/wx/config
|
||||
# No static lib, they're freakin' huge!
|
||||
#$(cross_host)-strip --strip-debug debian/$(package_msw_dbg)/usr/$(cross_host)/lib/*.a
|
||||
|
||||
@( for f in `ls -1 debian/$(package_msw_dbg)/usr/$(cross_host)/lib/wx/config`; do \
|
||||
all_cfg="$${all_cfg} usr/$(cross_host)/lib/wx/config/$$f usr/lib/wx/config/$$f"; \
|
||||
echo "linking cross config /usr/$(cross_host)/lib/wx/config/$$f"; \
|
||||
done; \
|
||||
dh_link $${all_cfg}; \
|
||||
)
|
||||
|
||||
install-headers-msw: DH_OPTIONS=-p$(package_headers_msw)
|
||||
install-headers-msw:
|
||||
dh_testdir
|
||||
@@ -665,7 +683,7 @@ install-headers-msw:
|
||||
@# Symlink all the headers that will be installed by the main -headers
|
||||
@# package to where the cross compiler will expect them.
|
||||
@( for f in `ls -1 include/wx`; do \
|
||||
all_h="$${all_h} /usr/include/wx-$(release)/wx/$$f usr/$(cross_host)/include/wx-$(release)/wx/$$f"; \
|
||||
all_h="$${all_h} usr/include/wx-$(release)/wx/$$f usr/$(cross_host)/include/wx-$(release)/wx/$$f"; \
|
||||
echo "linking header /usr/include/wx-$(release)/wx/$$f"; \
|
||||
done; \
|
||||
dh_link $${all_h}; \
|
||||
|
@@ -10,23 +10,17 @@
|
||||
# Licence: wxWindows licence
|
||||
############################################################################
|
||||
|
||||
# Not much to do here. Just initialise some variables to point things
|
||||
# into the local tree by default and then source the real wx-config if
|
||||
# it all still looks sane. It typically should be if you got this far.
|
||||
# Not much to do here. Just initialise prefix to point things into the
|
||||
# local tree by default and then source the real wx-config if it all still
|
||||
# looks sane.
|
||||
|
||||
check_dirname()
|
||||
{
|
||||
if [ ! -d "$1" ]; then
|
||||
printf "\n *** Error: Directory '$1'\n" 1>&2
|
||||
this_prefix=$( cd "@abs_top_builddir@" 2> /dev/null && pwd )
|
||||
|
||||
if [ -z "$this_prefix" ]; then
|
||||
printf "\n *** Error: Directory '@abs_top_builddir@'\n" 1>&2
|
||||
printf " no longer exists.\n\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
( cd $1 && pwd )
|
||||
}
|
||||
|
||||
this_prefix=$(check_dirname "@abs_top_srcdir@") || exit
|
||||
this_exec_prefix=$(check_dirname "@abs_top_builddir@") || exit
|
||||
flag_option_inplace=yes
|
||||
|
||||
. "$this_exec_prefix/lib/wx/config/@TOOLCHAIN_FULLNAME@"
|
||||
. "$this_prefix/lib/wx/config/@TOOLCHAIN_FULLNAME@"
|
||||
|
||||
|
49
wx-config.in
49
wx-config.in
@@ -311,7 +311,7 @@ get_mask()
|
||||
|
||||
# Determine the base directories we require.
|
||||
prefix=${input_option_prefix-${this_prefix:-@prefix@}}
|
||||
exec_prefix=${input_option_exec_prefix-${input_option_prefix-${this_exec_prefix:-@exec_prefix@}}}
|
||||
exec_prefix=${input_option_exec_prefix-${input_option_prefix-@exec_prefix@}}
|
||||
wxconfdir="@libdir@/wx/config"
|
||||
|
||||
installed_configs=$( cd "$wxconfdir" 2> /dev/null && ls | grep -v "^inplace-" )
|
||||
@@ -703,14 +703,12 @@ fi
|
||||
|
||||
[ -z "$WXDEBUG" ] || decho " using this config"
|
||||
|
||||
if [ -n "$flag_option_inplace" ]; then
|
||||
# If the user supplied a prefix, then the in tree config did not
|
||||
# delegate out to anything in the user supplied prefix so reset
|
||||
# the prefixes back to provide the correct compile options for
|
||||
# this uninstalled wx build.
|
||||
prefix=$this_prefix
|
||||
exec_prefix=$this_exec_prefix
|
||||
fi
|
||||
# If the user supplied a prefix, and the in tree config did not
|
||||
# delegate out to anything in that prefix, then reset the build
|
||||
# tree prefix to provide the correct output for using this
|
||||
# uninstalled wx build. Or put more simply:
|
||||
prefix=${this_prefix-$prefix}
|
||||
exec_prefix=${this_prefix-$exec_prefix}
|
||||
|
||||
includedir="@includedir@"
|
||||
libdir="@libdir@"
|
||||
@@ -883,36 +881,15 @@ fi
|
||||
# Endgame. Nothing left to discover now.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
# cppflags
|
||||
# This function exists for no other reason than to make conditional
|
||||
# something that we may not use on several occasions. It outputs
|
||||
# the basic cppflags determined from information gleaned above.
|
||||
# Nothing below here will change what it outputs, only whether it
|
||||
# does or not.
|
||||
cppflags()
|
||||
{
|
||||
_cppflags="-I${libdir}/wx/include/@TOOLCHAIN_FULLNAME@"
|
||||
|
||||
if [ -n "$flag_option_inplace" ]; then
|
||||
# Bring in all the headers as if the whole tree had been installed.
|
||||
_cppflags="$_cppflags -I$includedir -I${prefix}/contrib/include"
|
||||
else
|
||||
_cppflags="$_cppflags -I${includedir}/wx-@WX_RELEASE@@WX_FLAVOUR@"
|
||||
fi
|
||||
|
||||
_cppflags="$_cppflags @WXDEBUG_DEFINE@ @TOOLCHAIN_DEFS@"
|
||||
|
||||
[ -n "$this_linkage" ] || _cppflags="$_cppflags @TOOLCHAIN_DLL_DEFS@"
|
||||
[ "$using_gui" = "yes" ] || _cppflags="$_cppflags -DwxUSE_GUI=0"
|
||||
|
||||
echo $_cppflags "@WXCONFIG_INCLUDE@" "@WX_LARGEFILE_FLAGS@" "@GCC_PRAGMA_FLAGS@"
|
||||
}
|
||||
[ -n "$this_linkage" ] || _static_cppflags="@TOOLCHAIN_DLL_DEFS@"
|
||||
[ "$using_gui" = "yes" ] || _gui_cppflags="-DwxUSE_GUI=0"
|
||||
|
||||
_cppflags=$(echo "-I${libdir}/wx/include/@TOOLCHAIN_FULLNAME@ -I${includedir}/wx-@WX_RELEASE@@WX_FLAVOUR@" "@WXDEBUG_DEFINE@" "@TOOLCHAIN_DEFS@" $_static_cppflags $_gui_cppflags "@WXCONFIG_INCLUDE@" "@WX_LARGEFILE_FLAGS@" "@GCC_PRAGMA_FLAGS@")
|
||||
|
||||
# now without further ado, we can answer these too.
|
||||
[ -z "$output_option_cppflags" ] || echo $(cppflags)
|
||||
[ -z "$output_option_cflags" ] || echo $(cppflags) "@CODE_GEN_FLAGS@"
|
||||
[ -z "$output_option_cxxflags" ] || echo $(cppflags) "@CODE_GEN_FLAGS@" "@CODE_GEN_FLAGS_CXX@"
|
||||
[ -z "$output_option_cppflags" ] || echo $_cppflags
|
||||
[ -z "$output_option_cflags" ] || echo $_cppflags "@CODE_GEN_FLAGS@"
|
||||
[ -z "$output_option_cxxflags" ] || echo $_cppflags "@CODE_GEN_FLAGS@" "@CODE_GEN_FLAGS_CXX@"
|
||||
[ -z "$output_option_gl_libs" ] || echo $(lib_flags_for gl)
|
||||
|
||||
if [ -n "$output_option_libs" ]; then
|
||||
|
Reference in New Issue
Block a user