This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: B20.1: make dependencies broken

Hmmm.  I tried make 3.77 from

It does fix my original problem.  However it seems to have real problems
with libraries and their dependencies.

I've been trying to generate a sample makefile but I can't get make to do
_anything_ interesting in a test case.

But try this

MARK = Mark

# Turn off default library rule
(%): %
        > $(MARK)

LIB = mylib.a

OBS = $(LIB)(f1.o) $(LIB)(f2.o)

All: $(OBS)
        # making $@ due to $?

I know this doesn't do anything useful but it just demonstrates a problem.
The proper makefile generates a load of objects and then puts them into the
library all in one go.

touch f1.o f2.o

I expect to get:
> Mark
> Mark
# making All due to f1.o f2.o

On cygwin all I get is
make: *** No rule to make target `mylib.a(f1.o)', needed by `All'.  Stop.

This works on the make versions I listed previously but does not work on
cygwin using make 3.76 or 3.77
I'm really puzzled how the cygwin developers manage to use this make.

The problem I was trying to demonstrate is that the '# making' line is
printed as
# making All due to mylib.a(f1.o) mylib.a(f2.o)

which is what I get when running this on my real makefile.  This is
definitely wrong as the make documentation clearly states that $? expands
the library members and not the full path.

I think I will just give up trying to go down this route as make 3.75 seems
to work perfectly well.
Thanks for your help.


Want to unsubscribe from this list?
Send a message to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]