mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
make, scripts: Re-add files necessary for building ytools
Re-add everthing needed for building and packaging ytools. This is a big commit, 2002 lines of code. It mostly consists of C/C++ machinery, plus some documentation-related stuff. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
0a9340af49
commit
bf16c6714b
27 changed files with 1975 additions and 0 deletions
70
make/htdocs.mk
Normal file
70
make/htdocs.mk
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
LESS_SRC ?= $(wildcard *.less)
|
||||
LESS_GENERATED_CSS ?= $(patsubst %.less,%.css,$(LESS_SRC))
|
||||
LESS_CPY ?= lesscpy
|
||||
|
||||
include $(JWBDIR)/make/defs.mk
|
||||
|
||||
# -- HTML
|
||||
PRETTIER := $(shell $(WHICH) prettier 2>/dev/null)
|
||||
INSTALLATION_FILE_TYPES += HTML
|
||||
BUILD_HTMLDIR = $(TOPDIR)/htdocs
|
||||
LOCAL_HTML += $(filter-out $(DONT_INSTALL),$(wildcard *.html *.css *.php *.js) $(FONTS) $(IMAGES))
|
||||
DONT_LINT_HTML += $(shell $(ECHO) $(wildcard *.html) | xargs --no-run-if-empty $(GREP) -l '<?php')
|
||||
LOCAL_HTML_LINT ?= $(addprefix .,$(addsuffix .lint,$(filter-out $(DONT_LINT_HTML),$(wildcard *.html *.php *.css *.js))))
|
||||
HTML_STOPDIR_NAME ?= htdocs
|
||||
ifeq ($(HTML_SUBDIR),)
|
||||
HTML_SUBDIR := $(shell $(PWD) | $(SED) '/.*\/$(HTML_STOPDIR_NAME)\(\/\|$$\)/!d; s%.*/$(HTML_STOPDIR_NAME)\(/\|$$\)%%')
|
||||
endif
|
||||
ifeq ($(HTML_SUBDIR),)
|
||||
INSTALL_HTMLDIR ?= $(PROJECT_HTMLDIR)
|
||||
else
|
||||
INSTALL_HTMLDIR ?= $(PROJECT_HTMLDIR)/$(HTML_SUBDIR)
|
||||
endif
|
||||
INSTALLED_HTML += $(addprefix $(INSTALL_HTMLDIR)/,$(LOCAL_HTML))
|
||||
|
||||
|
||||
include $(JWBDIR)/make/js.mk
|
||||
include $(JWBDIR)/make/rules.mk
|
||||
include $(JWBDIR)/make/dev-utils.mk
|
||||
|
||||
all: $(LESS_GENERATED_CSS) lint
|
||||
install: install_HTML
|
||||
clean: textclean localclean doneclean clean.lesscpy
|
||||
test:
|
||||
|
||||
%.css: %.less
|
||||
$(LESS_CPY) $< > $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
clean.lesscpy:
|
||||
$(RM) -f $(LESS_GENERATED_CSS) *.tmp
|
||||
|
||||
lint: $(LOCAL_HTML_LINT)
|
||||
clean: lint.clean
|
||||
lint.clean:
|
||||
rm -f .*.lint
|
||||
|
||||
.%.html.lint: %.html
|
||||
ifneq ($(PRETTIER),)
|
||||
$(PRETTIER) $< >/dev/null
|
||||
endif
|
||||
touch $@
|
||||
|
||||
.%.php.lint: %.php
|
||||
php -l $<
|
||||
ifneq ($(PRETTIER),)
|
||||
#$(PRETTIER) --parser html $< >/dev/null
|
||||
endif
|
||||
touch $@
|
||||
|
||||
.%.css.lint: %.css
|
||||
ifneq ($(PRETTIER),)
|
||||
$(PRETTIER) $< >/dev/null
|
||||
endif
|
||||
touch $@
|
||||
|
||||
.%.js.lint: %.js
|
||||
ifneq ($(PRETTIER),)
|
||||
$(PRETTIER) $< >/dev/null
|
||||
endif
|
||||
touch $@
|
||||
Loading…
Add table
Add a link
Reference in a new issue