Hi Thanks to a suggestion from Bahman Movaqar, I've started providing extramake with packages, starting with Artix/Arch since this is my current distribution. I indent to go on to Ubuntu/Debian and possibly the RPM world.
https://github.com/tnmurphy/extramake - extramake is a library of functions to extend GNU Make which are written in C and can be loaded with the "load" keyword. It starts with adding an install target to the build system. All you need to do is: sudo make install I've gone for a layout that lets you install different versions of extramake without clashing. The files are installed in /usr/lib/extramake/<version> where version comes from a file in the root of the project (version). On Arch/Artix it's possible to build the head revision (build from git) and in this case the packaging script (PKGBUILD) overrides the version file with something based on the hash of the commit. > > extramake /usr/lib/extramake/latest extramake /usr/lib/extramake/r27.c6f43cb/ extramake /usr/lib/extramake/r27.c6f43cb/comp.so extramake /usr/lib/extramake/r27.c6f43cb/equals.so .... extramake /usr/share/licenses/extramake/COPYING ^^ this is the layout. There is a symbolic link there which can use used as a sort of default version by a distribution. This means in your makefile you can load a module (e.g. hash) like so: load /usr/lib/extramake/latest/hash.so # here the symlink "latest" points to the default version # now we can use it: target_config_hash:=$(hash $(CFLAGS) $(TARGETNAME) $(CC) $(ARCH) $(OSNAME)) ARCH/ARTIX -------------------- I've added a "build from GIT" PKGBUILD file in package/artix. This is basically suitable for building a package locally from the head branch. This gives you a neat way to install/deinstall the package but it isn't much use yet for installing from the internet - I still need to get my package into some repository somewhere. That's task 2 for ARCH. What I'm doing is: > cd package/artix makepkg --check -f Then you get a package file which looks similar to this: > extramake-r27.c6f43cb-1-x86_64.pkg.tar.zst UBUNTU/DEBIAN ------------------------- The next thing to do is make debian packages using the same layout. I have to learn how to do this still though. I'll also need to create a PPA I think - (personal package archive) and I'll have to decide what versions of Ubuntu and Debian to support. My 1st thought is to go for whatever's the latest LTS release and only on x86_64 for the time being. REDHAT/RPM --------------------- I'm really not sure about this one. RPMs are even more of a nuisance to make from my memory especially with selinux etc. What would I target nowadays? Fedora? Rocky Linux? I'm not sure and I'm rather reluctant to take this one on but if it's important to anyone I'll have a shot at it. Regards, Tim
