Closed shiblon closed 8 years ago
We should probably make a wiki entry for this, as it is a thorny problem. I can't move
the main target above Makefile.ini for various reasons (it used to be there, stuff
broke, it got moved back).
Not only does "all" not work implicitly anymore, but $(onlysources.tex) is not defined,
yet, so spell won't work properly, either.
I wonder if we should have a special Makefile.extratargets or something...
Reported by shiblon
on 2011-04-06 18:16:46
Actually, I just looked at this in more depth, and there is a way around the default
target issue, but not the variables-not-yet-specified issue.
So, here's the proposal, and it's implemented in the attached file for you to fiddle
with: we load files called "Targets.ini" and $(HOME)/.latex-makefile/Targets.ini (either
or both, as they happen to exist), and we do that after all main targets and variables
are specified.
Let me know how the attached file works for you. If you like it, I'll push it.
Reported by shiblon
on 2011-04-06 18:28:41
Started
Hi!
Thx for the update. I actually digged a little bit into the issue and found this:
http://www.gnu.org/software/make/manual/make.html#index-processing-a-makefile-27
So if you set this:
.DEFAULT_GOAL := all
in you Makefile then the all will still be the default target and my ispell stuff doesnt
brake it. Personally I think the Variables.ini, Targets.ini is cleaner but since most
users will likely not run into this issue it might be a better idea to just stick with
the Makefile.ini approach (IMHO).
Actually setting the .DEFAULT_GOAL variable in the Makefile.ini also solves the problem.
So maybe even a wiki entry is enough. (I would include it in the Makefile however).
Thanks again for you effort!
Reported by andre.rauh
on 2011-04-06 19:28:02
Thinking a little about it:
I think the most sens makes a
.DEFAULT_GOAL ?= all
since then someone who actually wants the default goal to be the first target can overwrite
it in the Makefile.ini. But the most other ppl can easily extend it w/o having to know
about .DEFAULT_GOAL.
Reported by andre.rauh
on 2011-04-06 19:31:12
Cool. I'll add that. Can you verify that ?= does the right thing in your file? If
so, I'll commit this change.
Reported by shiblon
on 2011-04-06 19:49:58
Ughh, good that you checked :)
'?=' doesnt work on this special variable. But this worked:
right after your version:
[...]
version := 2.2.0-rc13
.DEFAULT_GOAL := all
[...]
-include Makefile.ini
And if I want to have a target in Makefile.ini as the default then I can still write
a:
.DEFAULT_GOAL := spell
in my Makefile.ini which overwrite the `all`...
Reported by andre.rauh
on 2011-04-06 19:57:10
Excellent. I've attached my current makefile for you to try out with these fixes.
Reported by shiblon
on 2011-04-06 20:00:00
Works perfectly! Thx
Reported by andre.rauh
on 2011-04-06 20:01:28
OK. re61108523ef5 has this change committed. Pushing rc14 now.
Reported by shiblon
on 2011-04-06 20:04:21
Verified
Originally reported on Google Code with ID 121
Reported by
andre.rauh
on 2011-03-28 22:38:55