sys.mk: Improved defaults (sys.mk) for make(1)

. Handle more compiler names, including most cross-compilers.
  . Allows to use acd(1) and [whatever-]acc to designate ACK compiler.
  . Do not abort (on COMPILER_TYPE not defined) if the compiler name
    is not recognized.
This commit is contained in:
Antoine LECA 2011-06-22 23:35:26 +02:00 committed by Ben Gras
parent 35b203fdb1
commit 6edbcbf9a3

View file

@ -10,7 +10,8 @@ __MINIX= yes
.LIBS: .a
AR?= aal
### MINIX: see at bottom
#AR?= aal
ARFLAGS?= rl
RANLIB?= ranlib
@ -229,11 +230,12 @@ YACC.y?= ${YACC} ${YFLAGS}
# MINIX
.if !empty(CC:Mcc)
.if !empty(CC:Mcc) || !empty(CC:Macd) || !empty(CC:M*acc)
COMPILER_TYPE=ack
.elif !empty(CC:Mgcc) || !empty(CC:Mclang)
AR?= aal
.elif !empty(CC:M*gcc) || !empty(CC:M*clang) || !empty(CC:M*pcc)
COMPILER_TYPE=gnu
AR=ar
AR?= ar
.endif
.if exists(/usr/pkg/i386-pc-minix/lib/ldscripts/elf_i386_minix.x) \
@ -243,7 +245,7 @@ MINIX_GENERATE_ELF=yes
# Set NBSD_LIBC to either "yes" or "no".
.if !defined(NBSD) || (${NBSD} == "no") \
|| (${COMPILER_TYPE} == "ack")
|| !defined(COMPILER_TYPE) || (${COMPILER_TYPE} == "ack")
NBSD_LIBC= no
.else
NBSD_LIBC= yes