Skip to content

Commit

Permalink
doxygen/Makefile: do not rebuild riot.css automatically
Browse files Browse the repository at this point in the history
The riot.css can be generated by the lessc tool from riot.less, but
it is also tracked by git. If the Makefile detects that the user has
the lessc tool, it automatically enables a rule to rebuild it.

This can be annoying to the user if he happens to have the tool in
his machine and may also cause the docs built by the CI to differ to
what is generated in user's PCs.

This commit removes the rule for generating riot.css and replaces it
whith a phony target "riot-css" that must be explicitly called to
recompile the stylesheet. Dependencies on that file are removed, since
the html target is PHONY, meaning it will always get remade, and make
no longer knows how to remake the CSS, meaning that the dependency is
a NOP.
  • Loading branch information
jcarrano committed Jun 3, 2019
1 parent 684d4c5 commit 07baec4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions doc/doxygen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@ doc: html

# by marking html as phony we force make to re-run Doxygen even if the directory exists.
.PHONY: html
html: src/css/riot.css src/changelog.md
html: src/changelog.md
( cat riot.doxyfile ; echo "GENERATE_HTML = yes" ) | doxygen -

.PHONY: man
man: src/changelog.md
( cat riot.doxyfile ; echo "GENERATE_MAN = yes" ) | doxygen -

ifneq (,$(LESSC))
src/css/riot.css: src/css/riot.less src/css/variables.less
@$(LESSC) $< $@
.PHONY: riot-css
riot-css: src/css/riot.less src/css/variables.less
@$(LESSC) $< src/css/riot.css

src/css/variables.less: src/config.json
@grep "^\s*\"@" $< | sed -e 's/^\s*"//g' -e 's/":\s*"/: /g' \
-e 's/",\?$$/;/g' -e 's/\\"/"/g' > $@
endif

src/changelog.md: src/changelog.md.tmp ../../release-notes.txt
@./generate-changelog.py $+ $@
Expand Down

0 comments on commit 07baec4

Please sign in to comment.