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

The hamfisted heuristic *.c* matching trick will fail pretty soon... #4

Open
xparq opened this issue Mar 20, 2023 · 2 comments
Open

Comments

@xparq
Copy link
Owner

xparq commented Mar 20, 2023

Matching false positives like local.cfg or broken.cpp.off etc.

@xparq
Copy link
Owner Author

xparq commented Mar 20, 2023

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! :)

@xparq
Copy link
Owner Author

xparq commented Mar 20, 2023

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...

  • 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_!
    
  • Well, as we have $(obj_source_exts) (as .cpp .cxx .c) already, this should be an inner for loop iterating that!

  • 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  (
    

xparq added a commit that referenced this issue Mar 26, 2023
@xparq xparq pinned this issue Mar 28, 2023
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