I'm trying to write a simple makefile that copies a local file named edan.el to ${EDAN_DIR}/edan.el, assuming that ${EDAN_DIR}/edan.el is not already there.
The following makefile does not work because of the line """init: ${EDAN_EL}""" … I'd appreciate some help with this. Thanks!
I'm trying to write a simple makefile that copies a local file named edan.el to ${EDAN_DIR}/edan.el, assuming that ${EDAN_DIR}/edan.el is not already there.
The following makefile does not work because of the line """init: ${EDAN_EL}""" … I'd appreciate some help with this. Thanks!
.PHONY: init
EDAN_DIR = ${HOME}/.emacs.d
EDAN_EL = ${EDAN_DIR}/edan.el
init: ${EDAN_EL}
cp edan.el ${EDAN_EL}
I think the following would work:
$(EDAN_EL): edan.el
cp edan.pl $(EDAN_EL)
init: $(EDAN_EL)
You say that $(EDAN_EL) depands on edan.pl. Whenever edan.el is newer than $(EDAN_EL), or $(EDAN_EL) doesn't exists, the copy will take place.
you could also write above
$(EDAN_EL): edan.el
cp $(input) $(output)
Thanks. Is there any difference between using parentheses instead of braces? $(VAR) versus ${VAR}
I think not, just what you're used to. You can also use ${{ }} when needed.