-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Prepare inclusion of netlist.lua into make generated target. #7225
base: master
Are you sure you want to change the base?
Conversation
* First step to remove most device and macro header files. * All of those can be generated automatically so going forward there is no need for these any longer.
* Modules are netlists for which automatic lib entries are generated. * Going forward you just store them in macro/modules and they will be automatically registered as device elements. * you need to do a "make generated" is src/lib/netlist/build * cpp still needs to be added to netlist.lua
* nltool --help is your friend.
* modules folder.
* please refer to adding_devices.md for instructions how to add devices to netlist * also fixed VS build * fix a makefile bug. * removed more obsolete include files
* Use a list of files which later can be created automatically by the netlist "make generated" target.
You can do that by calling out to a script and executing the result from Lua the way we use However, I’m not sure this is a good idea. It causes various issues:
Scanning for sources makes things less explicit, it introduces a source of spurious build failures after updating source, it opens developers up to more pitfalls, and it’s not the recommended way to add sources to projects in any build system, with CMake going so far as to explicitly recommend against doing it. Yeah, I know we do it for layout files, but even there I’m not really comfortable with it, but we can’t get proper dependencies for them anyway because GENie lacks an (Unless you’re planning to scan for sources on every single build, generate a temporary Lua file, compare its contents to the existing one, copy it over if different, and make the project files depend on that. But that’s ugly to do with |
Also, premake 4 and premake 5 support globbing for files natively similarly to what CMake does (with the same potential pitfalls) – see here for examples. Does GENie have that functionality? |
to create all the additional code they previously needed to add manually. This approach is the result of feedback I received that adding devices require changes in too many places. I fully understand the points you are making. This is why I made this a pull request - it didn't look convincing but I had no better solution. I can also create |
Give me a bit of time to think about it some more. I understand that none of the options are completely ideal. |
This change affects the mame build system so I am asking for a review from somebody familiar with the genie build system.
The local netlist
make generated
target parses all "*.cpp" files in the devices, analog and macro directories and creates code files in the generated directory. Adding a new device thus boils down to putting it in one of these folders.But the file still needs to be added to netlist.lua.
This pull request is a first step so that the
make generated
target can create the list of files needed by netlist.lua going forward.