summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-04-23 10:49:54 +0000
committerbde <bde@FreeBSD.org>1997-04-23 10:49:54 +0000
commitcfbf7a33747da2481c859397b19a68568ebeb3de (patch)
treea974202fa9ac9edaf86ebf39166654660a8af6ef /lib
parentd164e41abb4961bc6445fa638bf014f190daede1 (diff)
downloadFreeBSD-src-cfbf7a33747da2481c859397b19a68568ebeb3de.zip
FreeBSD-src-cfbf7a33747da2481c859397b19a68568ebeb3de.tar.gz
Generate .S files for syscalls. This has many advantages:
- dependencies actually work (I need this to propagate some fixes in <machine/asm.h>) - 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.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/Makefile.inc43
1 files changed, 9 insertions, 34 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index bc090eb..e95d4e4 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 \
OpenPOWER on IntegriCloud