Note that there are some explanatory texts on larger screens.

plurals
  1. POMakefile variable assignment: 'include' not allowed as variable?
    primarykey
    data
    text
    <p>On my Fedora15 box, I can write Makefiles like this:</p> <pre><code>app = MyApplication deps = `pkg-config ...` </code></pre> <p>which works perfectly fine. However, whenever I tried executing such Makefiles on Debian machines, I got errors apparently because of the whitespace around '='. So rewriting them like this:</p> <pre><code>app=MyApplication deps=`pkg-config ...` </code></pre> <p>fixes it. Now my question is, how is this incompatibility caused? My Fedora make is version 3.82, whereas my Debian one is 3.81. Searching the Changelog of make didn't reveal any changed which would make this possible either..</p> <p><b>EDIT:</b></p> <p>I seem to have found the cause for this weird behavior: In most of my makefiles, I usually use the variable "include" to hold all the pkg-config outputs. Now apparently 'include' is some sort of keyword, which, when <b>not</b> used like this on Debian</p> <pre><code>include="stuff" </code></pre> <p>triggers a macro, looking for a path or something. If I use it as shown above, I can use it as a normal variable. But now the interesting part is: I can <b>always</b> use 'include' as a variable name on Fedora! Therefore lines like this:</p> <pre><code>include = `pkg-config --blah` </code></pre> <p>worked perfectly under Fedora, but always failed under Debian spitting out lines of "Makefile:2: =: No such file or directory" (it was expetcing the '=' and everything else to be paths apparently)</p> <p>Now my question still stands however why I can do such things on Fedora (why the 'include macro doesn't seem defined there) but not on Debian?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload