URL: <http://savannah.gnu.org/bugs/?21854>
Summary: Dependency to a -l<libname> to be made in a not yet existing directory doesn't match(?) Project: make Submitted by: jesperb Submitted on: torsdag 2007-12-20 den 11:31 Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 3.80 Operating System: POSIX-Based Fixed Release: None _______________________________________________________ Details: 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, gmake will fail, giving gmake: *** No rule to make target `-lfunny_name', needed by `my_program'. Stop. while "mkdir temp; gmake" 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? _______________________________________________________ File Attachments: ------------------------------------------------------- Date: torsdag 2007-12-20 den 11:31 Name: Makefile Size: 972 B By: jesperb "gmake" will fail, while "mkdir temp; gmake" will succeed <http://savannah.gnu.org/bugs/download.php?file_id=14672> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?21854> _______________________________________________ Meddelandet skickades via/av Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make