[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make's apparent weird behaviour
From: |
Sergio Villone |
Subject: |
make's apparent weird behaviour |
Date: |
Wed, 15 Dec 2010 10:22:12 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; it; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 |
as requested,I report the offending maketile,
the result and my comment directly here in
the mail body:
------------makefile-------------
.SILENT :;
SHELL:="/bin/tcsh"
$(info =========shell:$(SHELL))
define heastuff
echo "------heastuff----$(1)--------"
#aa create necessary vars
endef
.DEFAULT_GOAL:=all
.PHONY : all
all: doheastuff
echo "all done"
.PHONY:doheastuff
doheastuff:;
echo "••••doheastuff_heanm:>$(heanm)<"
$(foreach nm,$(heanm),$(call heastuff,$(nm)))
-------end of makefile------------------
-----result is-------------------------
=========shell:"/bin/tcsh"
••••doheastuff_heanm:>bug<
------heastuff----bug--------
#aa: Command not found.
make: *** [doheastuff] Error 1
---------end of result-------------
the makefile I reported here is a "stripped down"
version of the one that gives me problem,so don't
care about the strange names and the possibly
useless "echo"and "info" checks..
the problem lies in that "#aa: Command not found."
error in what should have simply been just a
comment in the makefile...I suppose that somewhere a tab is inserted
before the '#' and the entire line is considered
to be a command for the shell,but if this means that one
cannot put a comment in the define's body,at least
if one's shell is cshell,I ihink this is not
mentioned in the manual,otherwise stick me again
on my fingers and I'll stay quiet ;-(
or perhaps it's again a Posix derived "feature"...
the make -v says:
-----------make -v ------------
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin10.0
----------end of -v output----------------------------
so long...
--
sv
- make's apparent weird behaviour,
Sergio Villone <=