Brian Dessent wrote:
Chen Jun  wrote:

How can I do it? I know I can add another rule to accomplish that, e.g.

Why do you even need $(shell ...) here?  All the commands in the recipe
are implicitly evaluated by the shell, so just do your conditional there:

outfile = out.txt

$(outfile):
        @echo -n "STRT: $@ "; if [ -f $@ ]; then echo exist; else echo absent; 
fi
        @touch $@
        @echo -n "DONE: $@ "; if [ -f $@ ]; then echo exist; else echo absent; 
fi

Brian

Well Brian, the example presented by me is just a fabricated one, not for my real world use. I use $(shell ) just to introduce a make variable or a make function so that my question becomes concrete. My real world case regarding this problem is quite a bit complex so I'd like not to talk about to it directly.


begin:vcard
fn;quoted-printable:Chen Jun=EF=BC=88=E9=99=88=E5=86=9B=EF=BC=89
n:Chen;Jun
org:Fujian Newland Auto-ID Tech. Co,.Ltd.;Technical Department
adr:;;Newland Science & Technology Park, No.1 Rujiang Avenue, Mawei District, Fuzhou, China;Fuzhou;Fujian;350015;China
email;internet:[EMAIL PROTECTED]
title:Software Engineer
x-mozilla-html:TRUE
url:www.nlscan.com
version:2.1
end:vcard

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to