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 \
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 \
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 = \
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
.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
.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)