-
Notifications
You must be signed in to change notification settings - Fork 106
Fixes for MacOS release build & build options #472
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
Changes from all commits
29c3a39
e7e8d9c
131abfa
e64bb71
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -390,6 +390,10 @@ all:: | |
| # Define GIT_USER_AGENT if you want to change how git identifies itself during | ||
| # network interactions. The default is "git/$(GIT_VERSION)". | ||
| # | ||
| # Define GIT_BUILT_FROM_COMMIT if you want to force the commit hash identified | ||
| # in 'git version --build-options' to a specific value. The default is the | ||
| # commit hash of the current HEAD. | ||
| # | ||
| # Define DEFAULT_HELP_FORMAT to "man", "info" or "html" | ||
| # (defaults to "man") if you want to have a different default when | ||
| # "git help" is called without a parameter specifying the format. | ||
|
|
@@ -2147,6 +2151,15 @@ GIT-USER-AGENT: FORCE | |
| echo '$(GIT_USER_AGENT_SQ)' >GIT-USER-AGENT; \ | ||
| fi | ||
|
|
||
| GIT_BUILT_FROM_COMMIT = $(eval GIT_BUILT_FROM_COMMIT := $$(shell \ | ||
| GIT_CEILING_DIRECTORIES="$$(CURDIR)/.." \ | ||
| git rev-parse -q --verify HEAD 2>/dev/null))$(GIT_BUILT_FROM_COMMIT) | ||
| GIT-BUILT-FROM-COMMIT: FORCE | ||
| @if test x'$(GIT_BUILT_FROM_COMMIT)' != x"`cat GIT-BUILT-FROM-COMMIT 2>/dev/null`" ; then \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we already have a shell script snippet here, how about moving the assignment of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would be a shell variable, local to this target. |
||
| echo >&2 " * new built-from commit"; \ | ||
| echo '$(GIT_BUILT_FROM_COMMIT)' >GIT-BUILT-FROM-COMMIT; \ | ||
| fi | ||
|
|
||
| ifdef DEFAULT_HELP_FORMAT | ||
| BASIC_CFLAGS += -DDEFAULT_HELP_FORMAT='"$(DEFAULT_HELP_FORMAT)"' | ||
| endif | ||
|
|
@@ -2262,21 +2275,19 @@ git$X: git.o GIT-LDFLAGS $(BUILTIN_OBJS) $(GITLIBS) | |
| $(filter %.o,$^) $(LIBS) | ||
|
|
||
| help.sp help.s help.o: command-list.h | ||
| hook.sp hook.s hook.o: hook-list.h | ||
| builtin/bugreport.sp builtin/bugreport.s builtin/bugreport.o: hook-list.h | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure what these hook vs bugreport changes are doing here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was intentionally pulled in from an upstream commit because of a build error that was (for some reason) only manifesting in I included it "early" (rather than letting it naturally show up as part of next release's rebase) because the error caused by incorrect dependencies is blocking to any mid-cycle releases we may want to do. It does have some things not explicitly needed (e.g., the removal of |
||
|
|
||
| builtin/help.sp builtin/help.s builtin/help.o: config-list.h hook-list.h GIT-PREFIX | ||
| builtin/help.sp builtin/help.s builtin/help.o: config-list.h GIT-PREFIX | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also the hook-list change is curious. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This came with the other |
||
| builtin/help.sp builtin/help.s builtin/help.o: EXTRA_CPPFLAGS = \ | ||
| '-DGIT_HTML_PATH="$(htmldir_relative_SQ)"' \ | ||
| '-DGIT_MAN_PATH="$(mandir_relative_SQ)"' \ | ||
| '-DGIT_INFO_PATH="$(infodir_relative_SQ)"' | ||
|
|
||
| version.sp version.s version.o: GIT-VERSION-FILE GIT-USER-AGENT | ||
| version.sp version.s version.o: GIT-VERSION-FILE GIT-USER-AGENT GIT-BUILT-FROM-COMMIT | ||
| version.sp version.s version.o: EXTRA_CPPFLAGS = \ | ||
| '-DGIT_VERSION="$(GIT_VERSION)"' \ | ||
| '-DGIT_USER_AGENT=$(GIT_USER_AGENT_CQ_SQ)' \ | ||
| '-DGIT_BUILT_FROM_COMMIT="$(shell \ | ||
| GIT_CEILING_DIRECTORIES="$(CURDIR)/.." \ | ||
| git rev-parse -q --verify HEAD 2>/dev/null)"' | ||
| '-DGIT_BUILT_FROM_COMMIT="$(GIT_BUILT_FROM_COMMIT)"' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we take pains to write that file, the value should probably be read from the file instead of relying on the variable, right? But if we do that, we need to change patch 4 to write that file instead of specifying the value in the But maybe the idea was to make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need the file to be written when the OID changes as she in the Makefile to cause Make to later detect that the dependencies are stale and cause version.o to be recompiled, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, but of course! The file is there only to force recompilation if
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea was, as you suggested, to make Also, this reminded me that I missed something (documentation at the top of the file indicating that EDIT: whoops! submitted this without refreshing my page first |
||
|
|
||
| $(BUILT_INS): git$X | ||
| $(QUIET_BUILT_IN)$(RM) $@ && \ | ||
|
|
@@ -3263,7 +3274,7 @@ dist: git-archive$(X) configure | |
| @$(MAKE) -C git-gui TARDIR=../.dist-tmp-dir/git-gui dist-version | ||
| ./git-archive --format=tar \ | ||
| $(GIT_ARCHIVE_EXTRA_FILES) \ | ||
| --prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar | ||
| --prefix=$(GIT_TARNAME)/ HEAD > $(GIT_TARNAME).tar | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. likewise the ^{tree} change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing the |
||
| @$(RM) -r .dist-tmp-dir | ||
| gzip -f -9 $(GIT_TARNAME).tar | ||
|
|
||
|
|
||
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.
Do we need a
?=here, to avoid thisevalfrom happening in case the user specified it on the command-line? I.e. like this: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.
The command line-specified variable will override any
=or:=assignment for that variable (documentation). I can't infer any "rule" or pattern for when?=vs.=is used in thisMakefile, but the variables most similar toGIT_BUILT_FROM_COMMIT(e.g.GIT_USER_AGENT) use non-conditional assignments.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.
Okay, thank you! I thought
?=was the thing to use if one wanted to define some variable that had not yet been defined, but that was not based on reading the documentation 😁