@@ -341,6 +341,7 @@ PROGRAMS =
341
341
SCRIPT_PERL =
342
342
SCRIPT_PYTHON =
343
343
SCRIPT_SH =
344
+ SCRIPT_LIB =
344
345
TEST_PROGRAMS =
345
346
346
347
SCRIPT_SH += git-am.sh
@@ -352,20 +353,21 @@ SCRIPT_SH += git-merge-octopus.sh
352
353
SCRIPT_SH += git-merge-one-file.sh
353
354
SCRIPT_SH += git-merge-resolve.sh
354
355
SCRIPT_SH += git-mergetool.sh
355
- SCRIPT_SH += git-mergetool--lib.sh
356
356
SCRIPT_SH += git-notes.sh
357
- SCRIPT_SH += git-parse-remote.sh
358
357
SCRIPT_SH += git-pull.sh
359
358
SCRIPT_SH += git-quiltimport.sh
360
359
SCRIPT_SH += git-rebase--interactive.sh
361
360
SCRIPT_SH += git-rebase.sh
362
361
SCRIPT_SH += git-repack.sh
363
362
SCRIPT_SH += git-request-pull.sh
364
- SCRIPT_SH += git-sh-setup.sh
365
363
SCRIPT_SH += git-stash.sh
366
364
SCRIPT_SH += git-submodule.sh
367
365
SCRIPT_SH += git-web--browse.sh
368
366
367
+ SCRIPT_LIB += git-mergetool--lib
368
+ SCRIPT_LIB += git-parse-remote
369
+ SCRIPT_LIB += git-sh-setup
370
+
369
371
SCRIPT_PERL += git-add--interactive.perl
370
372
SCRIPT_PERL += git-difftool.perl
371
373
SCRIPT_PERL += git-archimport.perl
@@ -1454,7 +1456,7 @@ export TAR INSTALL DESTDIR SHELL_PATH
1454
1456
1455
1457
SHELL = $(SHELL_PATH )
1456
1458
1457
- all :: shell_compatibility_test $(ALL_PROGRAMS ) $(BUILT_INS ) $(OTHER_PROGRAMS ) GIT-BUILD-OPTIONS
1459
+ all :: shell_compatibility_test $(ALL_PROGRAMS ) $(SCRIPT_LIB ) $( BUILT_INS ) $(OTHER_PROGRAMS ) GIT-BUILD-OPTIONS
1458
1460
ifneq (,$X)
1459
1461
$(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';)
1460
1462
endif
@@ -1505,17 +1507,25 @@ common-cmds.h: ./generate-cmdlist.sh command-list.txt
1505
1507
common-cmds.h : $(wildcard Documentation/git-* .txt)
1506
1508
$(QUIET_GEN ) ./generate-cmdlist.sh > $@ + && mv $@ + $@
1507
1509
1510
+ define cmd_munge_script
1511
+ $(RM ) $@ $@ + && \
1512
+ sed -e '1s|# !.*/sh|#!$(SHELL_PATH_SQ)|' \
1513
+ -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
1514
+ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
1515
+ -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
1516
+ -e $(BROKEN_PATH_FIX) \
1517
+
1518
+ endef
1519
+
1508
1520
$(patsubst % .sh,% ,$(SCRIPT_SH ) ) : % : % .sh
1509
- $(QUIET_GEN )$(RM ) $@ $@ + && \
1510
- sed -e ' 1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
1511
- -e ' s|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
1512
- -e ' s/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
1513
- -e ' s/@@NO_CURL@@/$(NO_CURL)/g' \
1514
- -e $(BROKEN_PATH_FIX ) \
1515
- $@ .sh > $@ + && \
1521
+ $(QUIET_GEN )$(cmd_munge_script ) && \
1516
1522
chmod +x $@ + && \
1517
1523
mv $@ + $@
1518
1524
1525
+ $(SCRIPT_LIB ) : % : % .sh
1526
+ $(QUIET_GEN )$(cmd_munge_script ) && \
1527
+ mv $@ + $@
1528
+
1519
1529
ifndef NO_PERL
1520
1530
$(patsubst % .perl,% ,$(SCRIPT_PERL ) ) : perl/perl.mak
1521
1531
@@ -1866,6 +1876,7 @@ install: all
1866
1876
$(INSTALL ) -d -m 755 ' $(DESTDIR_SQ)$(bindir_SQ)'
1867
1877
$(INSTALL ) -d -m 755 ' $(DESTDIR_SQ)$(gitexec_instdir_SQ)'
1868
1878
$(INSTALL ) $(ALL_PROGRAMS ) ' $(DESTDIR_SQ)$(gitexec_instdir_SQ)'
1879
+ $(INSTALL ) -m 644 $(SCRIPT_LIB ) ' $(DESTDIR_SQ)$(gitexec_instdir_SQ)'
1869
1880
$(INSTALL ) $(install_bindir_programs ) ' $(DESTDIR_SQ)$(bindir_SQ)'
1870
1881
$(MAKE ) -C templates DESTDIR=' $(DESTDIR_SQ)' install
1871
1882
ifndef NO_PERL
@@ -1985,7 +1996,7 @@ distclean: clean
1985
1996
clean :
1986
1997
$(RM ) * .o block-sha1/* .o ppc/* .o compat/* .o compat/* /* .o xdiff/* .o \
1987
1998
$(LIB_FILE ) $(XDIFF_LIB )
1988
- $(RM ) $(ALL_PROGRAMS ) $(BUILT_INS ) git$X
1999
+ $(RM ) $(ALL_PROGRAMS ) $(SCRIPT_LIB ) $( BUILT_INS ) git$X
1989
2000
$(RM ) $(TEST_PROGRAMS )
1990
2001
$(RM ) -r bin-wrappers
1991
2002
$(RM ) * .spec * .pyc * .pyo * /* .pyc * /* .pyo common-cmds.h TAGS tags cscope*
@@ -2017,7 +2028,7 @@ endif
2017
2028
# ## Check documentation
2018
2029
#
2019
2030
check-docs ::
2020
- @ (for v in $( ALL_PROGRAMS) $( BUILT_INS) git gitk; \
2031
+ @ (for v in $( ALL_PROGRAMS) $( SCRIPT_LIB ) $( BUILT_INS) git gitk; \
2021
2032
do \
2022
2033
case " $$ v" in \
2023
2034
git-merge-octopus | git-merge-ours | git-merge-recursive | \
@@ -2060,9 +2071,12 @@ check-docs::
2060
2071
documented,gitrepository-layout | \
2061
2072
documented,gittutorial | \
2062
2073
documented,gittutorial-2 | \
2074
+ documented,git-bisect-lk2009 | \
2075
+ documented.git-remote-helpers | \
2076
+ documented,gitworkflows | \
2063
2077
sentinel,not,matching,is,ok ) continue ;; \
2064
2078
esac ; \
2065
- case " $( ALL_PROGRAMS) $( BUILT_INS) git gitk " in \
2079
+ case " $( ALL_PROGRAMS) $( SCRIPT_LIB ) $( BUILT_INS) git gitk " in \
2066
2080
* " $$ cmd " * ) ;; \
2067
2081
* ) echo " removed but $$ how: $$ cmd" ;; \
2068
2082
esac ; \
0 commit comments