Applied the DESTDIR patch provided by Enrico Weigelt.

This is a modified form of the patches included with Patch # 779334
and Bug # 985235.
This commit is contained in:
Karl Waclawek 2004-12-17 18:08:08 +00:00
parent 4989a3eece
commit 8fcf7de86f

View File

@ -44,6 +44,9 @@ MANFILE = $(srcdir)/doc/xmlwf.1
APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h
LIBRARY = libexpat.la
ifndef INSTALL_ROOT
INSTALL_ROOT=$(DESTDIR)
endif
default: buildlib xmlwf/xmlwf
@ -73,22 +76,22 @@ check: tests/runtests
tests/runtests
install: xmlwf/xmlwf installlib
$(mkinstalldirs) $(bindir) $(man1dir)
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf
$(INSTALL_DATA) $(MANFILE) $(man1dir)
$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) $(INSTALL_ROOT)$(man1dir)
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(INSTALL_ROOT)$(bindir)/xmlwf
$(INSTALL_DATA) $(MANFILE) $(INSTALL_ROOT)$(man1dir)
installlib: $(LIBRARY) $(APIHEADER)
$(mkinstalldirs) $(libdir) $(includedir)
$(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(libdir)/$(LIBRARY)
for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(includedir) ; done
$(mkinstalldirs) $(INSTALL_ROOT)$(libdir) $(INSTALL_ROOT)$(includedir)
$(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(INSTALL_ROOT)$(libdir)/$(LIBRARY)
for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(INSTALL_ROOT)$(includedir) ; done
uninstall: uninstalllib
$(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf
rm -f $(man1dir)/xmlwf.1
$(LIBTOOL) --mode=uninstall rm -f $(INSTALL_ROOT)$(bindir)/xmlwf
rm -f $(INSTALL_ROOT)$(man1dir)/xmlwf.1
uninstalllib:
$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(LIBRARY)
rm -f $(includedir)/$(APIHEADER)
$(LIBTOOL) --mode=uninstall rm -f $(INSTALL_ROOT)$(libdir)/$(LIBRARY)
rm -f $(INSTALL_ROOT)$(includedir)/$(APIHEADER)
# for VPATH builds (invoked by configure)
mkdir-init: