From 6edbcbf9a3beefa45119d991252b37a66654bb79 Mon Sep 17 00:00:00 2001 From: Antoine LECA Date: Wed, 22 Jun 2011 23:35:26 +0200 Subject: [PATCH] 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. --- share/mk/sys.mk | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 71eb4c110..3bdb57821 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -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 -- 2.44.0