bmk doesn't handle includes

Archives Forums/BlitzMax Bug Reports/bmk doesn't handle includes

Brucey(Posted 2009) [#1]
It appears that bmk doesn't handle includes for creation of "import" lists when compiling code.

For example, you have a .bmx file with :
Import "some/headers/*.h"


Include this via another file :
Include "thefilewithheaders.bmx"


It just quietly ignores the file, and doesn't add the folder to the compiler options. (as it does if you have the import directly in the source)


(I know.. the shock of me actually considering using Include is, to be honest, quite astounding.. but I was hoping to get away with not duplicating a page of imports per module).


plash(Posted 2009) [#2]
Why do you use a network of imports?
I personally find that Include makes everything *one*, and it relieved some of my strange compilation issues under Import.


Otus(Posted 2009) [#3]
Why do you use a network of imports?
I personally find that Include makes everything *one*, and it relieved some of my strange compilation issues under Import.


Import makes compiling large projects with lots of files a lot faster. I imagine Brucey has quite a lot of those.

Also, I personally find that it forces me to think about which Types should know (what) about each other. Cleaner design and more modular.


plash(Posted 2009) [#4]
Import makes compiling large projects with lots of files a lot faster. I imagine Brucey has quite a lot of those.
Yeah, certainly. But I would also reckon that most of his modules don't even use that many .bmx files (usually 3-4), so any modifications to a single file would probably require more than just one to be recompiled.

I can almost see Import being useful with the way I write modules (usually split up into per-type or per-type group, i.e. master.bmx contains TStageMaster, TX22StageMaster, TStage, TX22Stage, etc).. given that it be a large one (and they usually aren't).


xlsior(Posted 2009) [#5]
Plash: Keep in mind that Brucey is porting tons of 3rd party source and libraries over to Blitzmax - I imaging that even though there may be a 'better' method to do something, being able to convert existing code without having to rewrite *everything* is still a pretty big deal.