Update of bug #36800 (project make): Status: None => Not A Bug Open/Closed: Open => Closed
_______________________________________________________ Follow-up Comment #1: Hi Serguei; this is a problem with your makefile, and has nothing to do with GNU make. The problem is that you think make is going to expand backquotes. Backquotes are a _shell_ feature, and make doesn't do anything special with backquotes. As a result, the target your makefile has told make will be built by this rule is actually the literal string "myapp-bundle-0.3.1-devel-`date +%Y%m%d`.tar.gz" Now, when that value appears in the command script of the rule, the shell sees it and expands it properly, but make does not. If you want to have the results of a shell command used in a make variable then there is only one way to do it: with the $(shell ...) function. Something like this: ... DATESTAMP := $(shell date +%Y%m%d) VERSION = 0.3.1-devel-$(DATESTAMP) DATAEXE = myapp ... $(DATAEXE)-bundle-$(VERSION).tar.gz: all #... ... This is better anyway, because if you do a build just around midnight, then it's possible different invocations of the date command could return different values. Better to ensure that all rules and targets use the same value, computed only one time. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?36800> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make