tune/speed is up to date

Niels Möller nisse at lysator.liu.se
Thu Mar 26 07:09:07 UTC 2020


Seth Troisi <braintwo at gmail.com> writes:

> I'm coming from Bazel and don't have a lot of experience with Make so
> please excuse me if there's a much simpler answer I'm just not seeing.

First, note that GMP Makefiles in general don't do that accurate
tracking of dependencies (see comment on "no-dependencies" in
configure.ac).

> tune/speed seems to be statically linked, this makes sense, BUT it makes
> testing a little harder because this no longer works.
>
> $ vim mpz/nextprimes.c
> $ make
> $ make -C tune/ speed
> make: 'tune/speed' is up to date.
> $ ./tune/speed ...
> (RUNS WITHOUT NEWLY CHANGED CODE)

I agree this isn't ideal.

> I "solved" this by adding `.PHONY: $(EXTRA_PROGRAMS)`
> to tune/Makefile.am and wanted to checking if that should be upstreamed, or
> if there's another way to do this that I'm just unaware of.

I don't think .PHONY is the right tool; that's usually for targets that
shouldn't correspond to an actual file. Try adding ../libgmp.la to some
of the *DEPENDENCIES variables in tune/Makefile.am instead. (It's
already in libspeed_la_DEPENDENCIES, not sure that's really correct).

And if you want to make changes to configure and Makefile, make sure to
configure with --enable-maintainer-mode.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list