1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/doc/doxygen/Makefile
Marian Buschsieweke cfee27cfb2
doc: do not rebuild riot.css
- simplify the makefile
    - changing behavior depending on lessc being installed is
      surprising and makes the Makefile less readable
    - failing with `make: lessc: No such file or directory` is helpful,
      but `make: No rule to make target 'src/css/riot.css'` is not
      clearly indicating that `lessc` was not found
- don't rebuild `riot.css` when generating HTML output
    - anyone touching the less file will have to manually call
      `make src/css/riot.css -C doc/doxygen`
    - this happens so rarely that implementing a convenient mechanism
      is not worth the trouble

Fixes https://github.com/RIOT-OS/RIOT/issues/8122
2023-05-24 21:24:08 +02:00

46 lines
1.4 KiB
Makefile

RIOTBASE=$(shell git rev-parse --show-toplevel)
# Generate list of quoted absolute include paths. Evaluated in riot.doxyfile.
export STRIP_FROM_INC_PATH_LIST=$(shell \
git ls-tree -dr --full-tree --name-only HEAD core drivers sys |\
grep '/include$$' |\
sed 's/.*/\"$(subst /,\/,$(RIOTBASE))\/\0\"/')
# use lessc (http://lesscss.org/#using-less) for compiling CSS
# It can also be installed in ubuntu with the `node-less` package
LESSC ?= lessc
DOCUMENTATION_FORMAT ?= html
.PHONY: doc
doc: $(DOCUMENTATION_FORMAT)
# by marking html as phony we force make to re-run Doxygen even if the directory exists.
.PHONY: html
html: src/changelog.md
( cat riot.doxyfile ; echo "GENERATE_HTML = yes" ) | doxygen -
.PHONY: check
check: src/changelog.md
( cat riot.doxyfile) | doxygen -
.PHONY: man
man: src/changelog.md
( cat riot.doxyfile ; echo "GENERATE_MAN = yes" ) | doxygen -
src/css/riot.css: src/css/riot.less src/css/variables.less
@$(LESSC) $< $@
src/css/variables.less: src/config.json
@grep "^\s*\"@" $< | sed -e 's/^\s*"//g' -e 's/":\s*"/: /g' \
-e 's/",\?$$/;/g' -e 's/\\"/"/g' > $@
src/changelog.md: src/changelog.md.tmp ../../release-notes.txt
@./generate-changelog.py $+ $@
.PHONY:
latex: src/changelog.md
( cat riot.doxyfile ; echo "GENERATE_LATEX= yes" ) | doxygen -
clean:
-@rm -rf latex man html doxygen_objdb_*.tmp doxygen_entrydb_*.tmp src/changelog.md