This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add install-html target to libiberty.


This adds the install-html target to libiberty.
No regressions on i686-pc-linux-gnu.

Ok to checkin?

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716

libiberty/

2006-04-06  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in: Add install-html, install-html-am, and
	install-html-recursive targets. Define mkdir_p and 
	NORMAL_INSTALL. 
	* configure.ac: AC_SUBST datarootdir, docdir, htmldir.
	* configure: Regenerate.
	* testsuite/Makefile.in: Add install-html and html targets.

Index: libiberty/configure.ac
===================================================================
--- libiberty/configure.ac	(revision 112738)
+++ libiberty/configure.ac	(working copy)
@@ -639,6 +639,11 @@ for l in x $LIBOBJS; do
 done
 LIBOBJS="$L"
 
+dnl Required by html and install-html
+AC_SUBST(datarootdir)
+AC_SUBST(docdir)
+AC_SUBST(htmldir)
+
 # We need multilib support, but only if configuring for the target.
 AC_CONFIG_FILES([Makefile testsuite/Makefile])
 AC_CONFIG_COMMANDS([default],
Index: libiberty/testsuite/Makefile.in
===================================================================
--- libiberty/testsuite/Makefile.in	(revision 112738)
+++ libiberty/testsuite/Makefile.in	(working copy)
@@ -1,6 +1,6 @@
 #
 # Makefile
-#   Copyright (C) 1999, 2002
+#   Copyright (C) 1999, 2002, 2006
 #   Free Software Foundation
 #
 # This file is part of the libiberty library.
@@ -73,7 +73,7 @@ test-expandargv: $(srcdir)/test-expandar
 		$(srcdir)/test-expandargv.c ../libiberty.a
 
 # Standard (either GNU or Cygnus) rules we don't use.
-info install-info clean-info dvi install etags tags installcheck:
+html install-html info install-info clean-info dvi install etags tags installcheck:
 
 # The standard clean rules.
 mostlyclean:
Index: libiberty/Makefile.in
===================================================================
--- libiberty/Makefile.in	(revision 112738)
+++ libiberty/Makefile.in	(working copy)
@@ -1,6 +1,6 @@
 #
 # Makefile
-#   Copyright (C) 1990, 91-99, 2000, 2001, 2002, 2003, 2004, 2005
+#   Copyright (C) 1990, 91-99, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 #   Free Software Foundation
 #
 # This file is part of the libiberty library.
@@ -245,7 +245,62 @@ info: libiberty.info info-subdir
 install-info: install-info-subdir
 clean-info: clean-info-subdir
 dvi: libiberty.dvi dvi-subdir
-html: libiberty.html
+
+# html, install-html targets
+HTMLS = libiberty.html
+
+html: $(HTMLS)
+
+.PHONY: install-html install-html-am install-html-recursive
+
+NORMAL_INSTALL = :
+mkdir_p = mkdir -p --
+ 
+html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+
+install-html: install-html-recursive  install-html-am
+
+install-html-am: $(HTMLS)
+	@$(NORMAL_INSTALL)
+	test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
+	@list='$(HTMLS)'; for p in $$list; do \
+	  if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+	  f=$(html__strip_dir) \
+	  if test -d "$$d$$p"; then \
+	    echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+	    echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+	  else \
+	    echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+	  fi; \
+	done
+
+install-html-recursive:
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
 
 TEXISRC = \
 	$(srcdir)/libiberty.texi \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]