Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/sys Make the generation of syscall stubs a lot more...



details:   https://anonhg.NetBSD.org/src/rev/a67336199f50
branches:  trunk
changeset: 517494:a67336199f50
user:      tv <tv%NetBSD.org@localhost>
date:      Tue Nov 13 15:12:01 2001 +0000

description:
Make the generation of syscall stubs a lot more reliable by generating real
`.S' files and letting <bsd.sys.mk> and <bsd.lib.mk> compile them like every
other .S file.  The compilation options passed to ${CC} are still correct.

Also make sure LintSysPseudoNoerr.c gets removed on "make clean".

diffstat:

 lib/libc/sys/Makefile.inc |  100 ++++++++-------------------------------------
 1 files changed, 18 insertions(+), 82 deletions(-)

diffs (119 lines):

diff -r f6aed1b3d0e3 -r a67336199f50 lib/libc/sys/Makefile.inc
--- a/lib/libc/sys/Makefile.inc Tue Nov 13 14:49:56 2001 +0000
+++ b/lib/libc/sys/Makefile.inc Tue Nov 13 15:12:01 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.116 2001/09/16 07:41:57 manu Exp $
+#      $NetBSD: Makefile.inc,v 1.117 2001/11/13 15:12:01 tv Exp $
 #      @(#)Makefile.inc        8.3 (Berkeley) 10/24/94
 
 # sys sources
@@ -82,92 +82,28 @@
 PPSEUDONOERR=  ${PSEUDONOERR:.o=.po}
 SPSEUDONOERR=  ${PSEUDONOERR:.o=.so}
 
-ACPPFLAGS=${CPPFLAGS:M-[ID]*}
-.if defined(DESTDIR)
-ACPPFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include
-.endif
-
-OBJS+= ${ASM} ${NOERR} ${PSEUDONOERR}
-
-${PASM}: ${ARCHDIR}/SYS.h \
-    ${DESTDIR}/usr/include/sys/syscall.h
-       @echo creating ${.TARGET}
-       @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \
-           ${CPP} -DGPROF ${ACPPFLAGS} ${AINC} | \
-           ${AS} -o ${.TARGET}.o
-       @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
-       @rm -f ${.TARGET}.o
+SRCS+=         ${ASM:.o=.S} ${NOERR:.o=.S} ${PSEUDONOERR:.o=.S}
+CLEANFILES+=   ${ASM:.o=.S} ${NOERR:.o=.S} ${PSEUDONOERR:.o=.S}
 
-${SASM}: ${ARCHDIR}/SYS.h \
-    ${DESTDIR}/usr/include/sys/syscall.h
-       @echo creating ${.TARGET}
-       @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \
-           ${CPP} ${CPPPICFLAGS} ${ACPPFLAGS} ${AINC} | \
-           ${AS} ${APICFLAGS} -o ${.TARGET}
-
-${ASM}: ${ARCHDIR}/SYS.h \
-    ${DESTDIR}/usr/include/sys/syscall.h
-       @echo creating ${.TARGET}
-       @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \
-           ${CPP} ${ACPPFLAGS} ${AINC} | ${AS} -o ${.TARGET}.o
-       @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
-       @rm -f ${.TARGET}.o
-
-${PNOERR}: ${ARCHDIR}/SYS.h \
-    ${DESTDIR}/usr/include/sys/syscall.h
-       @echo creating ${.TARGET}
-       @printf '#include "SYS.h"\nRSYSCALL_NOERROR(${.PREFIX})\n' | \
-           ${CPP} -DGPROF ${ACPPFLAGS} ${AINC} | ${AS} -o ${.TARGET}.o
-       @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
-       @rm -f ${.TARGET}.o
+.for F in ${ASM:.o=.S}
+${F}: ${ARCHDIR}/SYS.h ${DESTDIR}/usr/include/sys/syscall.h
+       printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' >${.TARGET}
+.endfor
 
-${SNOERR}: ${ARCHDIR}/SYS.h \
-    ${DESTDIR}/usr/include/sys/syscall.h
-       @echo creating ${.TARGET}
-       @printf '#include "SYS.h"\nRSYSCALL_NOERROR(${.PREFIX})\n' | \
-           ${CPP} ${CPPPICFLAGS} ${ACPPFLAGS} ${AINC} | \
-           ${AS} ${APICFLAGS} -o ${.TARGET}
-
-${NOERR}: ${ARCHDIR}/SYS.h \
-    ${DESTDIR}/usr/include/sys/syscall.h
-       @echo creating ${.TARGET}
-       @printf '#include "SYS.h"\nRSYSCALL_NOERROR(${.PREFIX})\n' | \
-           ${CPP} ${ACPPFLAGS} ${AINC} | ${AS} -o ${.TARGET}.o
-       @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
-       @rm -f ${.TARGET}.o
+.for F in ${NOERR:.o=.S}
+${F}: ${ARCHDIR}/SYS.h ${DESTDIR}/usr/include/sys/syscall.h
+       printf '#include "SYS.h"\nRSYSCALL_NOERROR(${.PREFIX})\n' >${.TARGET}
+.endfor
 
-${PPSEUDONOERR}: ${ARCHDIR}/SYS.h \
-    ${DESTDIR}/usr/include/sys/syscall.h
-       @echo creating ${.TARGET}
-       @printf '#include "SYS.h"\n \
-           PSEUDO_NOERROR(${.PREFIX},${.PREFIX:S/_//})\n' | \
-           ${CPP} -DGPROF ${ACPPFLAGS} ${AINC} | ${AS} -o ${.TARGET}.o
-       @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
-       @rm -f ${.TARGET}.o
-
-${SPSEUDONOERR}: ${ARCHDIR}/SYS.h \
-    ${DESTDIR}/usr/include/sys/syscall.h
-       @echo creating ${.TARGET}
-       @printf '#include "SYS.h"\n \
-           PSEUDO_NOERROR(${.PREFIX},${.PREFIX:S/_//})\n' | \
-           ${CPP} ${CPPPICFLAGS} ${ACPPFLAGS} ${AINC} | \
-           ${AS} ${APICFLAGS} -o ${.TARGET}
-
-
-${PSEUDONOERR}: ${ARCHDIR}/SYS.h \
-    ${DESTDIR}/usr/include/sys/syscall.h
-       @echo creating ${.TARGET}
-       @printf '#include "SYS.h"\n \
-           PSEUDO_NOERROR(${.PREFIX},${.PREFIX:S/_//})\n' | \
-           ${CPP} ${ACPPFLAGS} ${AINC} | ${AS} -o ${.TARGET}.o
-       @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
-       @rm -f ${.TARGET}.o
+.for F in ${PSEUDONOERR:.o=.S}
+${F}: ${ARCHDIR}/SYS.h ${DESTDIR}/usr/include/sys/syscall.h
+       @printf '#include "SYS.h"\n\PSEUDO_NOERROR(${.PREFIX},${.PREFIX:S/_//})\n' >${.TARGET}
+.endfor
 
 # Lint stubs for all automatically-generated assembly stubs (GENERATED)
-LSRCS+=        LintSysNormal.c LintSysNoerr.c LintSysPseudoNoerr.c
-DPSRCS+= LintSysNormal.c LintSysNoerr.c LintSysPseudoNoerr.c
-
-CLEANFILES+= LintSysNormal.c LintSysNoerr.c LintSysPseudo.c
+LSRCS+=                LintSysNormal.c LintSysNoerr.c LintSysPseudoNoerr.c
+DPSRCS+=       LintSysNormal.c LintSysNoerr.c LintSysPseudoNoerr.c
+CLEANFILES+=   LintSysNormal.c LintSysNoerr.c LintSysPseudoNoerr.c
 
 LintSysNormal.c: ${.CURDIR}/sys/makelintstub \
     ${DESTDIR}/usr/include/sys/syscall.h



Home | Main Index | Thread Index | Old Index