This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[python] [commit] Remove custom installation/configuration


Hello,

feel free to revert/modify/etc., I just thought it is OK for commit.


Thanks,
Jan
e9ccac248455afcc35f82cfdcebc33d1aa005b04 Mon Sep 17 00:00:00 2001
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Fri, 7 Jan 2011 08:05:49 +0100

Drop --with-gdb-datadir and --with-pythondir in the favor of upstreamed
 --with-gdb-datadir.

Unify .py files installation to upstream data-directory/Makefile.in
$(PYTHON_FILES).
---
 gdb/Makefile.in                |   36 ------------------
 gdb/config.in                  |    8 +--
 gdb/configure                  |   80 ++-------------------------------------
 gdb/configure.ac               |   47 +-----------------------
 gdb/data-directory/Makefile.in |   18 +++++++-
 5 files changed, 24 insertions(+), 165 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index fda439c..95c3b57 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -170,12 +170,6 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
 TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
 
 # Did the user give us a --with-gdb-datadir option?
-GDB_DATADIR_PATH = @GDB_DATADIR_PATH@
-
-# The argument to --with-pythondir.  If not given, this is
-# GDB_DATADIR_PATH/python.
-pythondir = @pythondir@
-
 GDB_DATADIR = @GDB_DATADIR@
 
 # Helper code from gnulib.
@@ -2071,36 +2065,6 @@ py-value.o: $(srcdir)/python/py-value.c
 	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-value.c
 	$(POSTCOMPILE)
 
