From 3d56ef8c48cb7b80e195caec29f2d7cec7bafb1b Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Wed, 23 Apr 1997 10:49:54 +0000 Subject: [PATCH] Generate .S files for syscalls. This has many advantages: - dependencies actually work (I need this to propagate some fixes in ) - the cpp pipeline goes away, so errors can't leak out of it and an ANSI cpp is automatically used. - it's simpler - standard rules get used instead of repetitive special rules. (This showed bugs in the strip steps in the standard rules. The wrong strip flag was also used for *.po here.) Removed some ${ECHO}s and `@'s. Normal make echoing of what is being done is now not much more verbose than the echo messages were, and is more useful. --- lib/libc/sys/Makefile.inc | 43 ++++++++------------------------------- 1 file changed, 9 insertions(+), 34 deletions(-) diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index bc090eb8f029..e95d4e4c4f56 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.3 (Berkeley) 10/24/94 -# $Id: Makefile.inc,v 1.26 1997/04/01 22:57:56 ache Exp $ +# $Id: Makefile.inc,v 1.27 1997/04/01 23:07:55 ache Exp $ # sys sources .PATH: ${.CURDIR}/${MACHINE}/sys ${.CURDIR}/sys @@ -42,43 +42,18 @@ PSEUDO= _exit.o _getlogin.o OBJS+= ${ASM} ${PSEUDO} -${ASM}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h - @${ECHO} creating ${.PREFIX}.o - @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \ - ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.o - @${LD} -O ${.PREFIX}.o -x -r ${.PREFIX}.o +SASM= ${ASM:S/.o/.S/} -PASM= ${ASM:.o=.po} -${PASM}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h - @${ECHO} creating ${.PREFIX}.po - @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \ - ${CPP} -DPROF ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.po - @${LD} -O ${.PREFIX}.po -x -r ${.PREFIX}.po +SPSEUDO= ${PSEUDO:S/.o/.S/} -SASM= ${ASM:.o=.so} -${SASM}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h - @${ECHO} creating ${.PREFIX}.so - @printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' | \ - ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.PREFIX}.so +SRCS+= ${SASM} ${SPSEUDO} -${PSEUDO}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h - @${ECHO} creating ${.PREFIX}.o - @printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.o - @${LD} -O ${.PREFIX}.o -x -r ${.PREFIX}.o +${SASM}: + printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET} -PPSEUDO=${PSEUDO:.o=.po} -${PPSEUDO}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h - @${ECHO} creating ${.PREFIX}.po - @printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} -DPROF ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -o ${.PREFIX}.po - @${LD} -O ${.PREFIX}.po -x -r ${.PREFIX}.po - -SPSEUDO=${PSEUDO:.o=.so} -${SPSEUDO}: ${.CURDIR}/${MACHINE}/SYS.h /usr/include/sys/syscall.h - @${ECHO} creating ${.PREFIX}.so - @printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' | \ - ${CPP} -DPIC ${CFLAGS:M-[ID]*} ${AINC} | ${AS} -k -o ${.PREFIX}.so +${SPSEUDO}: + printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' \ + > ${.TARGET} MAN2+= sys/accept.2 sys/access.2 sys/acct.2 sys/adjtime.2 sys/bind.2 \ sys/brk.2 sys/chdir.2 sys/chflags.2 sys/chmod.2 sys/chown.2 \