Compare commits

...

2 Commits

Author SHA1 Message Date
Volker Birk b7e2e67134 ... and copy to the right places 2023-02-09 13:37:18 +01:00
Volker Birk 767b498db5 generate code on Windows 2023-02-09 13:16:13 +01:00
4 changed files with 56 additions and 0 deletions

2
.gitignore vendored
View File

@ -137,7 +137,9 @@ test/test_mails/ENGINE-654_bob_mail.eml
codegen/generated/
codegen/*.gen
codegen/*.agen
.copy
.generated
# Don't remove these if you want to live a long life. It's necessary because it doesn't get cleaned up between branches.
sync/generated

5
NMakefile.mak Normal file
View File

@ -0,0 +1,5 @@
YML2PROC=py "%YML_HOME%\yml2proc"
!IF EXISTS(local.mak)
!include local.mak
!ENDIF

49
codegen/NMakefile Normal file
View File

@ -0,0 +1,49 @@
# This file is under GNU General Public License 3.0
# see LICENSE.txt
!include ../NMakefile.mak
all: .copy
.generated: *.fsm *.act
@$(MAKE) /f Nmakefile all-fsm all-act
touch .generated
.copy: .generated
xcopy generated\*.c ..\src /y
xcopy generated\*.h ..\src /y
xcopy generated\*.asn1 ..\asn.1 /y
touch .copy
all-fsm: *.fsm
-md generated 2>nul
@$(MAKE) /f NMakefile $(**:.fsm=.gen)
all-act: *.act
-md generated 2>nul
@$(MAKE) /f NMakefile $(**:.act=.agen)
.SUFFIXES : .fsm .gen .act .agen
.fsm.gen:
$(YML2PROC) -y gen_statemachine.ysl2 $< > nul
$(YML2PROC) -y gen_codec.ysl2 $< > nul
$(YML2PROC) -y gen_messages.ysl2 $< > nul
$(YML2PROC) -y gen_message_func.ysl2 $< -o $@
.act.agen:
echo define actfile = "./$<"; | $(YML2PROC) - gen_actions.ysl2 | \
$(YML2PROC) -X - $(**:.act=.fsm) -o $@
clean:
-rd /s/q generated 2>nul
-del /f/q *.gen 2>nul
-del /f/q *.agen 2>nul
-del /f/q *.xml 2>nul
-del *.xsl 2>nul
-del *.dot 2>nul
-del *.svg 2>nul
-del .copy 2>nul
-del .generated
.xml.fsm:
$(YML2PROC) $< -o $@

0
local.mak.example Normal file
View File