Minor incompatibility between gmake and makepp wrt parsing of # comment and $(info):
>cat makepp-info-gcc-incompatibility.mk $(info # this prints in gmake, but not in makepp) dummy: @echo do nothing
Note that the $(info statement contains a #, used for comments
> make -f makepp-info-gcc-incompatibility.mk # this prints in gmake, but not in makepp do nothing
In gmake, $(info #stuff) can print the # - i.e. $(info) takes priority over # comments.
> ~/bin/makepp -f makepp-info-gcc-incompatibility.mk makepp: Loading makefile `/home/glew/work/makepp-info-gcc-incompatibility.mk' /home/glew/workmakepp-info-gcc-incompatibility.mk:1: unterminated reference $(info
But not so in makepp. I.e. gmake and makepp are incompatible in this minor detail.
---+ Config info
> make -v GNU Make 4.0 Built for i686-pc-cygwin Copyright (C) 1988-2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. > ~/bin/makepp --version makepp version 2.0 Makepp may be copied only under the terms of either the Artistic License or the GNU General Public License, either version 2, or (at your option) any later version. For more details, see the makepp homepage at http://makepp.sourceforge.net. > uname -a CYGWIN_NT-6.1-WOW64 glew-tablet 1.7.32(0.274/5/3) 2014-08-13 23:03 i686 Cygwin
Hi Andy,
I will never be astounded enough by the quirks gmake will come up with. It would never have crossed my mind to assume the existance and try out such a syntactic aberration. To confuse people, gmake took the Shell's
$()
syntax for returning text, but limited it to a single line. So putting a comment in there is not actually useful. Had they been consistent with Shell, there'd be no issue here.By bending the syntax on a per case basis, they open up a new possiblity. So it offers some benefit. But if I can pass # to a function, I want to also be able to assign it to a variable...
"Fixing" this would introduce a new inconsistency. Because of the arbitrary limitation that
$()
must be single line, makepp offers an alternative$(())
which can span multiple lines. I see only these two equally horrible solutions:Should
$(())
now get comment handling different from$()
?Or should a comment containing
))
not count as a comment anymore, breaking Makeppfiles where the old function end was commented out so as to add more lines?So, thanks for reporting it! But until someone comes up with a clean solution for
$(())
I don't know what to do. I'm leaving this open for discussion.Daniel
Last edit: Daniel Pfeiffer 2014-11-23