[rtems commit] doc: Build html into subdirectory (fix make clean)

Joel Sherrill joel at rtems.org
Tue Feb 26 18:48:17 UTC 2013


Module:    rtems
Branch:    master
Commit:    83b555fd4dadee3cf8649a1092b63778b1abbead
Changeset: http://git.rtems.org/rtems/commit/?id=83b555fd4dadee3cf8649a1092b63778b1abbead

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Tue Feb 26 12:49:29 2013 -0600

doc: Build html into subdirectory (fix make clean)

Building with a document specific prefix will require coding
in both texi2any and texi2html. It is easier to build into
a directory (e.g. $(PROJECT)/). This also fixes "make clean"
which was broken.

---

 doc/main.am    |    4 ++--
 doc/project.am |   14 +++++++++-----
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/doc/main.am b/doc/main.am
index 13c58a3..efa80a1 100644
--- a/doc/main.am
+++ b/doc/main.am
@@ -8,13 +8,13 @@ endif
 # file naming consistent.
 TEXI2HTML_ARGS=\
 -D use-html --split node --node-files \
--o ./ \
+-o $(PROJECT)/ \
 --top-file index.html \
 --init-file=$(top_builddir)/texi2html_init \
 -I $(srcdir) -I $(top_srcdir) -I $(top_builddir) -I .
 
 TEXI2ANY_ARGS=\
 --html -D use-html --split node \
--o ./ \
+-o $(PROJECT)/ \
 --init-file=$(top_builddir)/texi2any_init \
 -I $(srcdir) -I $(top_srcdir) -I $(top_builddir) -I .
diff --git a/doc/project.am b/doc/project.am
index b84ca3a..0f471df 100644
--- a/doc/project.am
+++ b/doc/project.am
@@ -44,19 +44,17 @@ if USE_HTML
 
 html_project_DATA =
 
-MOSTLYCLEANFILES += $(PROJECT)*.html
-html_project_DATA += *.html
+MOSTLYCLEANFILES += $(PROJECT)/*.html
+html_project_DATA += $(PROJECT)/*.html
 
 # Share as much as possible between the texi2html and texi2any rules
-*.html: $(PROJECT).texi $($(PROJECT)_TEXINFOS)
+$(PROJECT)/*.html: $(PROJECT).texi $($(PROJECT)_TEXINFOS)
 	rm -rf $(PROJECT).html
 if USE_TEXI2HTML
 	$(TEXI2HTML) $(TEXI2HTML_ARGS) --menu $< $<
-	-rm -rf $(PROJECT)
 endif # USE_TEXI2HTML
 if USE_TEXI2ANY
 	$(TEXI2ANY) $(TEXI2ANY_ARGS) $<
-	-rm -rf $(PROJECT)
 endif # USE_TEXI2ANY
 
 endif # USE_HTML
@@ -82,3 +80,9 @@ $(top_builddir)/common/rtems.texi: $(top_srcdir)/common/rtems.texi.in $(top_buil
           $(top_srcdir)/common/rtems.texi.in > $(top_builddir)/common/rtems.texi
 
 $(srcdir)/version.texi:
+
+clean-local: clean-local-check
+.PHONY: clean-local-check
+
+clean-local-check:
+	-rm -rf $(PROJECT)




More information about the vc mailing list