make themes: rename 'style' targtes to 'themes' targets

style.legacy could be renamed themes.legacy : it actually builds the files for
the legacy theme, then themes.legacy can be a dependency of themes.  Same for
the other styles.*

Debatable: about style.bootstrap, same convention : theme.bootstrap (even it is
more a toolbox for the oscar theme).

So there is no need to add the missing make styles in the help target.

thanks @dalf:

- https://github.com/asciimoo/searx/pull/1900#discussion_r399160355

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2020-03-29 11:29:57 +02:00
parent ec453e0239
commit 8a16903a1c
1 changed files with 22 additions and 21 deletions

View File

@ -117,39 +117,40 @@ node.clean:
# build themes # build themes
# ------------ # ------------
PHONY += themes themes.oscar themes.simple PHONY += themes.bootstrap themes themes.oscar themes.simple themes.legacy themes.courgette themes.pixart
themes: themes.oscar themes.simple themes: themes.bootstrap themes.oscar themes.simple themes.legacy themes.courgette themes.pixart
themes.oscar: quiet_cmd_lessc = LESSC $3
$(Q)echo '[!] Grunt build : oscar theme'
$(Q)PATH="$$(npm bin):$$PATH" grunt --gruntfile "searx/static/themes/oscar/gruntfile.js"
themes.simple:
$(Q)echo '[!] Grunt build : simple theme'
$(Q)PATH="$$(npm bin):$$PATH" grunt --gruntfile "searx/static/themes/simple/gruntfile.js"
# build styles
# ------------
PHONY += styles style.legacy style.courgette style.pixart style.bootstrap
styles: style.legacy style.courgette style.pixart style.bootstrap
quiet_cmd_lessc = STYLE $3
cmd_lessc = PATH="$$(npm bin):$$PATH" \ cmd_lessc = PATH="$$(npm bin):$$PATH" \
lessc --clean-css="--s1 --advanced --compatibility=ie9" "searx/static/$2" "searx/static/$3" lessc --clean-css="--s1 --advanced --compatibility=ie9" "searx/static/$2" "searx/static/$3"
style.legacy: quiet_cmd_grunt = GRUNT $2
cmd_grunt = PATH="$$(npm bin):$$PATH" \
grunt --gruntfile "$2"
themes.oscar:
$(Q)echo '[!] build oscar theme'
$(call cmd,grunt,searx/static/themes/oscar/gruntfile.js)
themes.simple:
$(Q)echo '[!] build simple theme'
$(call cmd,grunt,searx/static/themes/simple/gruntfile.js)
themes.legacy:
$(Q)echo '[!] build legacy theme'
$(call cmd,lessc,themes/legacy/less/style-rtl.less,themes/legacy/css/style-rtl.css) $(call cmd,lessc,themes/legacy/less/style-rtl.less,themes/legacy/css/style-rtl.css)
$(call cmd,lessc,themes/legacy/less/style.less,themes/legacy/css/style.css) $(call cmd,lessc,themes/legacy/less/style.less,themes/legacy/css/style.css)
style.courgette: themes.courgette:
$(Q)echo '[!] build courgette theme'
$(call cmd,lessc,themes/courgette/less/style.less,themes/courgette/css/style.css) $(call cmd,lessc,themes/courgette/less/style.less,themes/courgette/css/style.css)
$(call cmd,lessc,themes/courgette/less/style-rtl.less,themes/courgette/css/style-rtl.css) $(call cmd,lessc,themes/courgette/less/style-rtl.less,themes/courgette/css/style-rtl.css)
style.pixart: themes.pixart:
$(Q)echo '[!] build pixart theme'
$(call cmd,lessc,themes/pix-art/less/style.less,themes/pix-art/css/style.css) $(call cmd,lessc,themes/pix-art/less/style.less,themes/pix-art/css/style.css)
style.bootstrap: themes.bootstrap:
$(call cmd,lessc,less/bootstrap/bootstrap.less,css/bootstrap.min.css) $(call cmd,lessc,less/bootstrap/bootstrap.less,css/bootstrap.min.css)