Roy's Blog

A Hacker's musings on Code | Tech | Life

Simplicity :)Consider these Makefiles, as used by dhcpcd over the years.dhcpcd-1 Makefile.amdhcpcd 2 Makefile.amdhcpcd 3 MakefileNow, the first two are automake files. I strongly dislike autotools after dealing with it for a few years now. I shan't go into the reasons why here though. But suffice to say that the whole build system required autotools. dhcpcd-3 supported BSD based systems, so it was only fair that we strive to support their base install. This means no autotools. So I set about discovering what I could do that worked on pmake and gmake.Sadly, the answer is that only simple things work, hence the dhcpcd-3 Makefile being quite long. Especially as it does a little bit of auto config for needed libraries, which used to be in the configure. Well, it sufficed for a long time, and when I started OpenRC I used a similar Makefile as it had to work their out of the box. Eventually my occasional partner in crime, vapier, came across my Makefile and complained about a few things, namely it's too complicated and good be a lot better. He even went and patched it so that it almost worked on pmake. But still, it needed to fully work.The end result is that I've made some .mk stubs that work with both pmake and gmake, using the same variables that the mk stubs pmake ships with. It's nowhere near as flexable, and we do make many assumptions.new dhcpcd MakefileAs you can see, we now look more like the old dhcpcd-1 and dhcpcd-2 Makefiles, but without the need for autotools or any pre-processing of Makefiles. OpenRC currently uses a similar system and has an mk stub for building static and shared binaries. Obviously, this is not suitable for everyone, but it suits me very well. And as it's all BSD licensed, feel free to use it as you wish - just respect my copyright.

Continue reading...

2008 is here and it's time for some change!OpenRC is now ready for testing. There are no ebuilds in the tree, but some are available here that offers a baselayout-2 shell that pulls in openrc-9999. I'll just offer a git ebuild for the time being, so bugs can be fixed fast without having to bump all the time. But it should be fairly smooth going.As the code has been split, I cannot provide a downgrade path back to baselayout-1, so if you do downgrade you'll have to reboot the host. However, it should upgrade perfectly.I'd appreciate a lot of testing, and just reply to this thread or email me saying that it works or there's a bug. Hopefully we can get this into portage soonish.And yes, I decided to keep the name OpenRC :)

Continue reading...