@@ -315,6 +315,7 @@ PROGRAMS =
315
315
SCRIPT_PERL =
316
316
SCRIPT_PYTHON =
317
317
SCRIPT_SH =
318
+ SCRIPT_LIB =
318
319
TEST_PROGRAMS =
319
320
320
321
SCRIPT_SH += git-am.sh
@@ -326,20 +327,21 @@ SCRIPT_SH += git-merge-octopus.sh
326
327
SCRIPT_SH += git-merge-one-file.sh
327
328
SCRIPT_SH += git-merge-resolve.sh
328
329
SCRIPT_SH += git-mergetool.sh
329
- SCRIPT_SH += git-mergetool--lib.sh
330
330
SCRIPT_SH += git-notes.sh
331
- SCRIPT_SH += git-parse-remote.sh
332
331
SCRIPT_SH += git-pull.sh
333
332
SCRIPT_SH += git-quiltimport.sh
334
333
SCRIPT_SH += git-rebase--interactive.sh
335
334
SCRIPT_SH += git-rebase.sh
336
335
SCRIPT_SH += git-repack.sh
337
336
SCRIPT_SH += git-request-pull.sh
338
- SCRIPT_SH += git-sh-setup.sh
339
337
SCRIPT_SH += git-stash.sh
340
338
SCRIPT_SH += git-submodule.sh
341
339
SCRIPT_SH += git-web--browse.sh
342
340
341
+ SCRIPT_LIB += git-mergetool--lib
342
+ SCRIPT_LIB += git-parse-remote
343
+ SCRIPT_LIB += git-sh-setup
344
+
343
345
SCRIPT_PERL += git-add--interactive.perl
344
346
SCRIPT_PERL += git-difftool.perl
345
347
SCRIPT_PERL += git-archimport.perl
@@ -1411,7 +1413,7 @@ export TAR INSTALL DESTDIR SHELL_PATH
1411
1413
1412
1414
SHELL = $(SHELL_PATH )
1413
1415
1414
- all :: shell_compatibility_test $(ALL_PROGRAMS ) $(BUILT_INS ) $(OTHER_PROGRAMS ) GIT-BUILD-OPTIONS
1416
+ all :: shell_compatibility_test $(ALL_PROGRAMS ) $(SCRIPT_LIB ) $( BUILT_INS ) $(OTHER_PROGRAMS ) GIT-BUILD-OPTIONS
1415
1417
ifneq (,$X)
1416
1418
$(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';)
1417
1419
endif
@@ -1462,17 +1464,25 @@ common-cmds.h: ./generate-cmdlist.sh command-list.txt
1462
1464
common-cmds.h : $(wildcard Documentation/git-* .txt)
1463
1465
$(QUIET_GEN ) ./generate-cmdlist.sh > $@ + && mv $@ + $@
1464
1466
1467
+ define cmd_munge_script
1468
+ $(RM ) $@ $@ + && \
1469
+ sed -e '1s|# !.*/sh|#!$(SHELL_PATH_SQ)|' \
1470
+ -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
1471
+ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
1472
+ -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
1473
+ -e $(BROKEN_PATH_FIX) \
1474
+
1475
+ endef
1476
+
1465
1477
$(patsubst % .sh,% ,$(SCRIPT_SH ) ) : % : % .sh
1466
- $(QUIET_GEN )$(RM ) $@ $@ + && \
1467
- sed -e ' 1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
1468
- -e ' s|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
1469
- -e ' s/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
1470
- -e ' s/@@NO_CURL@@/$(NO_CURL)/g' \
1471
- -e $(BROKEN_PATH_FIX ) \
1472
- $@ .sh > $@ + && \
1478
+ $(QUIET_GEN )$(cmd_munge_script ) && \
1473
1479
chmod +x $@ + && \
1474
1480
mv $@ + $@
1475
1481
1482
+ $(SCRIPT_LIB ) : % : % .sh
1483
+ $(QUIET_GEN )$(cmd_munge_script ) && \
1484
+ mv $@ + $@
1485
+
1476
1486
ifndef NO_PERL
1477
1487
$(patsubst % .perl,% ,$(SCRIPT_PERL ) ) : perl/perl.mak
1478
1488
@@ -1805,6 +1815,7 @@ install: all
1805
1815
$(INSTALL ) -d -m 755 ' $(DESTDIR_SQ)$(bindir_SQ)'
1806
1816
$(INSTALL ) -d -m 755 ' $(DESTDIR_SQ)$(gitexec_instdir_SQ)'
1807
1817
$(INSTALL ) $(ALL_PROGRAMS ) ' $(DESTDIR_SQ)$(gitexec_instdir_SQ)'
1818
+ $(INSTALL ) -m 644 $(SCRIPT_LIB ) ' $(DESTDIR_SQ)$(gitexec_instdir_SQ)'
1808
1819
$(INSTALL ) $(install_bindir_programs ) ' $(DESTDIR_SQ)$(bindir_SQ)'
1809
1820
$(MAKE ) -C templates DESTDIR=' $(DESTDIR_SQ)' install
1810
1821
ifndef NO_PERL
@@ -1924,7 +1935,7 @@ distclean: clean
1924
1935
clean :
1925
1936
$(RM ) * .o block-sha1/* .o ppc/* .o compat/* .o compat/* /* .o xdiff/* .o \
1926
1937
$(LIB_FILE ) $(XDIFF_LIB )
1927
- $(RM ) $(ALL_PROGRAMS ) $(BUILT_INS ) git$X
1938
+ $(RM ) $(ALL_PROGRAMS ) $(SCRIPT_LIB ) $( BUILT_INS ) git$X
1928
1939
$(RM ) $(TEST_PROGRAMS )
1929
1940
$(RM ) -r bin-wrappers
1930
1941
$(RM ) * .spec * .pyc * .pyo * /* .pyc * /* .pyo common-cmds.h TAGS tags cscope*
@@ -1956,7 +1967,7 @@ endif
1956
1967
# ## Check documentation
1957
1968
#
1958
1969
check-docs ::
1959
- @ (for v in $( ALL_PROGRAMS) $( BUILT_INS) git gitk; \
1970
+ @ (for v in $( ALL_PROGRAMS) $( SCRIPT_LIB ) $( BUILT_INS) git gitk; \
1960
1971
do \
1961
1972
case " $$ v" in \
1962
1973
git-merge-octopus | git-merge-ours | git-merge-recursive | \
@@ -1999,9 +2010,12 @@ check-docs::
1999
2010
documented,gitrepository-layout | \
2000
2011
documented,gittutorial | \
2001
2012
documented,gittutorial-2 | \
2013
+ documented,git-bisect-lk2009 | \
2014
+ documented.git-remote-helpers | \
2015
+ documented,gitworkflows | \
2002
2016
sentinel,not,matching,is,ok ) continue ;; \
2003
2017
esac ; \
2004
- case " $( ALL_PROGRAMS) $( BUILT_INS) git gitk " in \
2018
+ case " $( ALL_PROGRAMS) $( SCRIPT_LIB ) $( BUILT_INS) git gitk " in \
2005
2019
* " $$ cmd " * ) ;; \
2006
2020
* ) echo " removed but $$ how: $$ cmd" ;; \
2007
2021
esac ; \
0 commit comments