Skip to content

Commit

Permalink
Cleanup doc Makefile so that each conditional set all its targets
Browse files Browse the repository at this point in the history
Don't set clean-local and all-local dependencies all together at the
end and rather let each section add the appropriate dependencies.
This makes each conditional more self-contained, and is safe as Make
allows adding extra dependencies to existing targets.
  • Loading branch information
b4n committed Aug 23, 2014
1 parent 288b4f2 commit 74006b0
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions doc/Makefile.am
Expand Up @@ -56,15 +56,13 @@ geany.html: $(srcdir)/geany.css $(srcdir)/geany.txt
hacking.html: $(srcdir)/geany.css $(top_srcdir)/HACKING
$(AM_V_GEN)$(RST2HTML) -stg --stylesheet=$(srcdir)/geany.css $(top_srcdir)/HACKING $@

all-html-local: geany.html hacking.html
all-local: geany.html hacking.html

clean-local: clean-html-local
clean-html-local:
-rm -f hacking.html
-rm -f geany.html

else
all-html-local:;
clean-html-local:;
endif

# PDF user manual
Expand All @@ -73,14 +71,12 @@ if WITH_RST2PDF
geany-$(VERSION).pdf: geany.txt
$(AM_V_GEN)$(RST2PDF) $(srcdir)/geany.txt -o $@

all-pdf-local: geany-$(VERSION).pdf
all-local: geany-$(VERSION).pdf

clean-local: clean-pdf-local
clean-pdf-local:
-rm -f geany-$(VERSION).pdf

else
all-pdf-local:;
clean-pdf-local:;
endif

# API Documentation
Expand All @@ -99,19 +95,14 @@ doxygen_sources = \
Doxyfile.stamp: Doxyfile $(doxygen_sources)
$(AM_V_GEN)$(DOXYGEN) Doxyfile && echo "" > $@

all-api-docs-local: Doxyfile.stamp
all-local: Doxyfile.stamp

clean-local: clean-api-docs-local
clean-api-docs-local:
-rm -rf reference/ Doxyfile.stamp

else
all-api-docs-local:;
clean-api-docs-local:;
endif

all-local: all-html-local all-pdf-local all-api-docs-local
clean-local: clean-html-local clean-pdf-local clean-api-docs-local

uninstall-local:
rm -rf $(DOCDIR);

Expand Down

0 comments on commit 74006b0

Please sign in to comment.