Re: [AD] [AL] Mingw complation |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
In message <20itm6ll7c.fsf@xxxxxxxxxx>, Michael Bukin writes:
>The problem is when there is sh utility in the PATH. Ming make will
>use it instead of command.com to execute programs and sh will
>interpret escape sequences (\) and treat # as a beginning of comment.
>
>Problem with backslashes can be solved by doubling them and it will
>not break compilation with command.com too. Problem with # is harder,
>because DOS echo does not understand quoting. We can echo without #,
>and change resulting file with sed, but this means everyone will need
>sed.
How about putting the hash into a make variable? That won't depend on
whether sh or command.com is in use, and make won't try to interpret it as a
comment. I mean something like this:
HASH := \#
rule:
echo $(HASH)define SOMETHING_OR_OTHER > some\\file.h
(Can't test it on DOS/Windows; it works on Linux).
Cheers,
Olly