hughperman / pure-lang

Automatically exported from code.google.com/p/pure-lang
0 stars 0 forks source link

pure-sockets: Makefile ignores CPPFLAGS and LDFLAGS #57

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. make all CC=/opt/local/bin/clang CFLAGS="-O2" 
CPPFLAGS="-I/opt/local/include" CXX=/opt/local/bin/clang++ CXXFLAGS="-O2" 
LDFLAGS="-L/opt/local/lib"

What is the expected output? What do you see instead?
Expected a build without errors and warnings but got:

/opt/local/bin/clang -dynamiclib -O2  sockets.c -o sockets.dylib  -lpure 
sockets.c:16:10: fatal error: 'pure/runtime.h' file not found
#include <pure/runtime.h>
         ^
1 error generated.
make: [sockets.dylib] Error 1 (ignored)

The error is ignored and make returns with exit status 0; that's also 
unexpected.

What version of the product are you using? On what operating system?
pure 0.47, pure-sockets 0.3, llvm 2.9, clang 2.9, Mac OS X 10.6.7 x86_64

Please provide any additional information below.
pure/runtime.h is of course in /opt/local/include, and you see I have 
-I/opt/local/include in the CPPFLAGS, but the Makefile is ignoring it. The 
attached patch fixes the Makefile to respect CPPFLAGS, which eliminates the 
error. It also corrects LD_FLAGS to LDFLAGS as is normal.

Original issue reported on code.google.com by ryandesi...@gmail.com on 28 Apr 2011 at 11:58

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed in rev. efc370e97468. Thanks for reporting.

Original comment by aggraef@gmail.com on 30 Apr 2011 at 10:51

GoogleCodeExporter commented 8 years ago
I also uploaded a new tarball which has the fixed Makefile in it.

Original comment by aggraef@gmail.com on 30 Apr 2011 at 10:53