On 12/2/20 3:50 PM Manolo wrote:
>
> When building the test part of FLTK with configure+make this warning now
> appears :
Side note: in this context "now" obviously means "since make version
4.3". I don't see this warning, my make version is 4.2.1
> Makefile:318: warning: ignoring prerequisites on suffix rule definition
> It's caused by line #317 of test/Makefile
> .fl.cxx .fl.h: ../fluid/fluid$(EXEEXT)
> which is a suffix rule containing a prerequisite. That seems to not make
> sense for make, as explained in
> [...]
> My suggestion to remove this warning is that the prerequisite must just
> be removed, to obtain
> .fl.cxx .fl.h:
+1
> At any rate, the prerequisite is not operational, because the make command
> fails if fluid is not present in ../fluid/. So, we loose nothing by
> removing it.
>
> Am I overlooking something?
As it stands (and AFAICT) this is correct. At least since "some version"
(which I don't know) of make, perhaps this has been changed.
This code exists since Apr 29, 2002 (commit 782b3d639a) where Mike wrote
in the commit log:
Update test program dependencies on fluid - need to make the .fl
rules dependent on fluid, and the .cxx files dependent on the .fl
files.
So the intention was obviously to be able to build fluid as a
prerequisite if it didn't exist.
Maybe it worked in 2002 but I doubt it because today(!) there is no rule
in test/Makefile that would build '../fluid/fluid$(EXEEXT)' [1]. I don't
think that we can (or should) introduce a rule to build fluid in
test/Makefile (how? I wouldn't know).
So yes, I agree that this rule should be modified as suggested.
-----
[1] an implicit rule exists but it fails if you execute `make` in the
test folder if fluid doesn't exist (on my Linux system). I believe that
CMake + make would be much smarter than our old Makefile's.