Closed lbraglia closed 9 years ago
I think that's a nice feature.
To remove a default PRJ
, would I remove the corresponding line from my .makerrc
file or call make set-default-prj
?
To remove the default project you can do
make set-default-prj PRJ=
or remove the corresponding line from the equivalent of .makerrc
.
The cons i see now (i always work with a default project and never thought about) is that in the rare (i guess) case
the PRJ used is "". With many commands (those with cd ${PRJ} && ...
) this is equivalent to work on the project/package in ~
(because of cd && ...
) that is not what the user expect...
So maybe a fix is needed to prevent make start doing things :)
I really like this idea. Thanks for sharing it. I will add the relevant targets to maker in the next days (a PR would be very welcome, too).
Maybe you are looking for something like the following to fix the mentioned problem with an empty PRJ
?:
ifndef PRJ
$(error PRJ is missing!)
endif
@sgibb definitely that! thanks
Hi,
in this Makefile
https://github.com/lbraglia/ProjectMake
which works on data-analysis projects (with Rnw and knitr) in a similar way to maker, i adopted a "trick" to set a default Project (
PRJ
, the equivalent ofPKG
for maker).Eg after
i avoid specifying
PRJ=Foobar
each time, eg with(say .. it's a way to produce the pdf of the final step of the analysis) i avoid the longer
It does it by setting/modifying the variable
PRJ
in.ProjectMake
(the equivalent of.makerrc
) with a minimal amount of regex.I've tested for a few month in daily usage: it works fine and speeds up things a lot to me, especially if i have to work on the same project for many make commands (that is usually the case). Furthermore it'is perfectly "backward compatible" (aka the user could continue to specify PRJ on command line)
Could you be interested in similar stuff for
PKG
? @lgatto @sgibb