diff mbox

[1/2] doc: correctly install docs

Message ID 1456780755-10184-1-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes Feb. 29, 2016, 9:19 p.m. UTC
Depend on the target not the src

Suggested-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 doc/Makefile.inc                   |  3 +++
 doc/implementers-guide/Makefile.am |  4 ++--
 doc/process-guide/Makefile.am      | 15 +++++++++------
 doc/users-guide/Makefile.am        |  4 ++--
 4 files changed, 16 insertions(+), 10 deletions(-)
diff mbox

Patch

diff --git a/doc/Makefile.inc b/doc/Makefile.inc
index cab5286..e80bf05 100644
--- a/doc/Makefile.inc
+++ b/doc/Makefile.inc
@@ -4,3 +4,6 @@  VPATH=$(top_builddir)/doc/images
 	mscgen -T svg -i $^ -o $@
 
 ASCIIDOC_FLAGS =-a data-uri -b html5  -a icons -a toc2  -a max-width=55em
+
+.adoc.html:
+	asciidoc $(ASCIIDOC_FLAGS) --out-file=$@ $<
\ No newline at end of file
diff --git a/doc/implementers-guide/Makefile.am b/doc/implementers-guide/Makefile.am
index 6a614ce..4bdb970 100644
--- a/doc/implementers-guide/Makefile.am
+++ b/doc/implementers-guide/Makefile.am
@@ -5,8 +5,8 @@  TARGET = implementers-guide.html
 
 EXTRA_DIST = $(SRC)
 
-all-local: $(SRC)
-	asciidoc $(ASCIIDOC_FLAGS) --out-file=$(TARGET) $(SRC)
+doc_DATA = $(TARGET)
+$(TARGET): $(SRC)
 
 clean-local:
 	rm -f  $(builddir)/$(TARGET)
diff --git a/doc/process-guide/Makefile.am b/doc/process-guide/Makefile.am
index efef04d..f3fefc9 100644
--- a/doc/process-guide/Makefile.am
+++ b/doc/process-guide/Makefile.am
@@ -1,10 +1,15 @@ 
 include ../Makefile.inc
 
-EXTRA_DIST = $(top_srcdir)/doc/process-guide/bylaws-guide.adoc \
-	     $(top_srcdir)/doc/process-guide/release-guide.adoc
+SRC = $(top_srcdir)/doc/process-guide/bylaws-guide.adoc \
+      $(top_srcdir)/doc/process-guide/release-guide.adoc
 
-all-local: bylaws-guide.html \
-	   release-guide.html
+TARGET = bylaws-guide.html \
+	 release-guide.html
+
+EXTRA_DIST = $(SRC)
+
+doc_DATA = $(TARGET)
+$(TARGET): $(SRC)
 
 clean-local:
 	rm -f $(builddir)/bylaws-guide.html
@@ -13,7 +18,5 @@  clean-local:
 release-guide.html: $(top_srcdir)/doc/process-guide/release-guide.adoc \
 		    $(top_srcdir)/doc/images/simple_release_git.svg \
 		    $(top_srcdir)/doc/images/release_git.svg
-		    asciidoc $(ASCIIDOC_FLAGS) --out-file=$@ $<
 
 bylaws-guide.html:  $(top_srcdir)/doc/process-guide/bylaws-guide.adoc
-		    asciidoc $(ASCIIDOC_FLAGS) --out-file=$@ $<
diff --git a/doc/users-guide/Makefile.am b/doc/users-guide/Makefile.am
index 4f5b1fe..4cfcf0f 100644
--- a/doc/users-guide/Makefile.am
+++ b/doc/users-guide/Makefile.am
@@ -17,8 +17,8 @@  endif
 
 EXTRA_DIST = $(SRC) $(IMAGES)
 
-all-local: $(SRC)
-	asciidoc $(ASCIIDOC_FLAGS) --out-file=$(TARGET) $(SRC)
+doc_DATA = $(TARGET)
+$(TARGET): $(SRC) $(IMAGES)
 
 clean-local:
 	rm -f $(builddir)/$(TARGET)