-
Notifications
You must be signed in to change notification settings - Fork 81
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
configure: META.in template with no hardcoded version number #54
base: master
Are you sure you want to change the base?
Conversation
c70b56b
to
59e4b3e
Compare
@dbuenzli I use your I still kept the VERSION file because that allows building from the source repository as it from the result of a |
The configuration file depends on the current git state, so we should build it at least as often as the user requests it with 'make configure'.
59e4b3e
to
759bd60
Compare
Note that 'VERSION' check is only useful if users first tag the release locally, then run 'make check-release', fix any issue with the tagging, and finally push the tag upstream. The github web interface does not allow this safeguard process, so I removed its description.
By default `git describe` only considers annotated tags. While we do encourage maintainers to use annotate tags (see howto/release), it is more robust to support lightweight tags as well.
I added a |
@@ -76,6 +83,10 @@ Makefile.config: | |||
echo "LIBDIR=$(OCAMLBUILD_LIBDIR)"; \ | |||
) > $@ | |||
|
|||
# the configuration file depends on the git environment, | |||
# so it should be rebuilt each time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of rebuilding each time you can do that:
#force allows to always run the rules that depends on it
.PHONY: force
#.version_stamp remember the last version for knowing when rebuilding
.version_stamp: force
@echo '$(VERSION)' | cmp -s - $@ || echo '$(VERSION)' > $@
And make src/ocamlbuild_config.ml
depend on .version_stamp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However since it is in configure.make
it is not really important.
Except for when the META is created I think my other remarks can be postponed. So you can merge, just after fixing the META problem. I'm going to use the merge point for |
Would it be ok to create the META at |
The |
Semantically the "best" way to do it is to use your Another way to take this is that having such a precise |
When you develop and build in the repository you don't really care about having precise version numbers since you have the git repo at hand to understand what is going on. You really care about precise git describe whenever you install either via pin or for a release.
The only way of doing this reliably is if you stop fiddling with version numbers manually and let the information automatically come from the place where it is stored which is the vcs. By doing this you know that whenever you ask someone to give you the output of |
No description provided.