#1 GNU make parametrized variable not recognized

closed
nobody
None
5
2003-05-02
2003-04-11
Anonymous
No

Hello,

I have currently a Makefile written for GNU make
with variable parametrized by the machine type.

For example, here to indicate if we are in 32 or 64 bits
environment. makepp doesn't seem to recognize it.

### AMD_ENV
# 32 : 32 bits environment
# 64 : 64 bits environment

amd_env HP-UX = 32
amd_env SunOS = 32
AMD_ENV = $(amd_env $(OS_NAME)

Is it normal ?
Is it planned to have it supported.

Thanks in advance

Benoit Lemarchand
blemarchand@amadeus.net
Sophia Antipolis
FRANCE

Discussion

  • Gary Holt

    Gary Holt - 2003-05-02
    • status: open --> closed
     
  • Gary Holt

    Gary Holt - 2003-05-02

    Logged In: YES
    user_id=421740

    [I am sorry for the delay in responding. I didn't have it
    set up properly to email me when enhancement requests were
    entered.]

    What's going on here is that make supports variables with
    whitespace in them, so you are actually defining two
    variables "amd_env HP-UX" and "amd-env SunOS". Then the
    next line picks one of them. The problem is that makepp
    does not support variables with whitespace. This is mostly
    because I didn't know that make did support variables with
    whitespace until just now (this is the first example I've
    seen). I'm not sure that I like the idea of variables with
    whitespace in them, because it makes parsing makefiles
    extremely hard and possibly not well-defined with some of
    the extensions that I put into makepp. If you rewrite your
    makefile like this, it will work fine with makepp:

    amd_env_HP-UX = 32
    amd_env_SunOS = 32
    AMD_ENV = $(amd_env_$(OS_NAME))

    all:
    echo $(AMD_ENV)

    I might be able to put in variables with whitespace, but it
    would probably not be easy and I suspect they are not
    commonly used. I think for the moment I'll document this
    restriction.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks