getting more abstract
authorVolker Birk <vb@pep-project.org>
Sat, 09 Jul 2016 14:27:11 +0200
changeset 81171418dbb493c
parent 810 0c07d4583315
child 813 2f069faaf513
child 815 f469464b1ba9
getting more abstract
src/Makefile
sync/gen_statemachine.ysl2
     1.1 --- a/src/Makefile	Sat Jul 09 11:43:51 2016 +0200
     1.2 +++ b/src/Makefile	Sat Jul 09 14:27:11 2016 +0200
     1.3 @@ -59,8 +59,7 @@
     1.4  
     1.5  all: $(TARGET)
     1.6  
     1.7 -sync_fsm.c: ../sync/devicegroup.fsm
     1.8 -	make -C ../sync
     1.9 +include Makefile.protocols
    1.10  
    1.11  %.d: %.c
    1.12  	@set -e; rm -f $@; \
     2.1 --- a/sync/gen_statemachine.ysl2	Sat Jul 09 11:43:51 2016 +0200
     2.2 +++ b/sync/gen_statemachine.ysl2	Sat Jul 09 14:27:11 2016 +0200
     2.3 @@ -9,7 +9,19 @@
     2.4  tstylesheet {
     2.5      include ./functions.ysl2
     2.6  
     2.7 -    template "/protocol/fsm" {
     2.8 +    template "/protocol" {
     2.9 +        document "../src/Makefile.protocols", "text"
    2.10 +            apply "fsm", 0, mode="make";
    2.11 +        apply "fsm", 0, mode=gen;
    2.12 +    }
    2.13 +
    2.14 +    template "fsm", mode=make
    2.15 +    ||
    2.16 +    «@filename»_fsm.c: ../sync/devicegroup.fsm
    2.17 +    \tmake -C ../«@filename»
    2.18 +    ||
    2.19 +
    2.20 +    template "fsm", mode=gen {
    2.21          document "../src/{@filename}_fsm.h", "text" {
    2.22          ||
    2.23          #pragma once