PR build/17105.

Tested with/without guile,python on amd64-linux.

I'm not sure we still have to deal with shells that can't
handle empty for lists, but I played it safe.
Otherwise this patch would be a lot smaller (though a diff -b
will still show the real changes).

	PR build/17105
	* configure.ac: Add AM_CONDITIONALs for HAVE_PYTHON, HAVE_GUILE.
	* configure: Regenerate.
	* data-directory/Makefile.in (PYTHON_FILE_LIST): Renamed from
	PYTHON_FILES.
	(PYTHON_FILES): New variable.
	(GUILE_FILE_LIST): Renamed from GUILE_FILES.
	(GUILE_FILES): New variable.
	(stamp-python, install-python, uninstall-python): Handle empty
	file list.
	(stamp-guile, install-guile, uninstall-guile): Ditto.
This commit is contained in:
Doug Evans 2014-07-26 16:41:29 -07:00
parent ee7333ae06
commit 4df4275506
4 changed files with 102 additions and 40 deletions

View File

@ -1,3 +1,17 @@
2014-07-26 Doug Evans <xdje42@gmail.com>
PR build/17105
* configure.ac: Add AM_CONDITIONALs for HAVE_PYTHON, HAVE_GUILE.
* configure: Regenerate.
* data-directory/Makefile.in (PYTHON_FILE_LIST): Renamed from
PYTHON_FILES.
(PYTHON_FILES): New variable.
(GUILE_FILE_LIST): Renamed from GUILE_FILES.
(GUILE_FILES): New variable.
(stamp-python, install-python, uninstall-python): Handle empty
file list.
(stamp-guile, install-guile, uninstall-guile): Ditto.
2014-07-26 Doug Evans <xdje42@gmail.com>
PR guile/17177

28
gdb/configure vendored
View File

@ -658,9 +658,13 @@ TARGET_SYSTEM_ROOT
CONFIG_LDFLAGS
RDYNAMIC
ALLOCA
HAVE_GUILE_FALSE
HAVE_GUILE_TRUE
GUILE_LIBS
GUILE_CPPFLAGS
pkg_config_prog_path
HAVE_PYTHON_FALSE
HAVE_PYTHON_TRUE
PYTHON_LIBS
PYTHON_CPPFLAGS
PYTHON_CFLAGS
@ -8686,6 +8690,14 @@ fi
if test "${have_libpython}" != no; then
HAVE_PYTHON_TRUE=
HAVE_PYTHON_FALSE='#'
else
HAVE_PYTHON_TRUE='#'
HAVE_PYTHON_FALSE=
fi
# -------------------- #
# Check for libguile. #
@ -9102,6 +9114,14 @@ else
fi
if test "${have_libguile}" != no; then
HAVE_GUILE_TRUE=
HAVE_GUILE_FALSE='#'
else
HAVE_GUILE_TRUE='#'
HAVE_GUILE_FALSE=
fi
# PR 17185, see if we can get the libgc version to see if we need
# to apply the workaround.
@ -15475,6 +15495,14 @@ if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then
as_fn_error "conditional \"GMAKE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
as_fn_error "conditional \"HAVE_PYTHON\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
as_fn_error "conditional \"HAVE_GUILE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
: ${CONFIG_STATUS=./config.status}

View File

@ -1053,6 +1053,7 @@ fi
AC_SUBST(PYTHON_CFLAGS)
AC_SUBST(PYTHON_CPPFLAGS)
AC_SUBST(PYTHON_LIBS)
AM_CONDITIONAL(HAVE_PYTHON, test "${have_libpython}" != no)
# -------------------- #
# Check for libguile. #
@ -1217,6 +1218,7 @@ else
fi
AC_SUBST(GUILE_CPPFLAGS)
AC_SUBST(GUILE_LIBS)
AM_CONDITIONAL(HAVE_GUILE, test "${have_libguile}" != no)
# PR 17185, see if we can get the libgc version to see if we need
# to apply the workaround.

View File

