-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow building using native GNU make
Avoid the use of sed when building Compat.ml and use the NUL device.
- Loading branch information
Showing
3 changed files
with
55 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
|
||
msvs-detect text eol=lf | ||
checkenv text eol=lf | ||
Compat.cmd text eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@setlocal | ||
@echo off | ||
|
||
:: This can be done as (slightly long) one-liner, but embedded in Makefile it | ||
:: encodes the knowledge that GNU make uses batch files internally, which is a | ||
:: bit brittle. findstr /N is a trick to allow blank lines to be included. More | ||
:: subtly, it allows tagged blank lines to be detected. | ||
for /f "tokens=1* delims=:" %%a in ('findstr /N /R "^" %2') do ( | ||
rem Handle blank lines in the file | ||
if "%%b" equ "" ( | ||
echo. | ||
) else ( | ||
for /f "tokens=1* delims=@" %%l in ("%%b") do ( | ||
rem If %%l == %%b then the line didn't contain @ - we already know the | ||
rem line isn't blank. | ||
if "%%l" equ "%%b" ( | ||
echo %%l | ||
) else ( | ||
if %1 lss %%l00 ( | ||
if "%%m" equ "" ( | ||
echo. | ||
) else ( | ||
echo %%m | ||
) | ||
) | ||
) | ||
) | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters