All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Build info documentation
@ 2009-09-15  5:20 Colin Watson
  2009-09-19 21:14 ` Robert Millan
  2009-09-22  7:49 ` Vladimir 'phcoder' Serbinenko
  0 siblings, 2 replies; 4+ messages in thread
From: Colin Watson @ 2009-09-15  5:20 UTC (permalink / raw)
  To: grub-devel

I'm not quite sure I've got everything right here, so please review.

It seemed much simpler to add everything to Makefile.in than to go
through conf/*.rmk for this, as there's no platform-specific work to be
done here.

2009-09-15  Colin Watson  <cjwatson@ubuntu.com>

	Build info documentation.  Some code borrowed from Automake.

	* configure.ac: Check for makeinfo.
	* Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
	(MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
	docs/version.texi.
	(MOSTLYCLEANFILES): Add vti.tmp.
	(docs/version.texi, docs/stamp-vti): Update automatically.
	(docs/grub.info): Build info documentation.  Use --force and ignore
	errors for now.
	(all-local): Add $(INFOS).
	(install-local): Install info files.
	(uninstall): Uninstall info files.
	* docs/version.texi: Remove from revision control.  This file is
	automatically generated on build now.
	* gendistlist.sh: Add `*.info'.

Index: configure.ac
===================================================================
--- configure.ac	(revision 2596)
+++ configure.ac	(working copy)
@@ -147,6 +147,7 @@ AC_PROG_MAKE_SET
 
 # These are not a "must".
 AC_PATH_PROG(RUBY, ruby)
+AC_PATH_PROG(MAKEINFO, makeinfo)
 
 #
 # Checks for host programs.
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 2596)
+++ Makefile.in	(working copy)
@@ -86,6 +86,10 @@ OBJCOPY = @OBJCOPY@
 STRIP = @STRIP@
 NM = @NM@
 RUBY = @RUBY@
+MAKEINFO = @MAKEINFO@
+ifeq (, $(MAKEINFO))
+MAKEINFO = true
+endif
 HELP2MAN = @HELP2MAN@
 ifeq (, $(HELP2MAN))
 HELP2MAN = true
@@ -122,6 +126,7 @@ PKGDATA = $(pkgdata_DATA)
 PROGRAMS = $(bin_UTILITIES) $(sbin_UTILITIES)
 SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) $(grub-mkconfig_SCRIPTS) \
 	$(lib_SCRIPTS)
+INFOS = $(info_INFOS)
 
 CLEANFILES =
 MOSTLYCLEANFILES =
@@ -129,7 +134,7 @@ DISTCLEANFILES = config.status config.cache config
 	Makefile stamp-h include/grub/cpu include/grub/machine \
 	gensymlist.sh genkernsyms.sh build_env.mk
 MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES)) \
-	$(srcdir)/DISTLIST $(srcdir)/config.h.in $(srcdir)/stamp-h.in
+	$(srcdir)/DISTLIST $(srcdir)/config.h.in $(srcdir)/stamp-h.in $(INFOS)
 
 # The default target.
 all: all-local
@@ -168,6 +173,27 @@ handler.lst: $(HANDLERFILES)
 parttool.lst: $(PARTTOOLFILES)
 	cat $^ /dev/null | sort | uniq > $@
 
+info_INFOS += docs/grub.info
+
+MOSTLYCLEANFILES += vti.tmp
+MAINTAINER_CLEANFILES += docs/stamp-vti docs/version.texi
+docs/version.texi: docs/stamp-vti
+docs/stamp-vti: docs/grub.texi
+	(set `$(SHELL) $(srcdir)/docs/mdate-sh $<`; \
+	echo "@set UPDATED $$1 $$2 $$3"; \
+	echo "@set UPDATED-MONTH $$2 $$3"; \
+	echo "@set EDITION $(PACKAGE_VERSION)"; \
+	echo "@set VERSION $(PACKAGE_VERSION)") > vti.tmp
+	@cmp -s vti.tmp $(srcdir)/docs/version.texi \
+	  || (echo "Updating $(srcdir)/docs/version.texi"; \
+	      cp vti.tmp $(srcdir)/docs/version.texi)
+	-@rm -f vti.tmp
+	@cp $(srcdir)/docs/version.texi $@
+
+# Use --force until such time as the documentation is cleaned up.
+docs/grub.info: docs/grub.texi docs/version.texi docs/fdl.texi
+	$(MAKEINFO) --no-split --force $< -o $@ || :
+
 ifeq (, $(UNIFONT_BDF))
 else
 
@@ -207,7 +233,7 @@ pkglib_BUILDDIR += config.h grub_script.tab.h
 include_DATA += $(shell find $(srcdir)/include -name \*.h | sed -e "s,^$(srcdir)/,,g") \
 	include/grub/cpu include/grub/machine
 
-all-local: $(PROGRAMS) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(MKFILES)
+all-local: $(PROGRAMS) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(INFOS) $(MKFILES)
 
 install: install-local
 
@@ -285,6 +311,17 @@ install-local: all
 	  dest="`echo $$file | sed 's,.*/,,'`"; \
 	  $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \
 	done
+	$(SHELL) $(mkinstalldirs) $(DESTDIR)$(infodir)
+	@list='$(info_INFOS)'; \
+	for file in $$list; do \
+	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
+	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(infodir); \
+	  if (install-info --version && \
+	       install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+	    install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$dest" || :; \
+	  fi; \
+	done
 
 install-strip:
 	$(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" install
@@ -325,6 +362,19 @@ uninstall:
 	  echo rm -f $(DESTDIR)$(libdir)/$$dest; \
 	  rm -f $(DESTDIR)$(libdir)/grub/$$dest; \
 	done
+	@list='$(info_INFOS)'; \
+	for file in $$list; do \
+	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  if (install-info --version && \
+	       install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+	    if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$dest"; then \
+	      :; \
+	    else \
+	      test ! -f "$(DESTDIR)$(infodir)/$$dest" || exit 1; \
+	    fi; \
+	  fi; \
+	  rm -f $(DESTDIR)$(infodir)/$$dest; \
+	done
 
 clean: $(CLEAN_IMAGE_TARGETS) $(CLEAN_MODULE_TARGETS) $(CLEAN_UTILITY_TARGETS)
 	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)

Property changes on: docs
___________________________________________________________________
Added: svn:ignore
   + *.info
stamp-vti
version.texi


Index: docs/version.texi
===================================================================
--- docs/version.texi	(revision 2596)
+++ docs/version.texi	(working copy)
@@ -1,4 +0,0 @@
-@set UPDATED 7 Ago 2009
-@set UPDATED-MONTH Ago 2009
-@set EDITION 1.97~beta3
-@set VERSION 1.97~beta3
Index: gendistlist.sh
===================================================================
--- gendistlist.sh	(revision 2596)
+++ gendistlist.sh	(working copy)
@@ -38,7 +38,8 @@ for dir in $DISTDIRS; do
   for d in `find $dir -type d | sed '/\/\.svn$/d;\/\.svn\//d' | sort`; do
     find $d -maxdepth 1 -name '*.[chSy]' -o -name '*.mk' -o -name '*.rmk' \
       -o -name '*.rb' -o -name '*.in' -o -name '*.tex' -o -name '*.texi' \
-      -o -name 'grub.cfg' -o -name 'README' -o -name '*.sc' -o -name 'mdate-sh' \
-      -o -name '*.sh' -o -name 'grub-dumpdevtree' -o -name '*.lua' | sort
+      -o -name '*.info' -o -name 'grub.cfg' -o -name 'README' \
+      -o -name '*.sc' -o -name 'mdate-sh' -o -name '*.sh' \
+      -o -name 'grub-dumpdevtree' -o -name '*.lua' | sort
   done
 done

-- 
Colin Watson                                       [cjwatson@ubuntu.com]



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Build info documentation
  2009-09-15  5:20 [PATCH] Build info documentation Colin Watson
@ 2009-09-19 21:14 ` Robert Millan
  2009-09-22  7:49 ` Vladimir 'phcoder' Serbinenko
  1 sibling, 0 replies; 4+ messages in thread
From: Robert Millan @ 2009-09-19 21:14 UTC (permalink / raw)
  To: The development of GRUB 2; +Cc: Jordi Mallach


Excellent.  This was much needed.

On Tue, Sep 15, 2009 at 06:20:13AM +0100, Colin Watson wrote:
> I'm not quite sure I've got everything right here, so please review.

My knowledge of texinfo is very limited.  Perhaps Jordi will comment on this.

In any case, if nobody objects to it during the weekend, you can commit.

> It seemed much simpler to add everything to Makefile.in than to go
> through conf/*.rmk for this, as there's no platform-specific work to be
> done here.

Seems fine.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Build info documentation
  2009-09-15  5:20 [PATCH] Build info documentation Colin Watson
  2009-09-19 21:14 ` Robert Millan
@ 2009-09-22  7:49 ` Vladimir 'phcoder' Serbinenko
  2009-09-23 17:20   ` Colin Watson
  1 sibling, 1 reply; 4+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-09-22  7:49 UTC (permalink / raw)
  To: The development of GRUB 2


Colin Watson wrote:
> I'm not quite sure I've got everything right here, so please review.
>
> It seemed much simpler to add everything to Makefile.in than to go
> through conf/*.rmk for this, as there's no platform-specific work to be
> done here.
>
> 2009-09-15  Colin Watson  <cjwatson@ubuntu.com>
>
> 	Build info documentation.  Some code borrowed from Automake.
>
> 	* configure.ac: Check for makeinfo.
> 	* Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
> 	(MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
> 	docs/version.texi.
> 	(MOSTLYCLEANFILES): Add vti.tmp.
> 	(docs/version.texi, docs/stamp-vti): Update automatically.
>   
This part has broken external compile because in extern folder "docs"
may not be present
> 	(docs/grub.info): Build info documentation.  Use --force and ignore
> 	errors for now.
> 	(all-local): Add $(INFOS).
> 	(install-local): Install info files.
> 	(uninstall): Uninstall info files.
> 	* docs/version.texi: Remove from revision control.  This file is
> 	automatically generated on build now.
> 	* gendistlist.sh: Add `*.info'.
>
> Index: configure.ac
> ===================================================================
> --- configure.ac	(revision 2596)
> +++ configure.ac	(working copy)
> @@ -147,6 +147,7 @@ AC_PROG_MAKE_SET
>  
>  # These are not a "must".
>  AC_PATH_PROG(RUBY, ruby)
> +AC_PATH_PROG(MAKEINFO, makeinfo)
>  
>  #
>  # Checks for host programs.
> Index: Makefile.in
> ===================================================================
> --- Makefile.in	(revision 2596)
> +++ Makefile.in	(working copy)
> @@ -86,6 +86,10 @@ OBJCOPY = @OBJCOPY@
>  STRIP = @STRIP@
>  NM = @NM@
>  RUBY = @RUBY@
> +MAKEINFO = @MAKEINFO@
> +ifeq (, $(MAKEINFO))
> +MAKEINFO = true
> +endif
>  HELP2MAN = @HELP2MAN@
>  ifeq (, $(HELP2MAN))
>  HELP2MAN = true
> @@ -122,6 +126,7 @@ PKGDATA = $(pkgdata_DATA)
>  PROGRAMS = $(bin_UTILITIES) $(sbin_UTILITIES)
>  SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) $(grub-mkconfig_SCRIPTS) \
>  	$(lib_SCRIPTS)
> +INFOS = $(info_INFOS)
>  
>  CLEANFILES =
>  MOSTLYCLEANFILES =
> @@ -129,7 +134,7 @@ DISTCLEANFILES = config.status config.cache config
>  	Makefile stamp-h include/grub/cpu include/grub/machine \
>  	gensymlist.sh genkernsyms.sh build_env.mk
>  MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES)) \
> -	$(srcdir)/DISTLIST $(srcdir)/config.h.in $(srcdir)/stamp-h.in
> +	$(srcdir)/DISTLIST $(srcdir)/config.h.in $(srcdir)/stamp-h.in $(INFOS)
>  
>  # The default target.
>  all: all-local
> @@ -168,6 +173,27 @@ handler.lst: $(HANDLERFILES)
>  parttool.lst: $(PARTTOOLFILES)
>  	cat $^ /dev/null | sort | uniq > $@
>  
> +info_INFOS += docs/grub.info
> +
> +MOSTLYCLEANFILES += vti.tmp
> +MAINTAINER_CLEANFILES += docs/stamp-vti docs/version.texi
> +docs/version.texi: docs/stamp-vti
> +docs/stamp-vti: docs/grub.texi
> +	(set `$(SHELL) $(srcdir)/docs/mdate-sh $<`; \
> +	echo "@set UPDATED $$1 $$2 $$3"; \
> +	echo "@set UPDATED-MONTH $$2 $$3"; \
> +	echo "@set EDITION $(PACKAGE_VERSION)"; \
> +	echo "@set VERSION $(PACKAGE_VERSION)") > vti.tmp
> +	@cmp -s vti.tmp $(srcdir)/docs/version.texi \
> +	  || (echo "Updating $(srcdir)/docs/version.texi"; \
> +	      cp vti.tmp $(srcdir)/docs/version.texi)
> +	-@rm -f vti.tmp
> +	@cp $(srcdir)/docs/version.texi $@
> +
> +# Use --force until such time as the documentation is cleaned up.
> +docs/grub.info: docs/grub.texi docs/version.texi docs/fdl.texi
> +	$(MAKEINFO) --no-split --force $< -o $@ || :
> +
>  ifeq (, $(UNIFONT_BDF))
>  else
>  
> @@ -207,7 +233,7 @@ pkglib_BUILDDIR += config.h grub_script.tab.h
>  include_DATA += $(shell find $(srcdir)/include -name \*.h | sed -e "s,^$(srcdir)/,,g") \
>  	include/grub/cpu include/grub/machine
>  
> -all-local: $(PROGRAMS) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(MKFILES)
> +all-local: $(PROGRAMS) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(INFOS) $(MKFILES)
>  
>  install: install-local
>  
> @@ -285,6 +311,17 @@ install-local: all
>  	  dest="`echo $$file | sed 's,.*/,,'`"; \
>  	  $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \
>  	done
> +	$(SHELL) $(mkinstalldirs) $(DESTDIR)$(infodir)
> +	@list='$(info_INFOS)'; \
> +	for file in $$list; do \
> +	  if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
> +	  dest="`echo $$file | sed 's,.*/,,'`"; \
> +	  $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(infodir); \
> +	  if (install-info --version && \
> +	       install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
> +	    install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$dest" || :; \
> +	  fi; \
> +	done
>  
>  install-strip:
>  	$(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" install
> @@ -325,6 +362,19 @@ uninstall:
>  	  echo rm -f $(DESTDIR)$(libdir)/$$dest; \
>  	  rm -f $(DESTDIR)$(libdir)/grub/$$dest; \
>  	done
> +	@list='$(info_INFOS)'; \
> +	for file in $$list; do \
> +	  dest="`echo $$file | sed 's,.*/,,'`"; \
> +	  if (install-info --version && \
> +	       install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
> +	    if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$dest"; then \
> +	      :; \
> +	    else \
> +	      test ! -f "$(DESTDIR)$(infodir)/$$dest" || exit 1; \
> +	    fi; \
> +	  fi; \
> +	  rm -f $(DESTDIR)$(infodir)/$$dest; \
> +	done
>  
>  clean: $(CLEAN_IMAGE_TARGETS) $(CLEAN_MODULE_TARGETS) $(CLEAN_UTILITY_TARGETS)
>  	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
>
> Property changes on: docs
> ___________________________________________________________________
> Added: svn:ignore
>    + *.info
> stamp-vti
> version.texi
>
>
> Index: docs/version.texi
> ===================================================================
> --- docs/version.texi	(revision 2596)
> +++ docs/version.texi	(working copy)
> @@ -1,4 +0,0 @@
> -@set UPDATED 7 Ago 2009
> -@set UPDATED-MONTH Ago 2009
> -@set EDITION 1.97~beta3
> -@set VERSION 1.97~beta3
> Index: gendistlist.sh
> ===================================================================
> --- gendistlist.sh	(revision 2596)
> +++ gendistlist.sh	(working copy)
> @@ -38,7 +38,8 @@ for dir in $DISTDIRS; do
>    for d in `find $dir -type d | sed '/\/\.svn$/d;\/\.svn\//d' | sort`; do
>      find $d -maxdepth 1 -name '*.[chSy]' -o -name '*.mk' -o -name '*.rmk' \
>        -o -name '*.rb' -o -name '*.in' -o -name '*.tex' -o -name '*.texi' \
> -      -o -name 'grub.cfg' -o -name 'README' -o -name '*.sc' -o -name 'mdate-sh' \
> -      -o -name '*.sh' -o -name 'grub-dumpdevtree' -o -name '*.lua' | sort
> +      -o -name '*.info' -o -name 'grub.cfg' -o -name 'README' \
> +      -o -name '*.sc' -o -name 'mdate-sh' -o -name '*.sh' \
> +      -o -name 'grub-dumpdevtree' -o -name '*.lua' | sort
>    done
>  done
>
>   




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Build info documentation
  2009-09-22  7:49 ` Vladimir 'phcoder' Serbinenko
@ 2009-09-23 17:20   ` Colin Watson
  0 siblings, 0 replies; 4+ messages in thread
From: Colin Watson @ 2009-09-23 17:20 UTC (permalink / raw)
  To: The development of GRUB 2

On Tue, Sep 22, 2009 at 09:49:23AM +0200, Vladimir 'phcoder' Serbinenko wrote:
> Colin Watson wrote:
> > 	* configure.ac: Check for makeinfo.
> > 	* Makefile.in (MAKEINFO, INFOS, info_INFOS): New variables.
> > 	(MAINTAINER_CLEANFILES): Add $(INFOS), docs/stamp-vti, and
> > 	docs/version.texi.
> > 	(MOSTLYCLEANFILES): Add vti.tmp.
> > 	(docs/version.texi, docs/stamp-vti): Update automatically.
> 
> This part has broken external compile because in extern folder "docs"
> may not be present

Sorry about that. This should be fixed now.

-- 
Colin Watson                                       [cjwatson@ubuntu.com]



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-23 17:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-15  5:20 [PATCH] Build info documentation Colin Watson
2009-09-19 21:14 ` Robert Millan
2009-09-22  7:49 ` Vladimir 'phcoder' Serbinenko
2009-09-23 17:20   ` Colin Watson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.