Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old September 30th, 2008, 11:41 PM
Newbie
 
Join Date: Sep 2008
Posts: 1
Default FreeBSD ports config and makefiles

Hi

I am trying out FreeBSD and don't know much scripting - I am trying to build some programs from the ports. Now in linux I could do something like

./configure --abcdef --ghijkl

then "make install", and the docs for various programs also tell me how to config in this way. What is the equivalent for FreeBSD ports? I have tried something like "make config" or "make showconfig" but it doesn't give the equivalent functionality or sometimes it just says "no options" evne though the program's site says there are.

Well I noticed that there is no configure script in the ports directories which is why ./configure doesn't work, but when building stuff I can see that it has extracted the script elsewhere and is running it. So how do I pass the options to that script?

I have also ventured into the makefile, for example this one

Expand|Select|Wrap|Line Numbers
  1. .if !defined(WITHOUT_NLS)
  2. USE_ICONV=        yes
  3. CONFIGURE_ENV=        CPPFLAGS="-I${LOCALBASE}/include" \
  4.             LIBS="-L${LOCALBASE}/lib -liconv"
  5. CONFIGURE_ARGS+=    --enable-nls
  6. PLIST_SUB+=        NLS:=""
  7. .else
  8. CONFIGURE_ENV=        CPPFLAGS="-I${LOCALBASE}/include" \
  9.             LIBS="-L${LOCALBASE}/lib"
  10. CONFIGURE_ARGS+=    --disable-nls
  11. PLIST_SUB+=        NLS:="@comment "
  12. .endif
  13.  
  14. .if !defined(WITHOUT_REMEMBER)
  15. CONFIGURE_ARGS+=    --enable-remember
  16. .else
  17. CONFIGURE_ARGS+=    --disable-remember
  18. .endif
  19.  
  20. .if !defined(WITHOUT_SLIT)
  21. CONFIGURE_ARGS+=    --enable-slit
  22. .else
  23. CONFIGURE_ARGS+=    --disable-slit
  24. .endif
  25.  
could someone please explain - how do I define the things like WITHOUT_SLIT and where is CONFIGURE_ARGS passed to, what is the best way to do what I want to do?

Thanks for all help.
Reply
  #2  
Old October 8th, 2008, 03:43 AM
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 4,632
Default

It's not necessary to run ./configure because ports already has that in the Makefile by the maintainer. To add options, you just do make --OPTION install
Reply
Reply

Bookmarks

Thread Tools

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 Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles