Closed lbraglia closed 10 years ago
That seems a great idea to me; I would favourably consider a pull request. Sebastian, any comments?
Hi Luca,
that is an interesting use case and a great extension.
Maybe we don't need to include this extension into the maker Makefile. What do you think about including the following lines in your ~/.makerrc
?
ADDMAKEFILESDIR := ${MAKERDIR}/makefiles/
include ${ADDMAKEFILESDIR}/Makefile.*
I would definitively consider a pull request if you can convince me that .makerrc
is not the right place.
Best wishes,
Sebastian
Yes, I like the .makerrc
solution, as it allows to include any Makefile
.
Ok for the makerrc solution.. i' m working on it asap (right now i don't have a www-connected pc here). Bye, luca
i've tried adding that 2 lines to makerrc (with unchanged Makefile) but it does not work for me (eg additional targets putted in makefiles dir are not available ) i've searched for unallowed recursive include
ing in make, but that seems not to be the case. Maybe i'm missing something, but can you reproduce it?
Do you really use ~/.makerrc
(not ${MAKERDIR}/.makerrc
)? Because these two lines in my ~/.makerrc
do exactly what they should do:
~/.makerrc
:
ADDMAKEFILESDIR := ${MAKERDIR}/makefiles/
include ${ADDMAKEFILESDIR}/Makefile.*
${MAKERDIR}/makefiles/Makefile.foo
:
foo:
@echo bar
Example run:
> make PKG=cleaver foo
bar
Yes i was changing ${MAKERDIR}/.makerrc
. After a local copy refresh (to be like the original) I did the following but still I can't use it, any hint what i am doing wrong?
l@np350v5c:~/src/rpkg$ ls -a maker
. .. .git include LICENSE Makefile makefiles .makerrc README.md
l@np350v5c:~/src/rpkg$ cat .makerrc
ADDMAKEFILESDIR := ${MAKERDIR}/makefiles/
include ${ADDMAKEFILESDIR}/Makefile.*
l@np350v5c:~/src/rpkg$ cat maker/.makerrc
## configuration Makefile for maker
## don't build vignettes
VIG := 0
## always use --as-cran
CRAN := 1
## specify output format for time (needs GNU time)
## see "man time" for details
# TIMEFORMAT := -f "time: %e"
l@np350v5c:~/src/rpkg$ cat maker/makefiles/Makefile.foo
foo:
@echo bar
l@np350v5c:~/src/rpkg$ make PKG=cleaver foo
make: *** Nessuna regola per generare l'obiettivo "foo". Arresto.
l@np350v5c:~/src/rpkg$ cd maker/
l@np350v5c:~/src/rpkg/maker$ git status
Sul branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
makefiles/
nothing added to commit but untracked files present (use "git add" to track)
The .makerrc
with the following to lines:
ADDMAKEFILESDIR := ${MAKERDIR}/makefiles/
include ${ADDMAKEFILESDIR}/Makefile.*
must be in your home directory (~/.makerrc
), e.g.: /home/lbraglia/.makerrc
.
lol, that was a quite stupid error :) ! thanks. bye, Luca
Hi,
Nice project, thanks.
Have you maybe considered allowing the user to add targets via external Makefiles?
eg this is a quick implementation, but has been quite handy to me
https://github.com/lbraglia/maker/blob/master/Makefile
currently additional Makefiles are stored in
maker/makefiles
and are sourced viamake
'sinclude
. Eg In my copy I use additional project-specific makefiles, that aim to ease working on other's R project on github egAnyway, thanks.
Cheers, Luca