bkaradzic / GENie

GENie - Project generator tool
Other
905 stars 168 forks source link

FreeBSD: use of $(ARCH) in GNU makefiles and src/hosts/scripts.c #558

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hello,

FreeBSD has packaged GENie in the Ports tree since 2019. Recently I was looking at this package to use a dependency for MAME. I noticed that in MAME,$(ARCH) is removed from a number of files, include src/hosts/scripts.c, GENie is bundled with MAME. This is so the MAME build succeeds, otherwise it fails on locating $(ARCH). So using GENie from Ports as a drop-in-replacement is not straight forward. In the MAME package, removing $(ARCH) ends up removing almost all dynamically constructed buildoptions and linkoptions, and build relies on a correctly populated make environment, I would rather have GENie correctly produce the GNU makefiles too.

I do not know what $(ARCH) is meant to be, and how it should be populated on FreeBSD. There are no Ports in the tree that currently depend on GENie, so I am unable to determine how all this fits together.

I am wondering, because GENie is in the Ports, and it gets built by the build clusters for package distribution, would it not be better to generate src/hosts/scripts.c per architecture? I am suspecting this might help in debugging too.

How do I regenerate src/hosts/scripts.c? I do not understand the run premake4 embed, where do I get premake4? I suspect you are not referring to https://github.com/premake/premake-4.x. So am I to run GENie to generate new scripts? Is it possible to produce the bytecode for the host platform during package building instead of embedding script in C code? How would I do that?

Thanks.

bkaradzic commented 1 year ago

There is no maintainer for any of BSD, so no plan to support it.

All build related stuff is in repo, check how it's done on Linux.