mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-09-06 09:06:54 +02:00
npm/build.sh stripped CRs from configure and every scripts/ file before each WASM build. Its purpose was purely to survive a Windows checkout with core.autocrlf=true (which rewrites LF->CRLF, and bash/make then reject CRLF) -- not reproducible packaging. No tracked build input is CRLF today (`git ls-files --eol` shows only the incidental appimage/rsc/magic.svg), so it never fired on a normal checkout, and it mutated the source tree to do it. Add .gitattributes `eol=lf` for configure, scripts/**, *.sh, *.mak, *.mak.in and Makefile.in. Attributes override core.autocrlf, so git always checks these out as LF regardless of platform -- the authoritative fix -- and the source tree is never rewritten by the build. Remove sed_strip_cr and its call sites. Verified: git check-attr reports eol=lf for configure/scripts/*/*.sh/rules.mak/ Makefile.in; build.sh parses cleanly. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
20 lines
574 B
Plaintext
20 lines
574 B
Plaintext
*.c filter=header
|
|
*.h filter=header
|
|
*.cpp filter=header
|
|
*.tcl filter=header
|
|
*.scm filter=header
|
|
Makefile filter=header
|
|
|
|
*.gds diff=gds
|
|
|
|
# Keep build/shell scripts and makefiles LF even when checked out on Windows
|
|
# (git core.autocrlf=true), or the shell and make reject CRLF. .gitattributes
|
|
# overrides core.autocrlf, so this is the authoritative fix and the WASM build
|
|
# (npm/build.sh) no longer needs to strip CRs from the source tree.
|
|
/configure text eol=lf
|
|
/scripts/** text eol=lf
|
|
*.sh text eol=lf
|
|
*.mak text eol=lf
|
|
*.mak.in text eol=lf
|
|
Makefile.in text eol=lf
|