Re: GNU Make for Java projects

2019-01-23 Thread Brian Vandenberg
It's been years, but I'll throw in my 2 cents in case it helps. I attempted to make some java stuff build using a makefile and ran into circular dependency issues: foo.java depended on bar.java & vice-versa. When I attempted to compile foo.java by itself it complained about unsatisfied dependencie

Re: Circular dependency with order-only dependencies

2019-01-23 Thread Paul Smith
On Wed, 2019-01-23 at 21:21 +0200, Eli Zaretskii wrote: > > From: Paul Smith > > Cc: bug-make@gnu.org > > Date: Wed, 23 Jan 2019 13:55:49 -0500 > > > > That's not how it works. Order-only prerequisites are considered > > identically to normal prerequisites in every way except one: after > > all

Re: Circular dependency with order-only dependencies

2019-01-23 Thread Eli Zaretskii
> From: Paul Smith > Cc: bug-make@gnu.org > Date: Wed, 23 Jan 2019 14:49:42 -0500 > > One way this can be done is by using a recursive invocation of make. Wouldn't that cause an infinite recursion? ___ Bug-make mailing list Bug-make@gnu.org https://l

Re: Circular dependency with order-only dependencies

2019-01-23 Thread Eli Zaretskii
> From: Paul Smith > Cc: bug-make@gnu.org > Date: Wed, 23 Jan 2019 13:55:49 -0500 > > That's not how it works. Order-only prerequisites are considered > identically to normal prerequisites in every way except one: after all > the prerequisites, including order-only prerequisites, are brought up

Re: Circular dependency with order-only dependencies

2019-01-23 Thread Paul Smith
On Wed, 2019-01-23 at 19:55 +0200, Eli Zaretskii wrote: > > From: Paul Smith > > Date: Wed, 23 Jan 2019 12:00:20 -0500 > > > > GNU make's internal dependency graph determines the order in which > > targets are built. It must be acyclical, otherwise make can never > > choose which target to build

Re: Circular dependency with order-only dependencies

2019-01-23 Thread Eli Zaretskii
> From: Paul Smith > Date: Wed, 23 Jan 2019 12:00:20 -0500 > > GNU make's internal dependency graph determines the order in which > targets are built. It must be acyclical, otherwise make can never > choose which target to build before others. > > In your example makefile you have a cycle: > >

Re: Circular dependency with order-only dependencies

2019-01-23 Thread Paul Smith
On Wed, 2019-01-23 at 18:35 +0200, Eli Zaretskii wrote: > I was surprised to see it complain and drop the a.h <- b dependency, > since it is an order-only dependency. Is this a bug? If not, what > kind of problems can happen due to such "circular" dependencies? I don't think it's a bug. GNU mak

Circular dependency with order-only dependencies

2019-01-23 Thread Eli Zaretskii
The following short Makefile: all: b a.o: a.h touch a.o a.h: foo | b touch a.h t: a.o touch t b: t touch b followed by these commands: touch foo make produces: make: Circular a.h <- b dependency dropped. touch a.h touch a.o touch t touch b I