[Expat-discuss] Re: DESTDIR patches

Enrico Weigelt weigelt at metux.de
Fri Dec 17 18:40:34 CET 2004


* Karl Waclawek <karl at waclawek.net> wrote:

> I was talking about your patch to Makefile.in only.
> 
> The rest is another issue. Can you figure out what is wrong with it?

Here's a new patch against cvs Makefile.in


cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact at metux.de
  cellphone: +49 174 7066481
---------------------------------------------------------------------
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------
-------------- next part --------------
diff -ruN expat.orig/Makefile.in expat/Makefile.in
--- expat.orig/Makefile.in	2004-12-17 18:30:25.000000000 +0100
+++ expat/Makefile.in	2004-12-17 18:34:40.000000000 +0100
@@ -44,6 +44,9 @@
 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 @@
 	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:


More information about the Expat-discuss mailing list