Hi Philip,

What if I want to either include some file or define some other variables
depending on whether the file is existed or not?

For example, I want something like this. Therefore, I still need to test
whether a file exist or not. Can this be done in gmake?

#if file exist
include file
#else
VAR1 = bla bla
VAR2 = bla bla
#endif

Thanks,
Peng

On Tue, May 20, 2008 at 5:28 PM, Peng Yu <[EMAIL PROTECTED]> wrote:

> Hi Philip,
>
> I missed that part. Now I see that I should use -include.
>
> Thanks,
> Peng
>
>
> On Tue, May 20, 2008 at 5:24 PM, Philip Guenther <[EMAIL PROTECTED]>
> wrote:
>
>> On Tue, May 20, 2008 at 4:10 PM, Peng Yu <[EMAIL PROTECTED]> wrote:
>> > I want to include a file only if it is existed. Is there something in
>> gmake
>> > that can do this?
>>
>> If you mean "include" as in "make part of the build" then the
>> $(wildcard) function may do the trick.
>>
>> If you mean 'include' in the "treat as additional Makefile contents",
>> then the answer is yes, and it is described on the same page in the
>> GNU make info manual as the normal "include" directive.
>>
>>
>> Philip Guenther
>>
>
>
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to