Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssembleNative: incorrect file ending (capital S) - but not handled anyways #119

Open
GWRon opened this issue Mar 3, 2023 · 0 comments
Open

Comments

@GWRon
Copy link
Contributor

GWRon commented Mar 3, 2023

Method DoBuild() (bmk_make.bmk) takes care of various files.

All use "Match()" which is a case-sensitive string lookup.

				' bmx file
				If Match(m.ext, "bmx") Then
...
				Else If Match(m.ext, "s") Then
...
				Else

					If Not m.dontbuild Then
...
						If m.requiresBuild Then
...
							If m.path.EndsWith(".cpp") Or m.path.EndsWith("cc") Or m.path.EndsWith("mm") Then
								CompileC m.path, m.obj_path, m.GetIncludePaths() + " " + m.cc_opts + " " + m.cpp_opts
							ElseIf m.path.EndsWith(".S") Or m.path.EndsWith("asm") Then
								AssembleNative m.path, m.obj_path

"EndsWith" here checks for ".S" (capital S) which would on case-sensitive file systems fail.

Yet I am not sure if it can be removed at all - as the "Else If Match" already would (if done case-insensitive) care for the .s-files.

Also I want to ask: why is "Match()" used instead of a "module provided" way to retrieve the file extension (and then do a "toLower()"-comparison) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant