Default search path to include /usr/local/include and /usr/local/lib

Hi all,

I am (still) trying to build Julia, and I would like to set GCC (and gfortran and ld) to use /usr/local/* for linking and including search paths.

How can I do that at the top level of the project, "outside" of updating any Makefiles, so that I can run gmake and have it apply every call of ld and gcc and gfortran?

I have tried exporting
Code:
CPPFLAGS='-I/usr/local/lib -I/usr/lib'
before calling gmake, but it doesn't seem to change anything when I run gmake from the top of the source directory.

I know I can set
Code:
-l/usr/local/lib
and
Code:
-I/usr/local/include
for a given invocation of gcc, but I need it to default to these for the multiple invocations.

Thanks everybody -- for both the great ideas and the patience!
 
I would like to build up to that, though I am sure the porters manual has great info... Any ideas in the meantime?
 
Just start with a simple port skeleton. Most of the things you want done automatically are already automatically done by the ports system.

There are several steps you can use with a port
Code:
make extract # extracts the source
make patch   # applies the patches in the files/ directory
make configure # runs ./configure on the port (if it exists)
make         # starts the actual build

As you can see you can almost "single step" through the build process.
 
Ok, so I will try to start a port for Julia.

I read the porter's manual, but I am not quite sure on the step-by-step. Here is what I think I should do, please correct:
  1. mkdir julia-port
  2. cd julia-port
  3. copy some skeleton makefile, update it
  4. download a tarball of julia into /usr/ports/distfiles (or whatever it is called).
  5. run make in my ports directory
  6. then start patching...
Does that sound right?
 
Don't copy the file to /usr/ports/distfiles/ just yet. Configure the Makefile to fetch it correctly.

But you have the basic gist of it.
 
Also, verify that you have the right distfile, then run make distinfo to create the distinfo file for the port.
 
Back
Top