tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

rfc: fix makesyscalls.sh



Hello.

I'm building NetBSD in cross-compiled mode under Ubuntu 7.04 Linux.
The build is broken after append of a new system call to kernel stuff.
I've investigated issue.
The embedded awk script in the makesyscalls.sh contains backslashed
(escaped) symbols under single quoted part in the script.
That aren't needed because the backslash symbols are put to output
files for __KERNEL_RCSID() also.

There is small patch to kill issue.

P.S. Possible there is a bug in the shell/awk at least in the Ubuntu.

--- netbsd.se-local/sys/kern/makesyscalls.sh.clk        2008-04-24
14:51:19.000000000 +0300
+++ netbsd.se-local/sys/kern/makesyscalls.sh    2008-05-27 10:08:06.000000000 
+0300
@@ -150,7 +150,7 @@
        compatopts = \"$compatopts\"
        "'

-       printf "/* \$NetBSD\$ */\n\n" > sysdcl
+       printf "/* $NetBSD$ */\n\n" > sysdcl
        printf "/*\n * System call switch table.\n *\n" > sysdcl
        printf " * DO NOT EDIT-- this file is automatically generated.\n" > 
sysdcl

@@ -171,38 +171,38 @@
        printf "#define\tns(type)\tn(type), s(type)\n\n", registertype > sysent
        printf "struct sysent %s[] = {\n",switchname > sysent

-       printf "/* \$NetBSD\$ */\n\n" > sysnames
+       printf "/* $NetBSD$ */\n\n" > sysnames
        printf "/*\n * System call names.\n *\n" > sysnames
        printf " * DO NOT EDIT-- this file is automatically generated.\n" > 
sysnames

        printf "\n/*\n * System call prototypes.\n */\n\n" > sysprotos

-       printf "/* \$NetBSD\$ */\n\n" > sysnumhdr
+       printf "/* $NetBSD$ */\n\n" > sysnumhdr
        printf "/*\n * System call numbers.\n *\n" > sysnumhdr
        printf " * DO NOT EDIT-- this file is automatically generated.\n" > 
sysnumhdr

-       printf "/* \$NetBSD\$ */\n\n" > sysarghdr
+       printf "/* $NetBSD$ */\n\n" > sysarghdr
        printf "/*\n * System call argument lists.\n *\n" > sysarghdr
        printf " * DO NOT EDIT-- this file is automatically generated.\n" > 
sysarghdr

-       printf "/* \$NetBSD\$ */\n\n" > rumpcalls
+       printf "/* $NetBSD$ */\n\n" > rumpcalls
        printf "/*\n * System call marshalling for rump.\n *\n" > rumpcalls
        printf " * DO NOT EDIT-- this file is automatically generated.\n" > 
rumpcalls

-       printf "/* \$NetBSD\$ */\n\n" > rumpcallshdr
+       printf "/* $NetBSD$ */\n\n" > rumpcallshdr
        printf "/*\n * System call protos in rump namespace.\n *\n" > 
rumpcallshdr
        printf " * DO NOT EDIT-- this file is automatically generated.\n" >
rumpcallshdr
 }
 NR == 1 {
        sub(/ $/, "")
        printf " * created from%s\n */\n\n", $0 > sysdcl
-       printf "#include <sys/cdefs.h>\n__KERNEL_RCSID(0,
\"\$NetBSD\$\");\n\n" > sysdcl
+       printf "#include <sys/cdefs.h>\n__KERNEL_RCSID(0, \"$NetBSD$\");\n\n" > 
sysdcl

        printf " * created from%s\n */\n\n", $0 > sysnames
-       printf "#include <sys/cdefs.h>\n__KERNEL_RCSID(0,
\"\$NetBSD\$\");\n\n" > sysnames
+       printf "#include <sys/cdefs.h>\n__KERNEL_RCSID(0,
\"$NetBSD$\");\n\n" > sysnames

        printf " * created from%s\n */\n\n", $0 > rumpcalls
-       printf "#include <sys/cdefs.h>\n__KERNEL_RCSID(0,
\"\$NetBSD\$\");\n\n" > rumpcalls
+       printf "#include <sys/cdefs.h>\n__KERNEL_RCSID(0,
\"$NetBSD$\");\n\n" > rumpcalls
        printf "#include <sys/types.h>\n" > rumpcalls
        printf "#include <sys/param.h>\n" > rumpcalls
        printf "#include <sys/proc.h>\n" > rumpcalls


-- 
With Best Regards,
Andy Shevchenko


Home | Main Index | Thread Index | Old Index