Open xparq opened 1 year ago
Added obj_source_exts=.cpp .cxx .c
, but that's mostly just a reminder... Only used by the lib source collector rule yet, and even that's for a slightly different purpose! :)
Hehh, OK, didn't have to wait long... If there's just a dir with no files, but only subdirs, in the tree (like a collection of modules or a dispatching point etc., as in the sfw repo, where I've been testing this), it blows right up already...
[x] As a (kinda also hamfisted...) workaround for that, the driver loop now checks for existing sources in every dir and calls NMAKE only if there're things to do:
if exist %%i\*.cpp !_make_! /c compiling DIR=!_dir_!
if exist %%i\*.cxx !_make_! /c compiling DIR=!_dir_!
if exist %%i\*.c !_make_! /c compiling DIR=!_dir_!
[x] Well, as we have $(obj_source_exts)
(as .cpp .cxx .c
) already, this should be an inner for
loop iterating that!
[x] Also, it could probably send the type info then too, which could allow removing the *.c*
hack finally.
[ ] But another similar hack still remains at the lib creation rule:
for /r "$(src_dir)\$(lib_src_subdir)" %%o in ($(units_pattern).c*) do (
Matching false positives like
local.cfg
orbroken.cpp.off
etc.