Allow assets to be templated
This commit is contained in:
parent
e0a8b3d60a
commit
1487835478
9
Makefile
9
Makefile
|
@ -37,6 +37,8 @@ part_files=$(in_part_files:%.in=%) $(shell find src/pages/parts/*.etlua -type f)
|
|||
built_pages=$(page_files:src/pages/%.etlua=$(chroot_dir)pages/%.etlua)
|
||||
built_sql=$(sql_files:src/sql/%.sql=$(chroot_dir)sql/%.sql)
|
||||
built=$(built_files) $(built_sql) $(built_pages) $(built_tests)
|
||||
asset_in_files=$(wildcard assets/*.in -type f)
|
||||
asset_files=$(asset_in_files:%.in=%)
|
||||
|
||||
all: $(chroot_dir) smr.so $(built_files) $(built_pages) $(built_sql)
|
||||
$(Q)$(ECHO) "[running] $@"
|
||||
|
@ -56,6 +58,7 @@ clean:
|
|||
$(Q)$(RM) conf/smr.conf
|
||||
$(Q)$(RM) src/pages/parts/story_breif.etlua
|
||||
$(Q)$(RM) src/lua/config.lua
|
||||
$(Q)$(RM) $(asset_files)
|
||||
|
||||
cloc:
|
||||
cloc --force-lang="HTML",etlua.in src assets
|
||||
|
@ -123,7 +126,11 @@ $(built_tests) : $(chroot_dir)% : %
|
|||
$(Q)$(ECHO) "[copy] $@"
|
||||
$(Q)$(COPY) $^ $@
|
||||
|
||||
smr.so : $(src_files) conf/smr.conf conf/build.conf
|
||||
$(asset_files) : % : %.in
|
||||
$(Q)$(ECHO) "[preprocess] $@"
|
||||
$(Q)$(SPP) -o $@ $<
|
||||
|
||||
smr.so : $(src_files) conf/smr.conf conf/build.conf $(asset_files)
|
||||
$(Q)$(ECHO) "[build] $@"
|
||||
$(Q)$(KODEV) build
|
||||
|
||||
|
|
Loading…
Reference in New Issue