bmk icon indicating copy to clipboard operation
bmk copied to clipboard

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

Open GWRon opened this issue 1 year ago • 0 comments

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) ?

GWRon avatar Mar 03 '23 14:03 GWRon