@ -55,7 +55,7 @@ SYSCALLS_FILES = \
PYTHON_DIR = python
PYTHON_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(PYTHON_DIR)
PYTHON_FILES = \
PYTHON_FILE_LIST = \
gdb/__init__.py \
gdb/frames.py \
gdb/FrameIterator.py \
@ -75,9 +75,12 @@ PYTHON_FILES = \
gdb/function/__init__.py \
gdb/function/strfns.py
@HAVE_PYTHON_TRUE@PYTHON_FILES = $(PYTHON_FILE_LIST)
@HAVE_PYTHON_FALSE@PYTHON_FILES =
GUILE_DIR = guile
GUILE_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(GUILE_DIR)
GUILE_FILES = \
GUILE_FILE_LIST = \
./gdb.scm \
gdb/boot.scm \
gdb/experimental.scm \
@ -86,6 +89,9 @@ GUILE_FILES = \
gdb/printing.scm \
gdb/types.scm
@HAVE_GUILE_TRUE@GUILE_FILES = $(GUILE_FILE_LIST)
@HAVE_GUILE_FALSE@GUILE_FILES =
SYSTEM_GDBINIT_DIR = system-gdbinit
SYSTEM_GDBINIT_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSTEM_GDBINIT_DIR)
SYSTEM_GDBINIT_FILES = \
@ -175,11 +181,13 @@ uninstall-syscalls:
stamp-python: Makefile $(PYTHON_FILES)
rm -rf ./$(PYTHON_DIR)
files='$(PYTHON_FILES)' ; \
for file in $$files ; do \
dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
$(INSTALL_DIR) ./$(PYTHON_DIR)/$$dir ; \
$(INSTALL_DATA) $(PYTHON_SRCDIR)/$$file ./$(PYTHON_DIR)/$$dir ; \
done
if test "x$$files" != x ; then \
for file in $$files ; do \
dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
$(INSTALL_DIR) ./$(PYTHON_DIR)/$$dir ; \
$(INSTALL_DATA) $(PYTHON_SRCDIR)/$$file ./$(PYTHON_DIR)/$$dir ; \
done ; \
fi
touch $@
.PHONY: clean-python
@ -190,33 +198,39 @@ clean-python:
.PHONY: install-python
install-python:
files='$(PYTHON_FILES)' ; \
for file in $$files ; do \
dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
$(INSTALL_DIR) $(PYTHON_INSTALL_DIR)/$$dir ; \
$(INSTALL_DATA) ./$(PYTHON_DIR)/$$file $(PYTHON_INSTALL_DIR)/$$dir ; \
done
if test "x$$files" != x ; then \
for file in $$files ; do \
dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
$(INSTALL_DIR) $(PYTHON_INSTALL_DIR)/$$dir ; \
$(INSTALL_DATA) ./$(PYTHON_DIR)/$$file $(PYTHON_INSTALL_DIR)/$$dir ; \
done ; \
fi
.PHONY: uninstall-python
uninstall-python:
files='$(PYTHON_FILES)' ; \
for file in $$files ; do \
slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
rm -f $(PYTHON_INSTALL_DIR)/$$file ; \
while test "x$$file" != "x$$slashdir" ; do \
rmdir 2>/dev/null "$(PYTHON_INSTALL_DIR)$$slashdir" ; \
file="$$slashdir" ; \
slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
done \
done
if test "x$$files" != x ; then \
for file in $$files ; do \
slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
rm -f $(PYTHON_INSTALL_DIR)/$$file ; \
while test "x$$file" != "x$$slashdir" ; do \
rmdir 2>/dev/null "$(PYTHON_INSTALL_DIR)$$slashdir" ; \
file="$$slashdir" ; \
slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
done \
done ; \
fi
stamp-guile: Makefile $(GUILE_FILES)
rm -rf ./$(GUILE_DIR)
files='$(GUILE_FILES)' ; \
for file in $$files ; do \
dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
$(INSTALL_DIR) ./$(GUILE_DIR)/$$dir ; \
$(INSTALL_DATA) $(GUILE_SRCDIR)/$$file ./$(GUILE_DIR)/$$dir ; \
done
if test "x$$files" != x ; then \
for file in $$files ; do \
dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
$(INSTALL_DIR) ./$(GUILE_DIR)/$$dir ; \
$(INSTALL_DATA) $(GUILE_SRCDIR)/$$file ./$(GUILE_DIR)/$$dir ; \
done ; \
fi
touch $@
.PHONY: clean-guile
@ -227,24 +241,28 @@ clean-guile:
.PHONY: install-guile
install-guile:
files='$(GUILE_FILES)' ; \
for file in $$files ; do \
dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
$(INSTALL_DIR) $(GUILE_INSTALL_DIR)/$$dir ; \
$(INSTALL_DATA) ./$(GUILE_DIR)/$$file $(GUILE_INSTALL_DIR)/$$dir ; \
done
if test "x$$files" != x ; then \
for file in $$files ; do \
dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
$(INSTALL_DIR) $(GUILE_INSTALL_DIR)/$$dir ; \
$(INSTALL_DATA) ./$(GUILE_DIR)/$$file $(GUILE_INSTALL_DIR)/$$dir ; \
done ; \
fi
.PHONY: uninstall-guile
uninstall-guile:
files='$(GUILE_FILES)' ; \
for file in $$files ; do \
slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
rm -f $(GUILE_INSTALL_DIR)/$$file ; \
while test "x$$file" != "x$$slashdir" ; do \
rmdir 2>/dev/null "$(GUILE_INSTALL_DIR)$$slashdir" ; \
file="$$slashdir" ; \
slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
done \
done
if test "x$$files" != x ; then \
for file in $$files ; do \
slashdir=`echo "/$$file" | sed 's,/[^/]*$$,,'` ; \
rm -f $(GUILE_INSTALL_DIR)/$$file ; \
while test "x$$file" != "x$$slashdir" ; do \
rmdir 2>/dev/null "$(GUILE_INSTALL_DIR)$$slashdir" ; \
file="$$slashdir" ; \
slashdir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \
done \
done ; \
fi
stamp-system-gdbinit: Makefile $(SYSTEM_GDBINIT_FILES)
rm -rf ./$(SYSTEM_GDBINIT_DIR)