diff options
| author | Michael Forney <mforney@mforney.org> | 2019-07-05 20:31:33 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2019-07-06 01:24:36 -0700 |
| commit | e2e5e98bcd0badcd437b8a67aa0986ed6d6678a9 (patch) | |
| tree | f99afe160ef23a961f19231fc08e3666a5a34851 /pkg/strace/gen.lua | |
| parent | 775f76f04ddfdf2f694c57951b97ed704232ad8b (diff) | |
Use a separate preprocessor rule
Otherwise, we end up passing both -c and -E to the compiler.
Diffstat (limited to 'pkg/strace/gen.lua')
| -rw-r--r-- | pkg/strace/gen.lua | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/pkg/strace/gen.lua b/pkg/strace/gen.lua index b60effb6..f016398e 100644 --- a/pkg/strace/gen.lua +++ b/pkg/strace/gen.lua @@ -8,9 +8,7 @@ cflags{ '-I $outdir', } -build('cc', '$outdir/ioctl_iocdef.i', '$srcdir/ioctl_iocdef.c', { - cflags='$cflags -P -E -MT $outdir/ioctl_iocdef.i', -}) +build('cpp', '$outdir/ioctl_iocdef.i', '$srcdir/ioctl_iocdef.c') build('sed', '$outdir/ioctl_iocdef.h', '$outdir/ioctl_iocdef.i', { expr=[[-n 's/^DEFINE HOST/#define /p']], }) @@ -41,8 +39,8 @@ end) local mpers = lines('mpers.txt') for _, f in ipairs(mpers) do - build('cc', '$outdir/'..f..'.mpers.i', '$srcdir/'..f, { - cflags='$cflags -P -E -MT $outdir/'..f..'.mpers.i -DIN_MPERS_BOOTSTRAP', + build('cpp', '$outdir/'..f..'.mpers.i', '$srcdir/'..f, { + cflags='$cflags -DIN_MPERS_BOOTSTRAP', }) end @@ -56,9 +54,7 @@ makempers('printers.h', 'printers.awk') makempers('native_printer_decls.h', 'printerdecls.awk') makempers('native_printer_defs.h', 'printerdefs.awk') -build('cc', '$outdir/syscallent.i', '$srcdir/linux/x86_64/syscallent.h', { - cflags='$cflags -P -E -MT $outdir/syscallent.i', -}) +build('cpp', '$outdir/syscallent.i', '$srcdir/linux/x86_64/syscallent.h') build('awk', '$outdir/scno-syscallent.h', {'$outdir/syscallent.i', '|', '$dir/scno.awk'}, { expr='-f $dir/scno.awk', }) |
