Re: gmake question
From: Alexis Huxley (ahuxley_at_gmx.net)
Date: 10/28/04
- Next message: dfrench_at_mtxia.com: "Re: Check for special character"
- Previous message: Dmitry: "gmake question"
- In reply to: Dmitry: "gmake question"
- Next in thread: Paul D. Smith: "Re: gmake question"
- Reply: Paul D. Smith: "Re: gmake question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 28 Oct 2004 19:08:03 +0200
> I would expect it to be done in the following way:
>
> PRINT_B=NO
>
> xxx:
> ( \
> echo a; \
> ifeq ($(PRINT_B),YES)
> echo b; \
> endif
> echo c; \
> ) > xxx
>
> The problem is that ifeq and endif is interpreted by shell and not by make file.
Which doesn't understand them.
So use shell's own 'if' (not tested)
xxx:
( \
echo a; \
if [ "$(PRINT_B)" = YES ]; then \
echo b; \
fi; \
echo c; \
) > xxx
Alexis
- Next message: dfrench_at_mtxia.com: "Re: Check for special character"
- Previous message: Dmitry: "gmake question"
- In reply to: Dmitry: "gmake question"
- Next in thread: Paul D. Smith: "Re: gmake question"
- Reply: Paul D. Smith: "Re: gmake question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|