4 ms·
Can you link to some examples? I've dug around on Github and tried to find some examples of projects using different kinds of build systems, but I don't think t
by lelandbatey 5y ago
Can you link to some examples? I've dug around on Github and tried to find some examples of projects using different kinds of build systems, but I don't think they are great examples of what you're talking about. For others who may want to see examples, here they are:
- A Makefile that runs cmake which generates ninja build files that build the project. Neovim: https://github.com/neovim/neovim/blob/master/Makefile https://github.com/neovim/neovim/blob/master/Makefile
- Cmake that generates ninja build files which build the application. OBS (Open Broadcaster Software) : https://github.com/obsproject/obs-studio/wiki/build-instructions-for-linux https://github.com/obsproject/obs-studio/wiki/build-instruct...
- A makefile that builds the application. Localstack : https://github.com/localstack/localstack/blob/master/Makefile https://github.com/localstack/localstack/blob/master/Makefil...
- Cmake that generates Makefiles that build the application. Krita : https://docs.krita.org/en/untranslatable_pages/building_krita.html#building-on-linux https://docs.krita.org/en/untranslatable_pages/building_krit...
- adrian_b 5y agoThe makefiles indicated by you are relatively simple makefiles, they do not belong to the class "horrible". The main problem even with these simpler makefiles is that they are too complicated, because they are written for a single project. This is something that is difficult to change in the case of most open-source projects, which are intended to be independent from other software projects. The greatest simplifications in makefiles are done by extracting the common parts of the makefiles from all projects in generic makefiles that should be included in the specific makefiles of each project. Doing this, it is possible to reduce the effort of writing makefiles for 100 or 1000 software projects to little more than the effort of writing a single makefile. Besides the reuse of the same make rules, of the same make targets and of many make definitions in all projects, other important simplifications are to never write manually the file dependencies when they can be detected automatically, which is normally true for all compilation tasks, and to never write manually the lists of source files, because they should also be detected automatically.