-
Notifications
You must be signed in to change notification settings - Fork 164
Optionally skip linking/copying the built-ins #411
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
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 |
|---|---|---|
|
|
@@ -348,6 +348,9 @@ all:: | |
| # Define NO_INSTALL_HARDLINKS if you prefer to use either symbolic links or | ||
|
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. On the Git mailing list, Junio C Hamano wrote (reply to this): |
||
| # copies to install built-in git commands e.g. git-cat-file. | ||
| # | ||
| # Define SKIP_DASHED_BUILT_INS if you do not need the dashed versions of the | ||
| # built-ins to be linked/copied at all. | ||
| # | ||
| # Define USE_NED_ALLOCATOR if you want to replace the platforms default | ||
| # memory allocators with the nedmalloc allocator written by Niall Douglas. | ||
| # | ||
|
|
@@ -774,6 +777,16 @@ BUILT_INS += git-whatchanged$X | |
| # what 'all' will build and 'install' will install in gitexecdir, | ||
| # excluding programs for built-in commands | ||
| ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) | ||
| ALL_COMMANDS_TO_INSTALL = $(ALL_PROGRAMS) | ||
| ifeq (,$(SKIP_DASHED_BUILT_INS)) | ||
| ALL_COMMANDS_TO_INSTALL += $(BUILT_INS) | ||
| else | ||
| # git-upload-pack, git-receive-pack and git-upload-archive are special: they | ||
| # are _expected_ to be present in the `bin/` directory in their dashed form. | ||
| ALL_COMMANDS_TO_INSTALL += git-receive-pack$(X) | ||
| ALL_COMMANDS_TO_INSTALL += git-upload-archive$(X) | ||
| ALL_COMMANDS_TO_INSTALL += git-upload-pack$(X) | ||
| endif | ||
|
|
||
| # what 'all' will build but not install in gitexecdir | ||
| OTHER_PROGRAMS = git$X | ||
|
|
@@ -2088,9 +2101,9 @@ profile-fast: profile-clean | |
| $(MAKE) PROFILE=USE all | ||
|
|
||
|
|
||
| all:: $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS | ||
| all:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS | ||
| ifneq (,$X) | ||
| $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';) | ||
| $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_COMMANDS_TO_INSTALL) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';) | ||
| endif | ||
|
|
||
| all:: | ||
|
|
@@ -2921,15 +2934,8 @@ ifdef MSVC | |
| # have already been rolled up into the exe's pdb file. | ||
|
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. On the Git mailing list, Jeff King wrote (reply to this): 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. On the Git mailing list, Johannes Schindelin wrote (reply to this): 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. On the Git mailing list, Jeff King wrote (reply to this): 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. On the Git mailing list, Johannes Schindelin wrote (reply to this): |
||
| # We DO NOT have pdb files for the builtin commands (like git-status.exe) | ||
| # because it is just a copy/hardlink of git.exe, rather than a unique binary. | ||
| $(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)' | ||
| $(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)' | ||
| $(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' | ||
| $(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' | ||
| $(INSTALL) git-http-fetch.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' | ||
| $(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' | ||
| $(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' | ||
| $(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' | ||
| $(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' | ||
| $(INSTALL) $(patsubst %.exe,%.pdb,$(filter-out $(BUILT_INS),$(patsubst %,%$X,$(BINDIR_PROGRAMS_NEED_X)))) '$(DESTDIR_SQ)$(bindir_SQ)' | ||
| $(INSTALL) $(patsubst %.exe,%.pdb,$(filter-out $(BUILT_INS) $(REMOTE_CURL_ALIASES),$(PROGRAMS))) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' | ||
| ifndef DEBUG | ||
| $(INSTALL) $(vcpkg_rel_bin)/*.dll '$(DESTDIR_SQ)$(bindir_SQ)' | ||
| $(INSTALL) $(vcpkg_rel_bin)/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)' | ||
|
|
@@ -2957,7 +2963,7 @@ ifndef NO_TCLTK | |
| $(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install | ||
| endif | ||
| ifneq (,$X) | ||
| $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' -ef '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p$X' || $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';) | ||
| $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_COMMANDS_TO_INSTALL) git$X)), test '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' -ef '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p$X' || $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';) | ||
| endif | ||
|
|
||
| bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ | ||
|
|
@@ -2975,21 +2981,27 @@ endif | |
| } && \ | ||
| for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \ | ||
| $(RM) "$$bindir/$$p" && \ | ||
| test -n "$(INSTALL_SYMLINKS)" && \ | ||
| ln -s "git$X" "$$bindir/$$p" || \ | ||
| { test -z "$(NO_INSTALL_HARDLINKS)" && \ | ||
| ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \ | ||
| ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \ | ||
| cp "$$bindir/git$X" "$$bindir/$$p" || exit; } \ | ||
| if test -z "$(SKIP_DASHED_BUILT_INS)"; \ | ||
| then \ | ||
| test -n "$(INSTALL_SYMLINKS)" && \ | ||
| ln -s "git$X" "$$bindir/$$p" || \ | ||
| { test -z "$(NO_INSTALL_HARDLINKS)" && \ | ||
| ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \ | ||
| ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \ | ||
| cp "$$bindir/git$X" "$$bindir/$$p" || exit; }; \ | ||
| fi \ | ||
| done && \ | ||
| for p in $(BUILT_INS); do \ | ||
| $(RM) "$$execdir/$$p" && \ | ||
| test -n "$(INSTALL_SYMLINKS)" && \ | ||
| ln -s "$$destdir_from_execdir_SQ/$(bindir_relative_SQ)/git$X" "$$execdir/$$p" || \ | ||
| { test -z "$(NO_INSTALL_HARDLINKS)" && \ | ||
| ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \ | ||
| ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \ | ||
| cp "$$execdir/git$X" "$$execdir/$$p" || exit; } \ | ||
| if test -z "$(SKIP_DASHED_BUILT_INS)"; \ | ||
| then \ | ||
| test -n "$(INSTALL_SYMLINKS)" && \ | ||
| ln -s "$$destdir_from_execdir_SQ/$(bindir_relative_SQ)/git$X" "$$execdir/$$p" || \ | ||
| { test -z "$(NO_INSTALL_HARDLINKS)" && \ | ||
| ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \ | ||
| ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \ | ||
| cp "$$execdir/git$X" "$$execdir/$$p" || exit; }; \ | ||
| fi \ | ||
| done && \ | ||
| remote_curl_aliases="$(REMOTE_CURL_ALIASES)" && \ | ||
| for p in $$remote_curl_aliases; do \ | ||
|
|
@@ -3083,7 +3095,7 @@ ifneq ($(INCLUDE_DLLS_IN_ARTIFACTS),) | |
| OTHER_PROGRAMS += $(shell echo *.dll t/helper/*.dll) | ||
| endif | ||
|
|
||
| artifacts-tar:: $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) \ | ||
| artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \ | ||
| GIT-BUILD-OPTIONS $(TEST_PROGRAMS) $(test_bindir_programs) \ | ||
| $(MOFILES) | ||
| $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) \ | ||
|
|
@@ -3178,7 +3190,7 @@ endif | |
|
|
||
| ### Check documentation | ||
| # | ||
| ALL_COMMANDS = $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) | ||
| ALL_COMMANDS = $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) | ||
| ALL_COMMANDS += git | ||
| ALL_COMMANDS += git-citool | ||
| ALL_COMMANDS += git-gui | ||
|
|
@@ -3218,7 +3230,7 @@ check-docs:: | |
| -e 's/\.txt//'; \ | ||
| ) | while read how cmd; \ | ||
| do \ | ||
| case " $(patsubst %$X,%,$(ALL_COMMANDS) $(EXCLUDED_PROGRAMS)) " in \ | ||
| case " $(patsubst %$X,%,$(ALL_COMMANDS) $(BUILT_INS) $(EXCLUDED_PROGRAMS)) " in \ | ||
| *" $$cmd "*) ;; \ | ||
| *) echo "removed but $$how: $$cmd" ;; \ | ||
| esac; \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -178,6 +178,7 @@ fi | |
| export DEVELOPER=1 | ||
|
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. On the Git mailing list, Junio C Hamano wrote (reply to this): |
||
| export DEFAULT_TEST_TARGET=prove | ||
| export GIT_TEST_CLONE_2GB=true | ||
| export SKIP_DASHED_BUILT_INS=YesPlease | ||
|
|
||
| case "$jobname" in | ||
| linux-clang|linux-gcc) | ||
|
|
||
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.
On the Git mailing list, Junio C Hamano wrote (reply to 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.
On the Git mailing list, Johannes Schindelin wrote (reply to this):