diff options
author | bde <bde@FreeBSD.org> | 1997-10-16 13:46:50 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-10-16 13:46:50 +0000 |
commit | fd943454deb6ae134e5586a8f2be72da4dbcff71 (patch) | |
tree | dfb01b790d2ac8956d87a02e706e1cbb405d8b6b /lib/libc/Makefile.inc | |
parent | 892dc3af7f13eb32842f75312cfed61179246caf (diff) | |
download | FreeBSD-src-fd943454deb6ae134e5586a8f2be72da4dbcff71.zip FreeBSD-src-fd943454deb6ae134e5586a8f2be72da4dbcff71.tar.gz |
Handle machine-dependent (m-d) (string) sources more automatically.
The names of m-d variants are now added (manually) to MDSRCS instead
of to SRCS, and the names of all machine-independent (m-i) variants
that can reasonably be replaced by an m-d variant are now added
(manually) to MISRCS instead of to SRCS, so that a simple substitution
can be used to discard the unused m-i variants. MISRCS is potentially
all m-i sources, but the substitution is too simple to be fast, so
MISRCS should be kept reasonably small.
libc/Makefile.inc:
Do the substitution.
libc/i386/string/Makefile.inc:
Add to MDSRCS instead of to SRCS. Add the names of all sources in this
directory, but no others.
libc/string/Makefile.inc
Add to MISRCS instead of to SRCS. Add the names of all sources in this
directory. Don't use (broken) explicit rules for special cases.
Diffstat (limited to 'lib/libc/Makefile.inc')
-rw-r--r-- | lib/libc/Makefile.inc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/libc/Makefile.inc b/lib/libc/Makefile.inc index 92f56b8..6e29f43 100644 --- a/lib/libc/Makefile.inc +++ b/lib/libc/Makefile.inc @@ -1,4 +1,4 @@ -# $Id: Makefile.inc,v 1.1 1997/05/03 03:49:51 jb Exp $ +# $Id: Makefile.inc,v 1.2 1997/10/15 16:29:08 bde Exp $ # # This file contains make rules that are shared by libc and libc_r. # @@ -22,3 +22,14 @@ CFLAGS+= -DYP .include "${.CURDIR}/../libc/yp/Makefile.inc" .endif + +# Append machine-dependent sources, then append machine-independent sources +# for which there is no machine-dependent variant. +.if !empty(MDSRCS) +SRCS+= ${MDSRCS} +.for _src in ${MISRCS} +.if ${MDSRCS:R:M${_src:R}} == "" +SRCS+= ${_src} +.endif +.endfor +.endif |