bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-make] .LIBPATTERNS - new functionality in gnu-make 3.79


From: Paul D. Smith
Subject: Re: [Bug-make] .LIBPATTERNS - new functionality in gnu-make 3.79
Date: 21 Sep 2000 13:59:58 -0400
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

%% "John O'Connor \(at home\)" <address@hidden> writes:

  joh> I am using gnu make 3.79 under Solaris 2.6.

Please upgrade to the latest, 3.79.1.  There have been some important
bugs fixed in that version.  That's what I'm using for my tests.

  joh> The new .LIBPATTERN functionality is very useful, but does not
  joh> appear to work in the "true" make sense (to me at least).

  joh> The following is the type of problem I am trying to solve:-

  joh>   VPATH :=  $(LIBDIR):$(LIBDIR2)

  joh>   LIBS := -lffoobar

  joh>   $(BINDIR)/prog : $(CURDIR)/source.c $(filter -l% %.a, $(LIBS))
  joh>       cc -o $@ < $(LIBS)

  joh>   $(LIBDIR)/libfoobar.so : (LIBDIR)/libfoobar.so.1
  joh>       rm $@
  joh>       ln -s $< $@

  joh>   (LIBDIR)/libfoobar.so.1 : $(OBJS)
  joh>       cc -o $@ etc. etc.

There are a large number of typos in the above example; after I cleaned
it up, though, it all worked fine for me... ?

Here's the makefile I used; I tweaked it so I didn't need any real code
but it works the same way, I think:

  BINDIR = .

  LIBDIR = l1
  LIBDIR2 = l2

  VPATH :=  $(LIBDIR):$(LIBDIR2)

  LIBS := -lfoobar

  $(BINDIR)/prog : $(CURDIR)/source.c $(filter -l% %.a, $(LIBS))
          @echo cc -o $@ $< $(LIBS)

  $(LIBDIR)/libfoobar.so : $(LIBDIR)/libfoobar.so.1
          rm -f $@
          ln -s $< $@

  $(LIBDIR)/libfoobar.so.1 : $(OBJS)
          touch $@

Then I did this:

  $ mkdir l1 l2
  $ touch source.c

and it worked:

  $ make
  touch l1/libfoobar.so.1
  rm -f l1/libfoobar.so
  ln -s l1/libfoobar.so.1 l1/libfoobar.so
  cc -o prog /tmp/2/source.c -lfoobar

  joh> It looks like the algorithm is able to locate the file is
  joh> present, but is unable to make the library on demand from the -l
  joh> dependency ?

If you can't get it to work with 3.79.1, I'll need to see a sample
makefile that you can run to produce the problem.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


reply via email to

[Prev in Thread] Current Thread [Next in Thread]