mirror of
https://github.com/oasislinux/oasis.git
synced 2026-05-03 12:25:22 +02:00
Use a separate preprocessor rule
Otherwise, we end up passing both -c and -E to the compiler.
This commit is contained in:
+1
-3
@@ -14,9 +14,7 @@ build('awk', '$outdir/pnglibconf.tf4', {
|
||||
build('awk', '$outdir/pnglibconf.c', '$outdir/pnglibconf.tf4', {
|
||||
expr='-f $srcdir/scripts/options.awk out=/dev/stdout',
|
||||
})
|
||||
build('cc', '$outdir/pnglibconf.tf1', {'$outdir/pnglibconf.c', '||', 'pkg/zlib/headers'}, {
|
||||
cflags='$cflags -E -MT $outdir/pnglibconf.tf1',
|
||||
})
|
||||
build('cpp', '$outdir/pnglibconf.tf1', {'$outdir/pnglibconf.c', '||', 'pkg/zlib/headers'})
|
||||
build('awk', '$outdir/include/pnglibconf.h', '$outdir/pnglibconf.tf1', {
|
||||
expr='-f $srcdir/scripts/dfn.awk out=/dev/stdout',
|
||||
})
|
||||
|
||||
+4
-8
@@ -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',
|
||||
})
|
||||
|
||||
@@ -9,6 +9,12 @@ rule cc
|
||||
deps = gcc
|
||||
description = CC $out
|
||||
|
||||
rule cpp
|
||||
command = $cc -MMD -MF $out.d $cflags -E -P -o $out $in
|
||||
depfile = $out.d
|
||||
deps = gcc
|
||||
description = CPP $out
|
||||
|
||||
rule as
|
||||
command = $as $asflags -o $out $in
|
||||
|
||||
|
||||
Reference in New Issue
Block a user