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

make: don't require using make, as it is a compat wrapper for cmake #490

Merged
merged 2 commits into from
Mar 22, 2019

Conversation

eli-schwartz
Copy link
Contributor

Running part of the build process in the toplevel Makefile means that users are forbidden to use cmake directly in order to get more control over the cmake arguments, and are also forbidden to use alternative cmake backends without having the Make program installed.

It also causes unpredictable issues that must be worked around by every downstream consumer, when the established cmake build process that is supposed to work, aborts with:

/build/lastpass-cli-git/src/lastpass-cli/blob.c:42:10: fatal error: version.h: No such file or directory
#include "version.h"
^~~~~~~~~~~
compilation terminated.

Fixes eli-schwartz/pkgbuilds#12

...

Also even using make as a compat wrapper is broken as it recompiles version.h on every single run.

@waterkip
Copy link
Contributor

Nice, I was looking into this a couple a days ago, but didn't know how to do this. Thanks! Your PR can't be merged without you signing them off (git rebase --signoff would be the quick fix). See the CONTRIBUTING file for more info.

The LASTPASS-VERSION-GEN script was copied from another project that
used an entirely different format to generate a Makefile include. As a
result, it always considered the file out of date, and always remade it,
thereby causing `make && sudo make install` to rebuild many files and
relink the executable during the install step.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Running part of the build process in the toplevel Makefile means that
users are forbidden to use cmake directly in order to get more control
over the cmake arguments, and are also forbidden to use alternative
cmake backends without having the Make program installed.

It also causes unpredictable issues that must be worked around by every
downstream consumer, when the established cmake build process that is
supposed to work, aborts with:

/build/lastpass-cli-git/src/lastpass-cli/blob.c:42:10: fatal error: version.h: No such file or directory
 #include "version.h"
          ^~~~~~~~~~~
compilation terminated.

Fixes eli-schwartz/pkgbuilds#12

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
@eli-schwartz
Copy link
Contributor Author

Fixed, I don't usually remember to add signoff lines when committing as I'm more used to only needing it in projects that use the mailing list patch model (so I have format-patch configured to default to adding signoffs :D).

On the topic of figuring out how cmake does things, I basically just googled around to figure out how you execute custom commands to create a target. Sadly it is very difficult to properly understand cmake without their commercial training courses...

@waterkip
Copy link
Contributor

I saw three different implementations and got lost. So I gave up.

@GPaulovics
Copy link
Contributor

Thank You @eli-schwartz.

@GPaulovics GPaulovics closed this Mar 22, 2019
@GPaulovics GPaulovics reopened this Mar 22, 2019
@GPaulovics GPaulovics merged commit f5ad720 into lastpass:master Mar 22, 2019
@GPaulovics
Copy link
Contributor

Sorry, closed it accidentally. It is now merged.

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.

None yet

3 participants