LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 01-17-2019, 07:52 AM   #1
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528

Rep: Reputation: 167Reputation: 167
Should LOCALBASE be a pre-defined environmental variable?


I've seen `${LOCALBASE}` used in a couple BSD makefiles recently for a couple different projects. Ex:

Code:
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
I'm using OpenBSD 6.4 but that variable isn't in my environment. Is it normally present and defined on BSD systems?
 
Old 01-17-2019, 05:36 PM   #2
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 289

Rep: Reputation: 169Reputation: 169
It's a variable used by the ports(7) infrastructure. Per bsd.port.mk(5), which describes all targets and usable variables:
Code:
     LOCALBASE
             where other ports have already been installed.  Default:
             /usr/local.
The pkg_add(1) man page is also helpful:
Code:
     -L localbase
              Install a package under localbase.  By default, localbase equals
              /usr/local, and specifying it is not necessary.  However,
              packages can be created using a different localbase (see
              pkg_create(1)), and those packages can only be installed by
              using the same localbase.  See bsd.port.mk(5) for a description
              of LOCALBASE.

Last edited by jggimi; 01-17-2019 at 05:40 PM. Reason: clarity, added pkg_add comments
 
1 members found this post helpful.
  


Reply

Tags
environment variables, makefile


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace variable with user defined variable ce124 Programming 10 04-13-2007 09:29 AM
nohup tcsh (environmental variable) podollb Linux - Software 0 05-17-2004 05:44 PM
"How do i add an Environmental Variable in Redhat 8 ???? jmax24 Linux - Software 1 04-17-2004 12:30 AM
setting environmental variable cc to a working compiler blathen Linux - Newbie 2 10-27-2003 12:30 AM
how to get environmental variable from JAVA program edreddy Programming 2 07-29-2002 10:38 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 09:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration