aboutsummaryrefslogtreecommitdiff
path: root/main.m4
blob: 8b88120bd5c86aaff1e31b4c79545818f1322df9 (plain) (blame)
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
#ifndef moonshine_m4_header
#define moonshine_m4_header

dnl This is m4 preprocessor magic.
dnl You can safely ignore it, as it is toxic and radioactive to humans.
// # Autogenerated by m4
// # Don't modify this, modify the main.m4 file instead.
dnl
dnl
changequote(`[', `]')dnl
define([set], defn([define]))dnl
undefine([define])dnl

#define p_cat(a, b) a##b
#define cat(a, b) p_cat(a, b)

#define dump_or_continue_0(...) 
#define dump_or_continue_01(...) __VA_ARGS__

set([_expand], [#define EXPAND_$3_$2(x, ...) $3(x); cat(dump_or_continue_0, __VA_OPT__(1))(EXPAND_$3_$1(__VA_ARGS__))])dnl
set([expand], [ifelse([$1], [1], [#define EXPAND_$2_$1(x, ...) $2(x)], [_expand(decr($1), $1, $2)])])dnl
dnl
set([build_expander], [ifelse([$1], [0], [], [expand($1, $2)
build_expander(decr($1), $2)dnl
])])dnl
set([define_expander], [#define EXPAND_$2(...) EXPAND_$2_$1(__VA_ARGS__)
build_expander($1, $2)])dnl
dnl
define_expander([512], [print_local])

#endif