This makes it possible to install the docs to a DESTDIR and puts the html-docs in the right location (/usr/share/doc/log4cpp-1.0 instead of /usr/doc/log4cpp-1.0)
For those who want to run patch only and do not wish to run automake, this is the version which patches all necessary files. Also fixes a small cosmetic type (omission of whitespace in the output to the user).
Common subdirectories: ../log4cpp-1.0.orig/doc/html and ./doc/html
diff -u ../log4cpp-1.0.orig/doc/Makefile.am ./doc/Makefile.am
--- ../log4cpp-1.0.orig/doc/Makefile.am 2007-09-03 11:50:42.000000000 +0200
+++ ./doc/Makefile.am 2009-05-01 22:43:15.000000000 +0200
@@ -1,7 +1,7 @@
SUBDIRS = html
This version supersede my previous one, and includes some subtle changes:
cp uses -pR instead of -r, to preserve timestamps.
rm does not require -f since $(RM) already expands to rm -f.
Common subdirectories: ../log4cpp-1.0.orig/doc/html and doc/html
diff -u ../log4cpp-1.0.orig/doc/Makefile.am doc/Makefile.am
--- ../log4cpp-1.0.orig/doc/Makefile.am 2007-09-03 11:50:42.000000000 +0200
+++ doc/Makefile.am 2009-05-09 22:45:45.000000000 +0200
@@ -1,7 +1,7 @@
SUBDIRS = html
1.0-doc_install_path.patch
For those who want to run patch only and do not wish to run automake, this is the version which patches all necessary files. Also fixes a small cosmetic type (omission of whitespace in the output to the user).
Common subdirectories: ../log4cpp-1.0.orig/doc/html and ./doc/html
diff -u ../log4cpp-1.0.orig/doc/Makefile.am ./doc/Makefile.am
--- ../log4cpp-1.0.orig/doc/Makefile.am 2007-09-03 11:50:42.000000000 +0200
+++ ./doc/Makefile.am 2009-05-01 22:43:15.000000000 +0200
@@ -1,7 +1,7 @@
SUBDIRS = html
man3dir = $(mandir)/man3
-docdir = $(prefix)/doc/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
+docdir = $(prefix)/share/doc/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
EXTRA_DIST = \ mainPage.txt
@@ -22,18 +22,18 @@
install-data-local:
- $(mkinstalldirs) $(man3dir)
+ $(mkinstalldirs) $(DESTDIR)/$(man3dir)
@for i in ./man/man3/log4cpp.3 ./man/man3/log4cpp_*.3; do \ inst=`basename $$i | sed 's/_/::/g'`; \ - echo "$(INSTALL_DATA) $$i$(man3dir)/$$inst"; \ - $(INSTALL_DATA) $$i $(man3dir)/$$inst; \ + echo "$(INSTALL_DATA) $$i $(man3dir)/$$inst"; \ + $(INSTALL_DATA) $$i $(DESTDIR)/$(man3dir)/$$inst; \ done
- $(mkinstalldirs) $(docdir)
- cp -r html/. $(docdir)
- $(RM) -r -f $(docdir)/CVS \ - $(docdir)/Makefile.am \ - $(docdir)/Makefile.in \ - $(docdir)/Makefile
+ $(mkinstalldirs) $(DESTDIR)/$(docdir)
+ cp -r html/. $(DESTDIR)/$(docdir)
+ $(RM) -r -f $(DESTDIR)/$(docdir)/CVS \ + $(DESTDIR)/$(docdir)/Makefile.am \ + $(DESTDIR)/$(docdir)/Makefile.in \ + $(DESTDIR)/$(docdir)/Makefile
uninstall-local:
$(RM) $(man3dir)/log4cpp.3
diff -u ../log4cpp-1.0.orig/doc/Makefile.in ./doc/Makefile.in
--- ../log4cpp-1.0.orig/doc/Makefile.in 2007-09-03 11:53:35.000000000 +0200
+++ ./doc/Makefile.in 2009-05-01 22:58:49.000000000 +0200
@@ -154,7 +154,7 @@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
-docdir = $(prefix)/doc/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
+docdir = $(prefix)/share/doc/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
dvidir = @dvidir@
enable_dot = @enable_dot@
enable_html_docs = @enable_html_docs@
@@ -525,18 +525,18 @@
ln -s ./latex/refman.pdf @PACKAGE_TARNAME@.pdf
install-data-local:
- $(mkinstalldirs) $(man3dir)
+ $(mkinstalldirs) $(DESTDIR)/$(man3dir)
@for i in ./man/man3/log4cpp.3 ./man/man3/log4cpp_*.3; do \ inst=`basename $$i | sed 's/_/::/g'`; \ - echo "$(INSTALL_DATA) $$i$(man3dir)/$$inst"; \ - $(INSTALL_DATA) $$i $(man3dir)/$$inst; \ + echo "$(INSTALL_DATA) $$i $(DESTDIR)/$(man3dir)/$$inst"; \ + $(INSTALL_DATA) $$i $(DESTDIR)/$(man3dir)/$$inst; \ done
- $(mkinstalldirs) $(docdir)
- cp -r html/. $(docdir)
- $(RM) -r -f $(docdir)/CVS \ - $(docdir)/Makefile.am \ - $(docdir)/Makefile.in \ - $(docdir)/Makefile
+ $(mkinstalldirs) $(DESTDIR)/$(docdir)
+ cp -r html/. $(DESTDIR)/$(docdir)
+ $(RM) -r -f $(DESTDIR)/$(docdir)/CVS \ + $(DESTDIR)/$(docdir)/Makefile.am \ + $(DESTDIR)/$(docdir)/Makefile.in \ + $(DESTDIR)/$(docdir)/Makefile
uninstall-local:
$(RM) $(man3dir)/log4cpp.3
This version supersede my previous one, and includes some subtle changes:
cp uses -pR instead of -r, to preserve timestamps.
rm does not require -f since $(RM) already expands to rm -f.
Common subdirectories: ../log4cpp-1.0.orig/doc/html and doc/html
diff -u ../log4cpp-1.0.orig/doc/Makefile.am doc/Makefile.am
--- ../log4cpp-1.0.orig/doc/Makefile.am 2007-09-03 11:50:42.000000000 +0200
+++ doc/Makefile.am 2009-05-09 22:45:45.000000000 +0200
@@ -1,7 +1,7 @@
SUBDIRS = html
man3dir = $(mandir)/man3
-docdir = $(prefix)/doc/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
+docdir = $(prefix)/share/doc/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
EXTRA_DIST = \ mainPage.txt
@@ -22,23 +22,23 @@
install-data-local:
- $(mkinstalldirs) $(man3dir)
+ $(mkinstalldirs) $(DESTDIR)/$(man3dir)
@for i in ./man/man3/log4cpp.3 ./man/man3/log4cpp_*.3; do \ inst=`basename $$i | sed 's/_/::/g'`; \ - echo "$(INSTALL_DATA) $$i$(man3dir)/$$inst"; \ - $(INSTALL_DATA) $$i $(man3dir)/$$inst; \ + echo "$(INSTALL_DATA) $$i $(man3dir)/$$inst"; \ + $(INSTALL_DATA) $$i $(DESTDIR)/$(man3dir)/$$inst; \ done
- $(mkinstalldirs) $(docdir)
- cp -r html/. $(docdir)
- $(RM) -r -f $(docdir)/CVS \ - $(docdir)/Makefile.am \ - $(docdir)/Makefile.in \ - $(docdir)/Makefile
+ $(mkinstalldirs) $(DESTDIR)/$(docdir)
+ cp -pR html/. $(DESTDIR)/$(docdir)
+ $(RM) -r $(DESTDIR)/$(docdir)/CVS \ + $(DESTDIR)/$(docdir)/Makefile.am \ + $(DESTDIR)/$(docdir)/Makefile.in \ + $(DESTDIR)/$(docdir)/Makefile
uninstall-local:
$(RM) $(man3dir)/log4cpp.3
$(RM) $(man3dir)/log4cpp::*.3
- $(RM) -r -f $(docdir)
+ $(RM) -r $(docdir)
clean-local:
$(RM) -r latex
diff -u ../log4cpp-1.0.orig/doc/Makefile.in doc/Makefile.in
--- ../log4cpp-1.0.orig/doc/Makefile.in 2007-09-03 11:53:35.000000000 +0200
+++ doc/Makefile.in 2009-05-09 22:46:15.000000000 +0200
@@ -154,7 +154,7 @@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
-docdir = $(prefix)/doc/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
+docdir = $(prefix)/share/doc/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
dvidir = @dvidir@
enable_dot = @enable_dot@
enable_html_docs = @enable_html_docs@
@@ -525,23 +525,23 @@
ln -s ./latex/refman.pdf @PACKAGE_TARNAME@.pdf
install-data-local:
- $(mkinstalldirs) $(man3dir)
+ $(mkinstalldirs) $(DESTDIR)/$(man3dir)
@for i in ./man/man3/log4cpp.3 ./man/man3/log4cpp_*.3; do \ inst=`basename $$i | sed 's/_/::/g'`; \ - echo "$(INSTALL_DATA) $$i$(man3dir)/$$inst"; \ - $(INSTALL_DATA) $$i $(man3dir)/$$inst; \ + echo "$(INSTALL_DATA) $$i $(DESTDIR)/$(man3dir)/$$inst"; \ + $(INSTALL_DATA) $$i $(DESTDIR)/$(man3dir)/$$inst; \ done
- $(mkinstalldirs) $(docdir)
- cp -r html/. $(docdir)
- $(RM) -r -f $(docdir)/CVS \ - $(docdir)/Makefile.am \ - $(docdir)/Makefile.in \ - $(docdir)/Makefile
+ $(mkinstalldirs) $(DESTDIR)/$(docdir)
+ cp -pR html/. $(DESTDIR)/$(docdir)
+ $(RM) -r $(DESTDIR)/$(docdir)/CVS \ + $(DESTDIR)/$(docdir)/Makefile.am \ + $(DESTDIR)/$(docdir)/Makefile.in \ + $(DESTDIR)/$(docdir)/Makefile
uninstall-local:
$(RM) $(man3dir)/log4cpp.3
$(RM) $(man3dir)/log4cpp::*.3
- $(RM) -r -f $(docdir)
+ $(RM) -r $(docdir)
clean-local:
$(RM) -r latex