Depend on the target not the src

Suggested-by: Nicolas Morey-Chaisemartin <[email protected]>
Signed-off-by: Mike Holmes <[email protected]>
---
 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 --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)
-- 
2.5.0

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to