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.
This commit is contained in:
parent
32899676a8
commit
3d56ef8c48
@ -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 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user