Merge branch 'jn/makefile-script-lib'
* jn/makefile-script-lib: Do not install shell libraries executable
This commit is contained in:
commit
7fa2b1f60b
42
Makefile
42
Makefile
@ -315,6 +315,7 @@ PROGRAMS =
|
||||
SCRIPT_PERL =
|
||||
SCRIPT_PYTHON =
|
||||
SCRIPT_SH =
|
||||
SCRIPT_LIB =
|
||||
TEST_PROGRAMS =
|
||||
|
||||
SCRIPT_SH += git-am.sh
|
||||
@ -326,20 +327,21 @@ SCRIPT_SH += git-merge-octopus.sh
|
||||
SCRIPT_SH += git-merge-one-file.sh
|
||||
SCRIPT_SH += git-merge-resolve.sh
|
||||
SCRIPT_SH += git-mergetool.sh
|
||||
SCRIPT_SH += git-mergetool--lib.sh
|
||||
SCRIPT_SH += git-notes.sh
|
||||
SCRIPT_SH += git-parse-remote.sh
|
||||
SCRIPT_SH += git-pull.sh
|
||||
SCRIPT_SH += git-quiltimport.sh
|
||||
SCRIPT_SH += git-rebase--interactive.sh
|
||||
SCRIPT_SH += git-rebase.sh
|
||||
SCRIPT_SH += git-repack.sh
|
||||
SCRIPT_SH += git-request-pull.sh
|
||||
SCRIPT_SH += git-sh-setup.sh
|
||||
SCRIPT_SH += git-stash.sh
|
||||
SCRIPT_SH += git-submodule.sh
|
||||
SCRIPT_SH += git-web--browse.sh
|
||||
|
||||
SCRIPT_LIB += git-mergetool--lib
|
||||
SCRIPT_LIB += git-parse-remote
|
||||
SCRIPT_LIB += git-sh-setup
|
||||
|
||||
SCRIPT_PERL += git-add--interactive.perl
|
||||
SCRIPT_PERL += git-difftool.perl
|
||||
SCRIPT_PERL += git-archimport.perl
|
||||
@ -1411,7 +1413,7 @@ export TAR INSTALL DESTDIR SHELL_PATH
|
||||
|
||||
SHELL = $(SHELL_PATH)
|
||||
|
||||
all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS
|
||||
all:: shell_compatibility_test $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(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';)
|
||||
endif
|
||||
@ -1462,17 +1464,25 @@ common-cmds.h: ./generate-cmdlist.sh command-list.txt
|
||||
common-cmds.h: $(wildcard Documentation/git-*.txt)
|
||||
$(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@
|
||||
|
||||
define cmd_munge_script
|
||||
$(RM) $@ $@+ && \
|
||||
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
|
||||
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
|
||||
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
|
||||
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
|
||||
-e $(BROKEN_PATH_FIX) \
|
||||
$@.sh >$@+
|
||||
endef
|
||||
|
||||
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
|
||||
$(QUIET_GEN)$(RM) $@ $@+ && \
|
||||
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
|
||||
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
|
||||
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
|
||||
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
|
||||
-e $(BROKEN_PATH_FIX) \
|
||||
$@.sh >$@+ && \
|
||||
$(QUIET_GEN)$(cmd_munge_script) && \
|
||||
chmod +x $@+ && \
|
||||
mv $@+ $@
|
||||
|
||||
$(SCRIPT_LIB) : % : %.sh
|
||||
$(QUIET_GEN)$(cmd_munge_script) && \
|
||||
mv $@+ $@
|
||||
|
||||
ifndef NO_PERL
|
||||
$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
|
||||
|
||||
@ -1805,6 +1815,7 @@ install: all
|
||||
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
|
||||
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
|
||||
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
|
||||
$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
|
||||
$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
|
||||
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
|
||||
ifndef NO_PERL
|
||||
@ -1924,7 +1935,7 @@ distclean: clean
|
||||
clean:
|
||||
$(RM) *.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o \
|
||||
$(LIB_FILE) $(XDIFF_LIB)
|
||||
$(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X
|
||||
$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X
|
||||
$(RM) $(TEST_PROGRAMS)
|
||||
$(RM) -r bin-wrappers
|
||||
$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*
|
||||
@ -1956,7 +1967,7 @@ endif
|
||||
### Check documentation
|
||||
#
|
||||
check-docs::
|
||||
@(for v in $(ALL_PROGRAMS) $(BUILT_INS) git gitk; \
|
||||
@(for v in $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk; \
|
||||
do \
|
||||
case "$$v" in \
|
||||
git-merge-octopus | git-merge-ours | git-merge-recursive | \
|
||||
@ -1999,9 +2010,12 @@ check-docs::
|
||||
documented,gitrepository-layout | \
|
||||
documented,gittutorial | \
|
||||
documented,gittutorial-2 | \
|
||||
documented,git-bisect-lk2009 | \
|
||||
documented.git-remote-helpers | \
|
||||
documented,gitworkflows | \
|
||||
sentinel,not,matching,is,ok ) continue ;; \
|
||||
esac; \
|
||||
case " $(ALL_PROGRAMS) $(BUILT_INS) git gitk " in \
|
||||
case " $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk " in \
|
||||
*" $$cmd "*) ;; \
|
||||
*) echo "removed but $$how: $$cmd" ;; \
|
||||
esac; \
|
||||
|
0
git-parse-remote.sh
Executable file → Normal file
0
git-parse-remote.sh
Executable file → Normal file
0
git-sh-setup.sh
Executable file → Normal file
0
git-sh-setup.sh
Executable file → Normal file
Loading…
Reference in New Issue
Block a user