ACCESS-NRI / MOM5

The Modular Ocean Model
https://mom-ocean.github.io/
GNU Lesser General Public License v3.0
1 stars 0 forks source link

Mkmf escape fix #11

Closed CodeGat closed 10 months ago

CodeGat commented 10 months ago

mkmf fails to generate a valid Makefile when directories have = in them because it is a reserved word. This PR reads in the created Makefile and substitues all non-assignment = with $(EQUALS) (where EQUALS = =).

Closes #9 !

CodeGat commented 10 months ago

Don't worry about the failing final check...that is a CI issue that I shall fix...

CodeGat commented 10 months ago

I looked into @harshula s links in the megathread and the answers were all substituting rather than escaping, so I went with that.

harshula commented 10 months ago

Notes https://perldoc.perl.org/perlre#Extended-Patterns Perl also defines a consistent extension syntax for features not found in standard tools like awk and lex. The syntax for most of these is a pair of parentheses with a question mark as the first thing within the parentheses. The character after the question mark indicates the extension.