Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gmake out-of-source #1439

Closed
wants to merge 2 commits into from
Closed

Conversation

DanOlivier
Copy link

Also an experiment (compared to CMake support)
Proved to be quite difficult, due to the amount of gmake-eval statements, and my ignorance of the need to use a vpath directive to allow the rules to engage

New variables are TOP (location of root makefile) and $(1)_RELDIR, the
relative path to the source file (which is used as the relative output
path)
- Find source files from TOP with vpath directives
- $(1)_SOURCES now refers to files relative to their own directory (reldir)
- Fix collection of sources with wildcard function
- sort function must be used for source lists with possible duplicates (generated files in source tree)
- .ONESHELL is global and if the 1st command in a rule starts with @, then the following lines will not be echoed either

- Fix documentation
- Fix install stage
@DanOlivier DanOlivier closed this Aug 25, 2017
@copumpkin
Copy link
Member

@DanOlivier I don't want you to leave these PRs closed with a bad taste in your mouth. I think a comparatively small number of folks actually interact with the Nix build and test process on a regular basis and large changes that deeply change how all that stuff works are probably not very easy for @edolstra to engage with, especially when the benefits aren't called out super explicitly in the PR. Did you have a particular goal in mind when making these changes?

@DanOlivier
Copy link
Author

Right. Don't worry, there is no bad taste.
I understand that people are busy, and that if my proposed changes were not evaluated or integrated, it's because I didn't put any effort into lobbying so that the changes would be understood and eventually approved. It was just an experiment, and I did it for myself, to see if it could be done, and if so, at what cost.

Actually, there were 3 experiments:

  1. Rewrite the build system with cmake (while maintaining compatibility)
  2. Perform out-of-source build with the legacy gmake system (for comparison)
  3. Allow tests to run in parallel (in distinguished temporary directories, with some script cleanup). The tests then complete within 10 seconds, IIRC.

I began this work for a few different reasons, but in part because I preferred the cmake/ninja workflow (if it's good enough for Clang, then it's good enough for X). I have done this for other projects as well.
It seem this part of the system is regularly overlooked by many developers, so it doesn't hurt to give it some love.

That said, this work was complicated enough that there was little time left over afterwards for me to actually use Nix (I wanted to use it to build several photogrammetry tools while sharing common versions of common packages).

The changes are still available, and I won't delete my repository, but they weren't getting any attention, and were running behind changes to origin, so I closed the PRs. I could even put some work into them in order to bring them up-to-date with the main repository, but it seems to me that there has to be more interest and discussion for that to happen.

@vcunat
Copy link
Member

vcunat commented Aug 28, 2017

BTW, we're still missing meson support... which is supposed to be the next big thing, partly because systemd supports it now as well ;-)

@Ericson2314
Copy link
Member

#2613 I started meson support, and I think someone else is about to contribute a fuller attempt :)

@p01arst0rm p01arst0rm mentioned this pull request Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants