bugmake - Bugs: bug #21854, Dependency to a -l<libname>...

 
 

bug #21854: Dependency to a -l<libname> to be made in a not yet existing directory doesn't match(?)

Submitted by:  Jesper Blommaskog <jesperb>
Submitted on:  Thu 20 Dec 2007 11:31:04 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.80Operating System: POSIX-Based
Fixed Release: 3.82Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 07 Jun 2009 02:11:06 AM UTC, comment #2:

This bug has already been fixed in the latest CVS version of make.

Paul D. Smith <psmith>
Project Administrator
Wed 09 Apr 2008 09:41:04 AM UTC, comment #1:

You can bypass this easily by adding another rule like:

-lfunny_name: path_to_library_where_to_get_library.so
#rules to place library where you want it

This dependency will be evaluated only when make does not resolve -lfunny_name by itself, i.e. the library does not exist in your scanned directory.

I use such technique in my Makefiles for about a year now and see no problems with that.

Anonymous
Thu 20 Dec 2007 11:31:04 AM UTC, original submission:

I want to have a ORDER_ONLY_DEPENDENCY to a shared library to be built before I link my main program and I want the shared library to be put in a directory to be created by the makefile if it doesn't already exist. I also want to use the "-l<libname>" syntax when linking and also in the make file to avoid getting a hard coded path to the shared object into my executable. I then tried the following, that won't work unless I create the directory "./temp" manually before running make,

will fail, giving
while
will compile and link properly.

My system is RedHat EL4 using GNU make 3.80, but it was the same using 3.81. Maybe this is simply an optimisation, to ignore some rules for non-existing directories?

Jesper Blommaskog <jesperb>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #14672:  Makefile added by jesperb (972B - application/octet-stream - "gmake" will fail, while "mkdir temp; gmake" will succeed)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by jesperb (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 28 Jul 2010 06:17:27 AM UTCpsmithFixed Release4.0=>3.82
    Sun 07 Jun 2009 02:11:06 AM UTCpsmithStatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.0
    Thu 20 Dec 2007 11:31:04 AM UTCjesperbAttached File-=>Added Makefile, #14672

    Back to the top


    Powered by Savane 3.1-cleanup1