OS X CFLAGS definition caused silent failure to build debug version of luasocket.

The luasocket tests require LUASOCKET_DEBUG to be defined at build time,
but for OS X if COMPAT was undefined, the command line looked like
  ... -I -DLUASOCKET_DEBUG ...
so that the the macro definition was silently being treated as the
argument to -I. Result is the macro was never set, and tests would
never run. Fixed by moving -I to the (optional) definition of the
location of compat headers.
This commit is contained in:
Sam Roberts 2011-09-27 12:26:38 -07:00
parent 1f704cfb89
commit a8b19e5367

6
config
View File

@ -23,7 +23,7 @@ LUAINC=-I/usr/include/lua5.1
#------ #------
# Compat-5.1 directory # Compat-5.1 directory
# #
#COMPAT=compat-5.1r5 #COMPAT=-Icompat-5.1r5
#------ #------
# Top of your Lua installation # Top of your Lua installation
@ -47,7 +47,7 @@ INSTALL_EXEC=cp
# #
#CC=gcc #CC=gcc
#DEF= -DLUASOCKET_DEBUG -DUNIX_HAS_SUN_LEN #DEF= -DLUASOCKET_DEBUG -DUNIX_HAS_SUN_LEN
#CFLAGS= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fno-common #CFLAGS= $(LUAINC) $(COMPAT) $(DEF) -pedantic -Wall -O2 -fno-common
#LDFLAGS=-bundle -undefined dynamic_lookup #LDFLAGS=-bundle -undefined dynamic_lookup
#LD=export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc #LD=export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
@ -56,7 +56,7 @@ INSTALL_EXEC=cp
# for Linux # for Linux
CC=gcc CC=gcc
DEF=-DLUASOCKET_DEBUG DEF=-DLUASOCKET_DEBUG
CFLAGS= $(LUAINC) $(DEF) -pedantic -Wall -O2 -fpic CFLAGS= $(LUAINC) $(COMPAT) $(DEF) -pedantic -Wall -O2 -fpic
LDFLAGS=-O -shared -fpic LDFLAGS=-O -shared -fpic
LD=gcc LD=gcc