[riot-notifications] [RIOT-OS/RIOT] doc/doxygen: remove support for lesscpy (#11037)

Gaƫtan Harter notifications at github.com
Wed Feb 20 11:41:18 CET 2019


### Contribution description

lessc (node-less) and lesscpy do not produce the same output.
There are some minor whitespace +-1 in color values which
are not important but the output file is not stable

However lesscpy removes comments and so the license of the output file
As it produces an invalid file it support is dropped.

https://lesscpy.readthedocs.io/en/latest/#differences-from-less-js


Apparently when it was added by https://github.com/RIOT-OS/RIOT/pull/7607 the output was not checked.

### Alternative solution

Decide we do not care about the license header in `riot.css` and only use `lesscpy` instead of `node-less`.

### Testing procedure


I used this diff to show the command being executed:

```
diff --git a/doc/doxygen/Makefile b/doc/doxygen/Makefile
index 300739358..293daf17b 100644
--- a/doc/doxygen/Makefile
+++ b/doc/doxygen/Makefile
@@ -22,7 +22,7 @@ man: src/changelog.md

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

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


With `node-less` installed and touching `riot.less` the file is rebuilt:
See the `/usr/bin/lessc src/css/riot.less src/css/riot.css` line:

```
touch doc/doxygen/src/css/riot.less

make doc
"make" -BC doc/doxygen
make[1]: Entering directory '/home/harter/work/git/RIOT/doc/doxygen'
/usr/bin/lessc src/css/riot.less src/css/riot.css
( cat riot.doxyfile ; echo "GENERATE_HTML = yes" ) | doxygen -
*make[1]: Leaving directory '/home/harter/work/git/RIOT/doc/doxygen'
```

If `LESSC` is empty it is not:

```
touch doc/doxygen/src/css/riot.less

LESSC= make doc
"make" -BC doc/doxygen
make[1]: Entering directory '/home/harter/work/git/RIOT/doc/doxygen'
( cat riot.doxyfile ; echo "GENERATE_HTML = yes" ) | doxygen -
*make[1]: Leaving directory '/home/harter/work/git/RIOT/doc/doxygen'
```

And if `node-less` is not installed it is not rebuild

```
command -v lessc

touch doc/doxygen/src/css/riot.less

make doc
"make" -BC doc/doxygen
make[1]: Entering directory '/home/harter/work/git/RIOT/doc/doxygen'
( cat riot.doxyfile ; echo "GENERATE_HTML = yes" ) | doxygen -
*make[1]: Leaving directory '/home/harter/work/git/RIOT/doc/doxygen'
```

### Issues/PRs references

The file was always being modified and said different from the version of the repository when doing `make doc` with only `lesscpy` installed.

I mentioned the issue with the comments being removed in https://github.com/RIOT-OS/RIOT/pull/10249#issuecomment-462417175
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11037

-- Commit Summary --

  * doc/doxygen: remove support for lesscpy
  * doc/doxygen: add package name for lessc

-- File Changes --

    M doc/doxygen/Makefile (12)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11037.patch
https://github.com/RIOT-OS/RIOT/pull/11037.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11037
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190220/debf27fa/attachment.html>


More information about the notifications mailing list