better Makefile sync
authorVolker Birk <vb@pep.foundation>
Mon, 03 Sep 2018 21:57:00 +0200
branchsync
changeset 29220c2a16e87852
parent 2921 8bae76a4f918
child 2923 2b78505027c0
better Makefile
sync/Makefile
     1.1 --- a/sync/Makefile	Mon Sep 03 16:32:05 2018 +0200
     1.2 +++ b/sync/Makefile	Mon Sep 03 21:57:00 2018 +0200
     1.3 @@ -5,37 +5,34 @@
     1.4  
     1.5  all: .codegen
     1.6  
     1.7 -.codegen: .statemachines .actions .codecs .messages
     1.8 +.codegen: makedir .statemachines .actions .codecs .messages
     1.9  	touch .codegen
    1.10  	make copy
    1.11  
    1.12  .actions: sync.fsm gen_actions.ysl2 fsm.yml2 functions.ysl2 $(wildcard cond_act_*.yml2)
    1.13 -	-mkdir -p generated
    1.14  	$(YML2_PROC) -y gen_actions.ysl2 $< -o $@
    1.15  
    1.16  .statemachines: sync.fsm gen_statemachine.ysl2 fsm.yml2 functions.ysl2
    1.17 -	-mkdir -p generated
    1.18  	$(YML2_PROC) -y gen_statemachine.ysl2 $< -o $@
    1.19  
    1.20  .codecs: sync.fsm gen_codec.ysl2 fsm.yml2 functions.ysl2
    1.21 -	-mkdir -p generated
    1.22  	$(YML2_PROC) -y gen_codec.ysl2 $< -o $@
    1.23  
    1.24  .messages: sync.fsm gen_messages.ysl2 gen_message_func.ysl2 fsm.yml2 functions.ysl2
    1.25 -	-mkdir -p generated
    1.26  	$(YML2_PROC) -y gen_messages.ysl2 $< -o $@
    1.27  	$(YML2_PROC) -y gen_message_func.ysl2 $< -o $@
    1.28  
    1.29 -.PHONY: clean copy
    1.30 +.PHONY: clean copy makedir
    1.31  
    1.32  clean:
    1.33 -	rm -f *.xml *.xsl \
    1.34 -    $(pathsub generated/%, ../src/% $(wildcard generated/*.*)) \
    1.35 -    generated/* .statemachines .actions .codecs .messages *.dot *.svg
    1.36 +	rm -f *.xml *.xsl generated/* .statemachines .actions .codecs .messages *.dot *.svg
    1.37  
    1.38  copy:
    1.39  	cp -f generated/*.c generated/*.h ../src
    1.40  
    1.41 +makedir:
    1.42 +	-mkdir -p generated
    1.43 +
    1.44  %.xml: %.fsm
    1.45  	yml2c $< -o $@
    1.46