-# All python library files, with the "python/lib" stripped off.
-# Note that we should only install files in the "gdb" module.
-PY_FILES = gdb/FrameIterator.py gdb/FrameWrapper.py gdb/command/alias.py \
-    gdb/command/backtrace.py gdb/command/require.py \
-    gdb/command/pahole.py gdb/command/upto.py gdb/command/__init__.py \
-    gdb/command/ignore_errors.py \
-    gdb/function/caller_is.py gdb/function/in_scope.py \
-    gdb/function/__init__.py gdb/backtrace.py gdb/__init__.py
-
-# Install the Python library.  Python library files go under
-# $(pythondir).
-install-python:
-	files='$(PY_FILES)'; for file in $$files; do \
-	  dir=`echo "$$file" | sed 's,/[^/]*$$,,'`; \
-	  $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(pythondir)/$$dir; \
-	  $(INSTALL_DATA) $(srcdir)/python/lib/$$file $(DESTDIR)$(pythondir)/$$file; \
-	done
-
-# Other packages may have their files installed in $(pythondir).
-uninstall-python:
-	files='$(PY_FILES)'; for file in $$files; do \
-	  slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'`; \
-	  rm -f $(DESTDIR)$(pythondir)/$$file; \
-	  while test "x$$file" != "x$$slashdir"; do \
-	    rmdir 2>/dev/null "$(DESTDIR)$(pythondir)$$slashdir"; \
-	    file="$$slashdir"; \
-	    slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'`; \
-	  done \
-	done
-
 #
 # Dependency tracking.  Most of this is conditional on GNU Make being
 # found by configure; if GNU Make is not found, we fall back to a
diff --git a/gdb/config.in b/gdb/config.in
index 513110c..173cd3d 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -50,10 +50,11 @@
    language is requested. */
 #undef ENABLE_NLS
 
-/* Global directory for GDB data files. */
+/* look for global separate data files in this path [DATADIR/gdb] */
 #undef GDB_DATADIR
 
-/* Define if GDB datadir should be relocated when GDB is moved. */
+/* Define if the gdb-datadir directory should be relocated when GDB is moved.
+   */
 #undef GDB_DATADIR_RELOCATABLE
 
 /* Define to be a string naming the default host character set. */
@@ -777,9 +778,6 @@
    'ptrdiff_t'. */
 #undef PTRDIFF_T_SUFFIX
 
-/* Define to install path for Python sources */
-#undef PYTHONDIR
-
 /* Define if the python directory should be relocated when GDB is moved. */
 #undef PYTHON_PATH_RELOCATABLE
 
diff --git a/gdb/configure b/gdb/configure
index 03ef568..6ea3f58 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -680,8 +680,6 @@ REPORT_BUGS_TO
 PKGVERSION
 TARGET_OBS
 subdirs
-pythondir
-GDB_DATADIR_PATH
 GDB_DATADIR
 DEBUGDIR
 am__fastdepCC_FALSE
@@ -948,7 +946,6 @@ enable_dependency_tracking
 with_separate_debug_dir
 with_gdb_datadir
 with_relocated_sources
-with_pythondir
 enable_targets
 enable_64_bit_bfd
 enable_gdbcli
@@ -1653,10 +1650,6 @@ Optional Packages:
                           [DATADIR/gdb]
   --with-relocated-sources=PATH
                           automatically relocate this path for source files
-  --with-gdb-datadir      look for global separate data files in this path
-                          [DATADIR/gdb]
-  --with-pythondir        install Python data files in this path
-                          [DATADIR/gdb/python]
   --with-libunwind        use libunwind frame unwinding support
   --with-curses           use the curses library instead of the termcap
                           library
@@ -7889,73 +7882,6 @@ _ACEOF
 fi
 
 
-# GDB's datadir relocation
-
-gdbdatadir=${datadir}/gdb
-
-
-# Check whether --with-gdb-datadir was given.
-if test "${with_gdb_datadir+set}" = set; then :
-  withval=$with_gdb_datadir; gdbdatadir="${withval}"
-fi
-
-
-
-  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
-  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-  ac_define_dir=`eval echo $gdbdatadir`
-  ac_define_dir=`eval echo $ac_define_dir`
-
-cat >>confdefs.h <<_ACEOF
-#define GDB_DATADIR "$ac_define_dir"
-_ACEOF
-
-
-
-if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
-  if test "x$prefix" = xNONE; then
-    test_prefix=/usr/local
-  else
-    test_prefix=$prefix
-  fi
-else
-  test_prefix=$exec_prefix
-fi
-
-case ${gdbdatadir} in
-  "${test_prefix}"|"${test_prefix}/"*|\
-  '${exec_prefix}'|'${exec_prefix}/'*)
-
-$as_echo "#define GDB_DATADIR_RELOCATABLE 1" >>confdefs.h
-
-  ;;
-esac
-GDB_DATADIR_PATH=${gdbdatadir}
-
-
-
-# Check whether --with-pythondir was given.
-if test "${with_pythondir+set}" = set; then :
-  withval=$with_pythondir; pythondir="${withval}"
-else
-  pythondir=no
-fi
-
-
-# If the user passed in a path, define it.  Otherwise, compute it at
-# runtime based on the possibly-relocatable datadir.
-if test "$pythondir" = "no"; then
-  pythondir='$(GDB_DATADIR_PATH)/python'
-else
-
-cat >>confdefs.h <<_ACEOF
-#define PYTHONDIR "$pythondir"
-_ACEOF
-
-fi
-
-
-
 
 
 subdirs="$subdirs testsuite"
@@ -11000,7 +10926,6 @@ $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
-  CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-python"
   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
 
   # Flags needed to compile Python code (taken from python-config --cflags).
@@ -14876,6 +14801,11 @@ if test "${enable_werror+set}" = set; then :
 fi
 
 
+# Enable -Werror by default when using gcc
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+    ERROR_ON_WARNING=yes
+fi
+
 WERROR_CFLAGS=""
 if test "${ERROR_ON_WARNING}" = yes ; then
     WERROR_CFLAGS="-Werror"
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 681791d..9272843 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -108,51 +108,7 @@ AS_HELP_STRING([--with-relocated-sources=PATH], [automatically relocate this pat
               [Relocated directory for source files. ])
 ])
 
-# GDB's datadir relocation
-
-gdbdatadir=${datadir}/gdb
-
-AC_ARG_WITH([gdb-datadir],
-  [AS_HELP_STRING([--with-gdb-datadir],
-                  [look for global separate data files in this path [DATADIR/gdb]])], [gdbdatadir="${withval}"])
-
-AC_DEFINE_DIR(GDB_DATADIR, gdbdatadir,
-              [Global directory for GDB data files. ])
-
-if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
-  if test "x$prefix" = xNONE; then
-    test_prefix=/usr/local
-  else
-    test_prefix=$prefix
-  fi
-else
-  test_prefix=$exec_prefix
-fi
-
-case ${gdbdatadir} in
-  "${test_prefix}"|"${test_prefix}/"*|\
-  '${exec_prefix}'|'${exec_prefix}/'*)
-    AC_DEFINE(GDB_DATADIR_RELOCATABLE, 1, [Define if GDB datadir should be relocated when GDB is moved.])
-  ;;
-esac
-GDB_DATADIR_PATH=${gdbdatadir}
-AC_SUBST(GDB_DATADIR_PATH)
-
-AC_ARG_WITH([pythondir],
-  [AS_HELP_STRING([--with-pythondir],
-                  [install Python data files in this path [DATADIR/gdb/python]])], [pythondir="${withval}"], [pythondir=no])
-
-# If the user passed in a path, define it.  Otherwise, compute it at
-# runtime based on the possibly-relocatable datadir.
-if test "$pythondir" = "no"; then
-  pythondir='$(GDB_DATADIR_PATH)/python'
-else
-  AC_DEFINE_UNQUOTED(PYTHONDIR, "$pythondir",
-      [Define to install path for Python sources])
-fi
-AC_SUBST(pythondir)
-
-
+AC_CONFIG_SUBDIRS(testsuite)
 
 # Check whether to support alternative target configurations
 AC_ARG_ENABLE(targets,
@@ -880,7 +836,6 @@ if test "${have_libpython}" != no; then
   CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
   CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
   CONFIG_INSTALL="$CONFIG_INSTALL install-python"
-  CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-python"
   ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
 
   # Flags needed to compile Python code (taken from python-config --cflags).
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
index 565a837..c9ff0de 100644
--- a/gdb/data-directory/Makefile.in
+++ b/gdb/data-directory/Makefile.in
@@ -51,11 +51,23 @@ SYSCALLS_FILES = \
 PYTHON_DIR = python
 PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR)
 PYTHON_FILES = \
+	gdb/FrameIterator.py \
+	gdb/FrameWrapper.py \
 	gdb/__init__.py \
-	gdb/types.py \
-	gdb/printing.py \
+	gdb/backtrace.py \
 	gdb/command/__init__.py \
-	gdb/command/pretty_printers.py
+	gdb/command/alias.py \
+	gdb/command/backtrace.py \
+	gdb/command/ignore_errors.py \
+	gdb/command/pahole.py \
+	gdb/command/pretty_printers.py \
+	gdb/command/require.py \
+	gdb/command/upto.py \
+	gdb/function/__init__.py \
+	gdb/function/caller_is.py \
+	gdb/function/in_scope.py \
+	gdb/printing.py \
+	gdb/types.py
 
 FLAGS_TO_PASS = \
 	"prefix=$(prefix)" \
-- 
1.7.3.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]