Archive for the 'makefile' Category
boot linux with gnu make

…continuation of the previous post…

what is still missing from the picture I was presenting in the previous post was handling events as some of the sys v init replacement try to do.

well, a separate process should handle events, and touch/create some files with standard format with updated event information, then one could write sthg. like

event_handler: event

!webserver: stop_all_services_event

 

booting linux or gnu make negative target

Booting linux is a slow process. And it is slow as there is no good order in organizing that process… I do not pretend perfect order, but good order. That is if process X could be already started, it should be started… And is nonsense to wait for y,z,w etc. to finish to start. There are some experiments like upstart or whatsoever, but they go to far from classical unix concepts.

I was therefore playing arround with the idea of using classical gnu make to implement the build process. Each script (boot script, service script etc) should create a status file at the end. So these files would be targets. We would have rules like:

webserver: networking

networking: kernel_modules

There is however something that I would call negative target, that is missing in makefile. It in impossible to write something like:

!networking: !webserver

!kernel_modules: !networking

So this is the magic that is missing from the gnu make… Maybe it makes sense to add sthg. like that…