yochju / latex-makefile

Automatically exported from code.google.com/p/latex-makefile
Other
0 stars 0 forks source link

Make clean target a double colon target #124

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'd like to clean some generated file by my script. I think it makes sense to 
make the clean target a double colon:
http://www.gnu.org/software/make/manual/make.html#Double_002dColon
http://stackoverflow.com/questions/1644920/override-target-in-makefile-to-add-mo
re-commands

It may also make sense to make the all target double colon.
Thx!

Original issue reported on code.google.com by andre.r...@gmail.com on 7 Apr 2011 at 9:23

GoogleCodeExporter commented 9 years ago
I'm not sure I believe that a :: target is needed, here.  Just to be sure that 
I understand the use case, you are asking for the ability to add your own 
dependencies to clean?

But, make already supports that with single-colon targets, and this makefile 
makes abundant use of those.

You could, for example, have the following in your Targets.ini file:

.PHONY: clean-foo
clean-foo:
  rm *.my-foo

clean: clean-foo

And that would do it.  There's no need to make it a double-colon target.  The 
same goes for "all".

Original comment by shiblon on 8 Apr 2011 at 5:51

GoogleCodeExporter commented 9 years ago
I verified that the above works, so I think we're all set!

Please reopen this issue if you are unable to get this working.

Original comment by shiblon on 22 Apr 2011 at 3:46