Hi all,

I just stumbled across the following problem with dmake. Original makefile.mk code read

  X*=Y

which I wanted to change to something like

  X=Y1
  .IF Z
  X+=Y2
  .ENDIF

but keeping the semantics of the original X*=Y to not change X at all if it "already has a value" (dmake/man/dmake.nc:1.7 l. 887). That is, something like

  .IF "$(X)"==""
  X=Y1
  .IF Z
  X+=Y2
  .ENDIF
  .ENDIF

However, X*=Y apparently suppresses assignment iff X is undefined, whereas apparently "$(X)"=="" iff X is undefined or X is defined to an empty string. I did not find any construct in dmake that would allow me to do what I want, apart from the DRY-violating

  .IF Z
  X=Y1 Y2
  .ELIF
  X=Y1
  .ENDIF

- Would it make sense to change the semantics of X*=Y to suppress assignment iff X is undefined or X is defined to an empty string?

- Otherwise, should we add something like

  .IF defined(X)

to dmake?

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to