summaryrefslogtreecommitdiff
blob: ccb601fe18f267dc691a9ae8563912602c09b07d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
m4_include(__MAKEFILE_DATA_DIR`/omnimods.m4.conf')m4_dnl
m4_dnl
m4_dnl
m4_dnl
m4_define(`__GLYPH_CHOOSE_STYLE',
   `m4_define(`__GLYPH',m4_defn(`$1'))m4_undefine(`$1')')m4_dnl
m4_dnl
m4_dnl
m4_dnl
m4_define(`__GLYPH_ERLANG_STYLE',`from_id (<<"`$1'">>) ->
   #glyph
   {
      id = <<"$1">>,
      name = <<"$2">>,
      omnimods = __OMNIMODS($3, $4, $5, $6)
   };
')m4_dnl
m4_define(`__GLYPH_USE_ERLANG_STYLE',`__GLYPH_CHOOSE_STYLE(`__GLYPH_ERLANG_STYLE')')m4_dnl
m4_dnl
m4_dnl
m4_dnl
m4_define(`__GLYPH_JSON_STYLE',`   {
      "msg": "add_glyph",
      "id": "$1",
      "nam": "$2",
      "omni": __OMNIMODS($3, $4, $5, $6)
   },
')m4_dnl
m4_define(`__GLYPH_USE_JSON_STYLE',`__GLYPH_CHOOSE_STYLE(`__GLYPH_JSON_STYLE')')m4_dnl
m4_dnl
m4_dnl
m4_dnl
m4_ifelse(__CODE_STYLE(),
   erlang, `__GLYPH_USE_ERLANG_STYLE()',
   __CODE_STYLE(), json, `__GLYPH_USE_JSON_STYLE()')m4_dnl