Git fork

Merge branch 'ps/build' into ps/3.0-remote-deprecation

* ps/build: (24 commits)
Introduce support for the Meson build system
Documentation: add comparison of build systems
t: allow overriding build dir
t: better support for out-of-tree builds
Documentation: extract script to generate a list of mergetools
Documentation: teach "cmd-list.perl" about out-of-tree builds
Documentation: allow sourcing generated includes from separate dir
Makefile: simplify building of templates
Makefile: write absolute program path into bin-wrappers
Makefile: allow "bin-wrappers/" directory to exist
Makefile: refactor generators to be PWD-independent
Makefile: extract script to generate gitweb.js
Makefile: extract script to generate gitweb.cgi
Makefile: extract script to massage Python scripts
Makefile: extract script to massage Shell scripts
Makefile: use "generate-perl.sh" to massage Perl library
Makefile: extract script to massage Perl scripts
Makefile: consistently use PERL_PATH
Makefile: generate doc versions via GIT-VERSION-GEN
Makefile: generate "git.rc" via GIT-VERSION-GEN
...

+4991 -507
+2 -1
.gitignore
··· 12 12 /GIT-TEST-SUITES 13 13 /GIT-USER-AGENT 14 14 /GIT-VERSION-FILE 15 - /bin-wrappers/ 16 15 /git 17 16 /git-add 18 17 /git-am ··· 195 194 /config-list.h 196 195 /command-list.h 197 196 /hook-list.h 197 + /version-def.h 198 198 *.tar.gz 199 199 *.dsc 200 200 *.deb 201 + /git.rc 201 202 /git.spec 202 203 *.exe 203 204 *.[aos]
+2
Documentation/.gitignore
··· 15 15 GIT-ASCIIDOCFLAGS 16 16 /.build/ 17 17 /GIT-EXCLUDED-PROGRAMS 18 + /asciidoc.conf 19 + /asciidoctor-extensions.rb
+1 -1
Documentation/CodingGuidelines
··· 583 583 Run `GIT_DEBUGGER=1 ./bin-wrappers/git foo` to simply use gdb as is, or 584 584 run `GIT_DEBUGGER="<debugger> <debugger-args>" ./bin-wrappers/git foo` to 585 585 use your own debugger and arguments. Example: `GIT_DEBUGGER="ddd --gdb" 586 - ./bin-wrappers/git log` (See `wrap-for-bin.sh`.) 586 + ./bin-wrappers/git log` (See `bin-wrappers/wrap-for-bin.sh`.) 587 587 588 588 - The primary data structure that a subsystem 'S' deals with is called 589 589 `struct S`. Functions that operate on `struct S` are named
+28 -25
Documentation/Makefile
··· 1 1 # Import tree-wide shared Makefile behavior and libraries 2 2 include ../shared.mak 3 3 4 + .PHONY: FORCE 5 + 4 6 # Guard against environment variables 5 7 MAN1_TXT = 6 8 MAN5_TXT = ··· 111 113 TECH_DOCS += SubmittingPatches 112 114 TECH_DOCS += ToolsForGit 113 115 TECH_DOCS += technical/bitmap-format 116 + TECH_DOCS += technical/build-systems 114 117 TECH_DOCS += technical/bundle-uri 115 118 TECH_DOCS += technical/hash-function-transition 116 119 TECH_DOCS += technical/long-running-process-protocol ··· 148 151 man7dir = $(mandir)/man7 149 152 # DESTDIR = 150 153 151 - GIT_DATE := $(shell git show --quiet --pretty='%as') 152 - 153 154 ASCIIDOC = asciidoc 154 155 ASCIIDOC_EXTRA = 155 156 ASCIIDOC_HTML = xhtml11 156 157 ASCIIDOC_DOCBOOK = docbook 157 158 ASCIIDOC_CONF = -f asciidoc.conf 158 - ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \ 159 - -amanmanual='Git Manual' -amansource='Git $(GIT_VERSION)' \ 160 - -arevdate='$(GIT_DATE)' 159 + ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) 161 160 ASCIIDOC_DEPS = asciidoc.conf GIT-ASCIIDOCFLAGS 162 161 TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML) 163 162 TXT_TO_XML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK) ··· 210 209 DBLATEX_COMMON = 211 210 XMLTO_EXTRA += --skip-validation 212 211 XMLTO_EXTRA += -x manpage.xsl 212 + 213 + asciidoctor-extensions.rb: asciidoctor-extensions.rb.in FORCE 214 + $(QUIET_GEN)GIT_USER_AGENT="$(GIT_USER_AGENT)" $(SHELL_PATH) ../GIT-VERSION-GEN "$(shell pwd)/.." $< $@+ 215 + @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi 216 + else 217 + asciidoc.conf: asciidoc.conf.in FORCE 218 + $(QUIET_GEN)GIT_USER_AGENT="$(GIT_USER_AGENT)" $(SHELL_PATH) ../GIT-VERSION-GEN "$(shell pwd)/.." $< $@+ 219 + @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi 213 220 endif 214 221 215 222 ASCIIDOC_DEPS += docinfo.html ··· 218 225 # Shell quote; 219 226 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) 220 227 228 + ASCIIDOC_EXTRA += -abuild_dir='$(shell pwd)' 221 229 ifdef DEFAULT_PAGER 222 230 DEFAULT_PAGER_SQ = $(subst ','\'',$(DEFAULT_PAGER)) 223 231 ASCIIDOC_EXTRA += -a 'git-default-pager=$(DEFAULT_PAGER_SQ)' ··· 275 283 -include ../GIT-VERSION-FILE 276 284 endif 277 285 286 + mergetools_txt = mergetools-diff.txt mergetools-merge.txt 287 + 278 288 # 279 289 # Determine "include::" file references in asciidoc files. 280 290 # 281 291 docdep_prereqs = \ 282 - mergetools-list.made $(mergetools_txt) \ 292 + $(mergetools_txt) \ 283 293 cmd-list.made $(cmds_txt) 284 294 285 295 doc.dep : $(docdep_prereqs) $(DOC_DEP_TXT) build-docdep.perl 286 - $(QUIET_GEN)$(PERL_PATH) ./build-docdep.perl >$@ $(QUIET_STDERR) 296 + $(QUIET_GEN)$(PERL_PATH) ./build-docdep.perl "$(shell pwd)" >$@ $(QUIET_STDERR) 287 297 288 298 ifneq ($(MAKECMDGOALS),clean) 289 299 -include doc.dep ··· 305 315 $(cmds_txt): cmd-list.made 306 316 307 317 cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT) 308 - $(QUIET_GEN)$(PERL_PATH) ./cmd-list.perl ../command-list.txt $(cmds_txt) $(QUIET_STDERR) && \ 318 + $(QUIET_GEN)$(PERL_PATH) ./cmd-list.perl .. . $(cmds_txt) && \ 309 319 date >$@ 310 320 311 - mergetools_txt = mergetools-diff.txt mergetools-merge.txt 312 - 313 - $(mergetools_txt): mergetools-list.made 314 - 315 - mergetools-list.made: ../git-mergetool--lib.sh $(wildcard ../mergetools/*) 316 - $(QUIET_GEN) \ 317 - $(SHELL_PATH) -c 'MERGE_TOOLS_DIR=../mergetools && TOOL_MODE=diff && \ 318 - . ../git-mergetool--lib.sh && \ 319 - show_tool_names can_diff' | sed -e "s/\([a-z0-9]*\)/\`\1\`;;/" >mergetools-diff.txt && \ 320 - $(SHELL_PATH) -c 'MERGE_TOOLS_DIR=../mergetools && TOOL_MODE=merge && \ 321 - . ../git-mergetool--lib.sh && \ 322 - show_tool_names can_merge' | sed -e "s/\([a-z0-9]*\)/\`\1\`;;/" >mergetools-merge.txt && \ 323 - date >$@ 321 + mergetools-%.txt: generate-mergetool-list.sh ../git-mergetool--lib.sh $(wildcard ../mergetools/*) 322 + mergetools-diff.txt: 323 + $(QUIET_GEN)$(SHELL_PATH) ./generate-mergetool-list.sh .. diff $@ 324 + mergetools-merge.txt: 325 + $(QUIET_GEN)$(SHELL_PATH) ./generate-mergetool-list.sh .. merge $@ 324 326 325 327 TRACK_ASCIIDOCFLAGS = $(subst ','\'',$(ASCIIDOC_COMMON):$(ASCIIDOC_HTML):$(ASCIIDOC_DOCBOOK)) 326 328 ··· 341 343 $(RM) SubmittingPatches.txt 342 344 $(RM) $(cmds_txt) $(mergetools_txt) *.made 343 345 $(RM) GIT-ASCIIDOCFLAGS 346 + $(RM) asciidoc.conf asciidoctor-extensions.rb 344 347 345 348 docinfo.html: docinfo-html.in 346 349 $(QUIET_GEN)$(RM) $@ && cat $< >$@ ··· 364 367 %.xml : %.txt $(ASCIIDOC_DEPS) 365 368 $(QUIET_ASCIIDOC)$(TXT_TO_XML) -d manpage -o $@ $< 366 369 367 - user-manual.xml: user-manual.txt user-manual.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS 370 + user-manual.xml: user-manual.txt user-manual.conf $(ASCIIDOC_DEPS) 368 371 $(QUIET_ASCIIDOC)$(TXT_TO_XML) -d book -o $@ $< 369 372 370 373 technical/api-index.txt: technical/api-index-skel.txt \ ··· 373 376 374 377 technical/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../ 375 378 $(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt \ 376 - asciidoc.conf GIT-ASCIIDOCFLAGS 379 + $(ASCIIDOC_DEPS) 377 380 $(QUIET_ASCIIDOC)$(TXT_TO_HTML) $*.txt 378 381 379 382 SubmittingPatches.txt: SubmittingPatches ··· 416 419 howto-index.txt: howto-index.sh $(HOWTO_TXT) 417 420 $(QUIET_GEN)'$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(HOWTO_TXT)) >$@ 418 421 419 - $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt 422 + $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt $(ASCIIDOC_DEPS) 420 423 $(QUIET_ASCIIDOC)$(TXT_TO_HTML) $*.txt 421 424 422 425 WEBDOC_DEST = /pub/software/scm/git/docs 423 426 424 427 howto/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../ 425 - $(patsubst %.txt,%.html,$(HOWTO_TXT)): %.html : %.txt GIT-ASCIIDOCFLAGS 428 + $(patsubst %.txt,%.html,$(HOWTO_TXT)): %.html : %.txt $(ASCIIDOC_DEPS) 426 429 $(QUIET_ASCIIDOC) \ 427 430 sed -e '1,/^$$/d' $< | \ 428 431 $(TXT_TO_HTML) - >$@
+3
Documentation/asciidoc.conf Documentation/asciidoc.conf.in
··· 21 21 apostrophe=&#39; 22 22 backtick=&#96; 23 23 litdd=&#45;&#45; 24 + manmanual='Git Manual' 25 + mansource='Git @GIT_VERSION@' 26 + revdate='@GIT_DATE@' 24 27 25 28 ifdef::backend-docbook[] 26 29 [linkgit-inlinemacro]
+2 -6
Documentation/asciidoctor-extensions.rb Documentation/asciidoctor-extensions.rb.in
··· 29 29 class DocumentPostProcessor < Asciidoctor::Extensions::Postprocessor 30 30 def process document, output 31 31 if document.basebackend? 'docbook' 32 - mansource = document.attributes['mansource'] 33 - manversion = document.attributes['manversion'] 34 - manmanual = document.attributes['manmanual'] 35 32 new_tags = "" \ 36 - "<refmiscinfo class=\"source\">#{mansource}</refmiscinfo>\n" \ 37 - "<refmiscinfo class=\"version\">#{manversion}</refmiscinfo>\n" \ 38 - "<refmiscinfo class=\"manual\">#{manmanual}</refmiscinfo>\n" 33 + "<refmiscinfo class=\"source\">@GIT_VERSION@</refmiscinfo>\n" \ 34 + "<refmiscinfo class=\"manual\">Git Manual</refmiscinfo>\n" 39 35 output = output.sub(/<\/refmeta>/, new_tags + "</refmeta>") 40 36 end 41 37 output
+2
Documentation/build-docdep.perl
··· 1 1 #!/usr/bin/perl 2 2 3 + my ($build_dir) = @ARGV; 3 4 my %include = (); 4 5 my %included = (); 5 6 ··· 10 11 chomp; 11 12 s/^include::\s*//; 12 13 s/\[\]//; 14 + s/{build_dir}/${build_dir}/; 13 15 $include{$text}{$_} = 1; 14 16 $included{$_} = 1; 15 17 }
+12 -11
Documentation/cmd-list.perl
··· 3 3 use File::Compare qw(compare); 4 4 5 5 sub format_one { 6 - my ($out, $nameattr) = @_; 6 + my ($source_dir, $out, $nameattr) = @_; 7 7 my ($name, $attr) = @$nameattr; 8 + my ($path) = "$source_dir/Documentation/$name.txt"; 8 9 my ($state, $description); 9 10 my $mansection; 10 11 $state = 0; 11 - open I, '<', "$name.txt" or die "No such file $name.txt"; 12 + open I, '<', "$path" or die "No such file $path.txt"; 12 13 while (<I>) { 13 14 if (/^(?:git|scalar)[a-z0-9-]*\(([0-9])\)$/) { 14 15 $mansection = $1; ··· 29 30 } 30 31 close I; 31 32 if (!defined $description) { 32 - die "No description found in $name.txt"; 33 + die "No description found in $path.txt"; 33 34 } 34 35 if (my ($verify_name, $text) = ($description =~ /^($name) - (.*)/)) { 35 36 print $out "linkgit:$name\[$mansection\]::\n\t"; ··· 43 44 } 44 45 } 45 46 46 - my ($input, @categories) = @ARGV; 47 + my ($source_dir, $build_dir, @categories) = @ARGV; 47 48 48 - open IN, "<$input"; 49 + open IN, "<$source_dir/command-list.txt"; 49 50 while (<IN>) { 50 51 last if /^### command list/; 51 52 } ··· 63 64 64 65 for my $out (@categories) { 65 66 my ($cat) = $out =~ /^cmds-(.*)\.txt$/; 66 - open O, '>', "$out+" or die "Cannot open output file $out+"; 67 + my ($path) = "$build_dir/$out"; 68 + open O, '>', "$path+" or die "Cannot open output file $out+"; 67 69 for (@{$cmds{$cat}}) { 68 - format_one(\*O, $_); 70 + format_one($source_dir, \*O, $_); 69 71 } 70 72 close O; 71 73 72 - if (-f "$out" && compare("$out", "$out+") == 0) { 73 - unlink "$out+"; 74 + if (-f "$path" && compare("$path", "$path+") == 0) { 75 + unlink "$path+"; 74 76 } 75 77 else { 76 - print STDERR "$out\n"; 77 - rename "$out+", "$out"; 78 + rename "$path+", "$path"; 78 79 } 79 80 }
+1 -1
Documentation/config/diff.txt
··· 218 218 Set this option to `true` to make the diff driver cache the text 219 219 conversion outputs. See linkgit:gitattributes[5] for details. 220 220 221 - include::../mergetools-diff.txt[] 221 + include::{build_dir}/mergetools-diff.txt[] 222 222 223 223 `diff.indentHeuristic`:: 224 224 Set this option to `false` to disable the default heuristics
+1 -1
Documentation/config/merge.txt
··· 101 101 Any other value is treated as a custom merge tool and requires that a 102 102 corresponding mergetool.<guitool>.cmd variable is defined. 103 103 104 - include::../mergetools-merge.txt[] 104 + include::{build_dir}/mergetools-merge.txt[] 105 105 106 106 merge.verbosity:: 107 107 Controls the amount of output shown by the recursive merge
+17
Documentation/generate-mergetool-list.sh
··· 1 + #!/bin/sh 2 + 3 + if test "$#" -ne 3 4 + then 5 + echo >&2 "USAGE: $0 <SOURCE_DIR> <MODE> <OUTPUT>" 6 + exit 1 7 + fi 8 + 9 + SOURCE_DIR="$1" 10 + TOOL_MODE="$2" 11 + OUTPUT="$3" 12 + MERGE_TOOLS_DIR="$SOURCE_DIR/mergetools" 13 + 14 + ( 15 + . "$SOURCE_DIR"/git-mergetool--lib.sh && 16 + show_tool_names can_$TOOL_MODE 17 + ) | sed -e "s/\([a-z0-9]*\)/\`\1\`;;/" >"$OUTPUT"
+12 -12
Documentation/git.txt
··· 245 245 Main porcelain commands 246 246 ~~~~~~~~~~~~~~~~~~~~~~~ 247 247 248 - include::cmds-mainporcelain.txt[] 248 + include::{build_dir}/cmds-mainporcelain.txt[] 249 249 250 250 Ancillary Commands 251 251 ~~~~~~~~~~~~~~~~~~ 252 252 Manipulators: 253 253 254 - include::cmds-ancillarymanipulators.txt[] 254 + include::{build_dir}/cmds-ancillarymanipulators.txt[] 255 255 256 256 Interrogators: 257 257 258 - include::cmds-ancillaryinterrogators.txt[] 258 + include::{build_dir}/cmds-ancillaryinterrogators.txt[] 259 259 260 260 261 261 Interacting with Others ··· 264 264 These commands are to interact with foreign SCM and with other 265 265 people via patch over e-mail. 266 266 267 - include::cmds-foreignscminterface.txt[] 267 + include::{build_dir}/cmds-foreignscminterface.txt[] 268 268 269 269 Reset, restore and revert 270 270 ~~~~~~~~~~~~~~~~~~~~~~~~~ ··· 313 313 Manipulation commands 314 314 ~~~~~~~~~~~~~~~~~~~~~ 315 315 316 - include::cmds-plumbingmanipulators.txt[] 316 + include::{build_dir}/cmds-plumbingmanipulators.txt[] 317 317 318 318 319 319 Interrogation commands 320 320 ~~~~~~~~~~~~~~~~~~~~~~ 321 321 322 - include::cmds-plumbinginterrogators.txt[] 322 + include::{build_dir}/cmds-plumbinginterrogators.txt[] 323 323 324 324 In general, the interrogate commands do not touch the files in 325 325 the working tree. ··· 328 328 Syncing repositories 329 329 ~~~~~~~~~~~~~~~~~~~~ 330 330 331 - include::cmds-synchingrepositories.txt[] 331 + include::{build_dir}/cmds-synchingrepositories.txt[] 332 332 333 333 The following are helper commands used by the above; end users 334 334 typically do not use them directly. 335 335 336 - include::cmds-synchelpers.txt[] 336 + include::{build_dir}/cmds-synchelpers.txt[] 337 337 338 338 339 339 Internal helper commands ··· 342 342 These are internal helper commands used by other commands; end 343 343 users typically do not use them directly. 344 344 345 - include::cmds-purehelpers.txt[] 345 + include::{build_dir}/cmds-purehelpers.txt[] 346 346 347 347 Guides 348 348 ------ 349 349 350 350 The following documentation pages are guides about Git concepts. 351 351 352 - include::cmds-guide.txt[] 352 + include::{build_dir}/cmds-guide.txt[] 353 353 354 354 Repository, command and file interfaces 355 355 --------------------------------------- ··· 358 358 users are expected to interact with directly. See `--user-formats` in 359 359 linkgit:git-help[1] for more details on the criteria. 360 360 361 - include::cmds-userinterfaces.txt[] 361 + include::{build_dir}/cmds-userinterfaces.txt[] 362 362 363 363 File formats, protocols and other developer interfaces 364 364 ------------------------------------------------------ ··· 367 367 other git developer interfaces. See `--developer-interfaces` in 368 368 linkgit:git-help[1]. 369 369 370 - include::cmds-developerinterfaces.txt[] 370 + include::{build_dir}/cmds-developerinterfaces.txt[] 371 371 372 372 Configuration Mechanism 373 373 -----------------------
+324
Documentation/meson.build
··· 1 + manpages = { 2 + # Category 1. 3 + 'git-add.txt' : 1, 4 + 'git-am.txt' : 1, 5 + 'git-annotate.txt' : 1, 6 + 'git-apply.txt' : 1, 7 + 'git-archimport.txt' : 1, 8 + 'git-archive.txt' : 1, 9 + 'git-bisect.txt' : 1, 10 + 'git-blame.txt' : 1, 11 + 'git-branch.txt' : 1, 12 + 'git-bugreport.txt' : 1, 13 + 'git-bundle.txt' : 1, 14 + 'git-cat-file.txt' : 1, 15 + 'git-check-attr.txt' : 1, 16 + 'git-check-ignore.txt' : 1, 17 + 'git-check-mailmap.txt' : 1, 18 + 'git-checkout-index.txt' : 1, 19 + 'git-checkout.txt' : 1, 20 + 'git-check-ref-format.txt' : 1, 21 + 'git-cherry-pick.txt' : 1, 22 + 'git-cherry.txt' : 1, 23 + 'git-citool.txt' : 1, 24 + 'git-clean.txt' : 1, 25 + 'git-clone.txt' : 1, 26 + 'git-column.txt' : 1, 27 + 'git-commit-graph.txt' : 1, 28 + 'git-commit-tree.txt' : 1, 29 + 'git-commit.txt' : 1, 30 + 'git-config.txt' : 1, 31 + 'git-count-objects.txt' : 1, 32 + 'git-credential-cache--daemon.txt' : 1, 33 + 'git-credential-cache.txt' : 1, 34 + 'git-credential-store.txt' : 1, 35 + 'git-credential.txt' : 1, 36 + 'git-cvsexportcommit.txt' : 1, 37 + 'git-cvsimport.txt' : 1, 38 + 'git-cvsserver.txt' : 1, 39 + 'git-daemon.txt' : 1, 40 + 'git-describe.txt' : 1, 41 + 'git-diagnose.txt' : 1, 42 + 'git-diff-files.txt' : 1, 43 + 'git-diff-index.txt' : 1, 44 + 'git-difftool.txt' : 1, 45 + 'git-diff-tree.txt' : 1, 46 + 'git-diff.txt' : 1, 47 + 'git-fast-export.txt' : 1, 48 + 'git-fast-import.txt' : 1, 49 + 'git-fetch-pack.txt' : 1, 50 + 'git-fetch.txt' : 1, 51 + 'git-filter-branch.txt' : 1, 52 + 'git-fmt-merge-msg.txt' : 1, 53 + 'git-for-each-ref.txt' : 1, 54 + 'git-for-each-repo.txt' : 1, 55 + 'git-format-patch.txt' : 1, 56 + 'git-fsck-objects.txt' : 1, 57 + 'git-fsck.txt' : 1, 58 + 'git-fsmonitor--daemon.txt' : 1, 59 + 'git-gc.txt' : 1, 60 + 'git-get-tar-commit-id.txt' : 1, 61 + 'git-grep.txt' : 1, 62 + 'git-gui.txt' : 1, 63 + 'git-hash-object.txt' : 1, 64 + 'git-help.txt' : 1, 65 + 'git-hook.txt' : 1, 66 + 'git-http-backend.txt' : 1, 67 + 'git-http-fetch.txt' : 1, 68 + 'git-http-push.txt' : 1, 69 + 'git-imap-send.txt' : 1, 70 + 'git-index-pack.txt' : 1, 71 + 'git-init-db.txt' : 1, 72 + 'git-init.txt' : 1, 73 + 'git-instaweb.txt' : 1, 74 + 'git-interpret-trailers.txt' : 1, 75 + 'git-log.txt' : 1, 76 + 'git-ls-files.txt' : 1, 77 + 'git-ls-remote.txt' : 1, 78 + 'git-ls-tree.txt' : 1, 79 + 'git-mailinfo.txt' : 1, 80 + 'git-mailsplit.txt' : 1, 81 + 'git-maintenance.txt' : 1, 82 + 'git-merge-base.txt' : 1, 83 + 'git-merge-file.txt' : 1, 84 + 'git-merge-index.txt' : 1, 85 + 'git-merge-one-file.txt' : 1, 86 + 'git-mergetool--lib.txt' : 1, 87 + 'git-mergetool.txt' : 1, 88 + 'git-merge-tree.txt' : 1, 89 + 'git-merge.txt' : 1, 90 + 'git-mktag.txt' : 1, 91 + 'git-mktree.txt' : 1, 92 + 'git-multi-pack-index.txt' : 1, 93 + 'git-mv.txt' : 1, 94 + 'git-name-rev.txt' : 1, 95 + 'git-notes.txt' : 1, 96 + 'git-p4.txt' : 1, 97 + 'git-pack-objects.txt' : 1, 98 + 'git-pack-redundant.txt' : 1, 99 + 'git-pack-refs.txt' : 1, 100 + 'git-patch-id.txt' : 1, 101 + 'git-prune-packed.txt' : 1, 102 + 'git-prune.txt' : 1, 103 + 'git-pull.txt' : 1, 104 + 'git-push.txt' : 1, 105 + 'git-quiltimport.txt' : 1, 106 + 'git-range-diff.txt' : 1, 107 + 'git-read-tree.txt' : 1, 108 + 'git-rebase.txt' : 1, 109 + 'git-receive-pack.txt' : 1, 110 + 'git-reflog.txt' : 1, 111 + 'git-refs.txt' : 1, 112 + 'git-remote-ext.txt' : 1, 113 + 'git-remote-fd.txt' : 1, 114 + 'git-remote.txt' : 1, 115 + 'git-repack.txt' : 1, 116 + 'git-replace.txt' : 1, 117 + 'git-replay.txt' : 1, 118 + 'git-request-pull.txt' : 1, 119 + 'git-rerere.txt' : 1, 120 + 'git-reset.txt' : 1, 121 + 'git-restore.txt' : 1, 122 + 'git-revert.txt' : 1, 123 + 'git-rev-list.txt' : 1, 124 + 'git-rev-parse.txt' : 1, 125 + 'git-rm.txt' : 1, 126 + 'git-send-email.txt' : 1, 127 + 'git-send-pack.txt' : 1, 128 + 'git-shell.txt' : 1, 129 + 'git-sh-i18n--envsubst.txt' : 1, 130 + 'git-sh-i18n.txt' : 1, 131 + 'git-shortlog.txt' : 1, 132 + 'git-show-branch.txt' : 1, 133 + 'git-show-index.txt' : 1, 134 + 'git-show-ref.txt' : 1, 135 + 'git-show.txt' : 1, 136 + 'git-sh-setup.txt' : 1, 137 + 'git-sparse-checkout.txt' : 1, 138 + 'git-stage.txt' : 1, 139 + 'git-stash.txt' : 1, 140 + 'git-status.txt' : 1, 141 + 'git-stripspace.txt' : 1, 142 + 'git-submodule.txt' : 1, 143 + 'git-svn.txt' : 1, 144 + 'git-switch.txt' : 1, 145 + 'git-symbolic-ref.txt' : 1, 146 + 'git-tag.txt' : 1, 147 + 'git-unpack-file.txt' : 1, 148 + 'git-unpack-objects.txt' : 1, 149 + 'git-update-index.txt' : 1, 150 + 'git-update-ref.txt' : 1, 151 + 'git-update-server-info.txt' : 1, 152 + 'git-upload-archive.txt' : 1, 153 + 'git-upload-pack.txt' : 1, 154 + 'git-var.txt' : 1, 155 + 'git-verify-commit.txt' : 1, 156 + 'git-verify-pack.txt' : 1, 157 + 'git-verify-tag.txt' : 1, 158 + 'git-version.txt' : 1, 159 + 'git-web--browse.txt' : 1, 160 + 'git-whatchanged.txt' : 1, 161 + 'git-worktree.txt' : 1, 162 + 'git-write-tree.txt' : 1, 163 + 'git.txt' : 1, 164 + 'gitk.txt' : 1, 165 + 'gitweb.txt' : 1, 166 + 'scalar.txt' : 1, 167 + 168 + # Category 5. 169 + 'gitattributes.txt' : 5, 170 + 'gitformat-bundle.txt' : 5, 171 + 'gitformat-chunk.txt' : 5, 172 + 'gitformat-commit-graph.txt' : 5, 173 + 'gitformat-index.txt' : 5, 174 + 'gitformat-pack.txt' : 5, 175 + 'gitformat-signature.txt' : 5, 176 + 'githooks.txt' : 5, 177 + 'gitignore.txt' : 5, 178 + 'gitmailmap.txt' : 5, 179 + 'gitmodules.txt' : 5, 180 + 'gitprotocol-capabilities.txt' : 5, 181 + 'gitprotocol-common.txt' : 5, 182 + 'gitprotocol-http.txt' : 5, 183 + 'gitprotocol-pack.txt' : 5, 184 + 'gitprotocol-v2.txt' : 5, 185 + 'gitrepository-layout.txt' : 5, 186 + 'gitweb.conf.txt' : 5, 187 + 188 + # Category 7. 189 + 'gitcli.txt' : 7, 190 + 'gitcore-tutorial.txt' : 7, 191 + 'gitcredentials.txt' : 7, 192 + 'gitcvs-migration.txt' : 7, 193 + 'gitdiffcore.txt' : 7, 194 + 'giteveryday.txt' : 7, 195 + 'gitfaq.txt' : 7, 196 + 'gitglossary.txt' : 7, 197 + 'gitpacking.txt' : 7, 198 + 'gitnamespaces.txt' : 7, 199 + 'gitremote-helpers.txt' : 7, 200 + 'gitrevisions.txt' : 7, 201 + 'gitsubmodules.txt' : 7, 202 + 'gittutorial-2.txt' : 7, 203 + 'gittutorial.txt' : 7, 204 + 'gitworkflows.txt' : 7, 205 + } 206 + 207 + asciidoc = find_program('asciidoc') 208 + git = find_program('git', required: false) 209 + xmlto = find_program('xmlto') 210 + 211 + asciidoc_conf = custom_target( 212 + command: [ 213 + shell, 214 + meson.project_source_root() / 'GIT-VERSION-GEN', 215 + meson.project_source_root(), 216 + '@INPUT@', 217 + '@OUTPUT@', 218 + ], 219 + input: meson.current_source_dir() / 'asciidoc.conf.in', 220 + output: 'asciidoc.conf', 221 + depends: [git_version_file], 222 + ) 223 + 224 + asciidoc_common_options = [ 225 + asciidoc, 226 + '--conf-file=' + asciidoc_conf.full_path(), 227 + '--attribute=build_dir=' + meson.current_build_dir(), 228 + ] 229 + 230 + cmd_lists = [ 231 + 'cmds-ancillaryinterrogators.txt', 232 + 'cmds-ancillarymanipulators.txt', 233 + 'cmds-mainporcelain.txt', 234 + 'cmds-plumbinginterrogators.txt', 235 + 'cmds-plumbingmanipulators.txt', 236 + 'cmds-synchingrepositories.txt', 237 + 'cmds-synchelpers.txt', 238 + 'cmds-guide.txt', 239 + 'cmds-developerinterfaces.txt', 240 + 'cmds-userinterfaces.txt', 241 + 'cmds-purehelpers.txt', 242 + 'cmds-foreignscminterface.txt', 243 + ] 244 + 245 + documentation_deps = [ 246 + asciidoc_conf, 247 + ] 248 + 249 + documentation_deps += custom_target( 250 + command: [ 251 + perl, 252 + meson.current_source_dir() / 'cmd-list.perl', 253 + meson.project_source_root(), 254 + meson.current_build_dir(), 255 + ] + cmd_lists, 256 + output: cmd_lists 257 + ) 258 + 259 + foreach mode : [ 'diff', 'merge' ] 260 + documentation_deps += custom_target( 261 + command: [ 262 + shell, 263 + meson.current_source_dir() / 'generate-mergetool-list.sh', 264 + '..', 265 + 'diff', 266 + '@OUTPUT@' 267 + ], 268 + env: [ 269 + 'MERGE_TOOLS_DIR=' + meson.project_source_root() / 'mergetools', 270 + 'TOOL_MODE=' + mode, 271 + ], 272 + output: 'mergetools-' + mode + '.txt', 273 + ) 274 + endforeach 275 + 276 + foreach manpage, category : manpages 277 + if get_option('docs').contains('man') 278 + manpage_xml_target = custom_target( 279 + command: asciidoc_common_options + [ 280 + '--backend=docbook', 281 + '--doctype=manpage', 282 + '--out-file=@OUTPUT@', 283 + meson.current_source_dir() / manpage, 284 + ], 285 + depends: documentation_deps, 286 + output: fs.stem(manpage) + '.xml', 287 + ) 288 + 289 + manpage_path = fs.stem(manpage) + '.' + category.to_string() 290 + manpage_target = custom_target( 291 + command: [ 292 + xmlto, 293 + '-m', 294 + meson.current_source_dir() / 'manpage-normal.xsl', 295 + '-m', 296 + meson.current_source_dir() / 'manpage-bold-literal.xsl', 297 + '--stringparam', 298 + 'man.base.url.for.relative.links=' + get_option('prefix') / get_option('mandir'), 299 + 'man', 300 + manpage_xml_target, 301 + '-o', 302 + meson.current_build_dir(), 303 + ], 304 + output: manpage_path, 305 + install: true, 306 + install_dir: get_option('mandir') / 'man' + category.to_string(), 307 + ) 308 + endif 309 + 310 + if get_option('docs').contains('html') and category == 1 311 + custom_target( 312 + command: asciidoc_common_options + [ 313 + '--backend=xhtml11', 314 + '--doctype=manpage', 315 + '--out-file=@OUTPUT@', 316 + meson.current_source_dir() / manpage, 317 + ], 318 + depends: documentation_deps, 319 + output: fs.stem(manpage) + '.html', 320 + install: true, 321 + install_dir: get_option('datadir') / 'doc/git-doc', 322 + ) 323 + endif 324 + endforeach
+224
Documentation/technical/build-systems.txt
··· 1 + = Build Systems 2 + 3 + The build system is the primary way for both developers and system integrators 4 + to interact with the Git project. As such, being easy to use and extend for 5 + those who are not directly developing Git itself is just as important as other 6 + requirements we have on any potential build system. 7 + 8 + This document outlines the different requirements that we have for the build 9 + system and then compares available build systems using these criteria. 10 + 11 + == Requirements 12 + 13 + The following subsections present a list of requirements that we have for any 14 + potential build system. Sections are sorted by decreasing priority. 15 + 16 + === Platform support 17 + 18 + The build system must have support for all of our platforms that we continually 19 + test against as outlined by our platform support policy. These platforms are: 20 + 21 + - Linux 22 + - Windows 23 + - macOS 24 + 25 + Furthermore, the build system should have support for the following platforms 26 + that generally have somebody running test pipelines against regularly: 27 + 28 + - AIX 29 + - FreeBSD 30 + - NetBSD 31 + - NonStop 32 + - OpenBSD 33 + 34 + The platforms which must be supported by the tool should be aligned with our 35 + [platform support policy](platform-support.txt). 36 + 37 + === Auto-detection of supported features 38 + 39 + The build system must support auto-detection of features which are or aren't 40 + available on the current platform. Platform maintainers should not be required 41 + to manually configure the complete build. 42 + 43 + Auto-detection of the following items is considered to be important: 44 + 45 + - Check for the existence of headers. 46 + - Check for the existence of libraries. 47 + - Check for the existence of exectuables. 48 + - Check for the runtime behavior of specific functions. 49 + - Check for specific link order requirements when multiple libraries are 50 + involved. 51 + 52 + === Ease of use 53 + 54 + The build system should be both easy to use and easy to extend. While this is 55 + naturally a subjective metric it is likely not controversial to say that some 56 + build systems are considerably harder to use than others. 57 + 58 + === IDE support 59 + 60 + The build system should integrate with well-known IDEs. Well-known IDEs include: 61 + 62 + - Microsoft Visual Studio 63 + - Visual Studio Code 64 + - Xcode 65 + 66 + There are four levels of support: 67 + 68 + - Native integration into the IDE. 69 + - Integration into the IDE via a plugin. 70 + - Integration into the IDE via generating a project description with the build 71 + system. 72 + - No integration. 73 + 74 + Native integration is preferable, but integration via either a plugin or by 75 + generating a project description via the build system are considered feasible 76 + alternatives. 77 + 78 + Another important distinction is the level of integration. There are two 79 + features that one generally wants to have: 80 + 81 + - Integration of build targets. 82 + - Automatic setup of features like code completion with detected build 83 + dependencies. 84 + 85 + The first bullet point is the bare minimum, but is not sufficient to be 86 + considered proper integration. 87 + 88 + === Out-of-tree builds 89 + 90 + The build system should support out-of-tree builds. Out-of-tree builds allow a 91 + developer to configure multiple different build directories with different 92 + configuration, e.g. one "debug" build and one "release" build. 93 + 94 + === Cross-platform builds 95 + 96 + The build system should support cross-platform builds, e.g. building for arm on 97 + an x86-64 host. 98 + 99 + === Language support 100 + 101 + The following languages and toolchains are of relevance and should be supported 102 + by the build system: 103 + 104 + - C: the primary compiled language used by Git, must be supported. Relevant 105 + toolchains are GCC, Clang and MSVC. 106 + - Rust: candidate as a second compiled lanugage, should be supported. Relevant 107 + toolchains is the LLVM-based rustc. 108 + 109 + Built-in support for the respective languages is preferred over support that 110 + needs to be wired up manually to avoid unnecessary complexity. Native support 111 + includes the following features: 112 + 113 + - Compiling objects. 114 + - Dependency tracking. 115 + - Detection of available features. 116 + - Discovery of relevant toolchains. 117 + - Linking libraries and executables. 118 + - Templating placeholders in scripts. 119 + 120 + === Test integration 121 + 122 + It should be possible to integrate tests into the build system such that it is 123 + possible to build and test Git within the build system. Features which are nice 124 + to have: 125 + 126 + - Track build-time dependencies for respective tests. Unit tests have 127 + different requirements than integration tests. 128 + - Allow filtering of which tests to run. 129 + - Allow running tests such that utilities like `test_pause` or `debug` work. 130 + 131 + == Comparison 132 + 133 + The following list of build systems are considered: 134 + 135 + - GNU Make 136 + - autoconf 137 + - CMake 138 + - Meson 139 + 140 + === GNU Make 141 + 142 + - Platform support: ubitquitous on all platforms, but not well-integrated into Windows. 143 + - Auto-detection: no built-in support for auto-detection of features. 144 + - Ease of use: easy to use, but discovering available options is hard. Makefile 145 + rules can quickly get out of hand once reaching a certain scope. 146 + - IDE support: execution of Makefile targets is supported by many IDEs 147 + - Out-of-tree builds: supported in theory, not wired up in practice. 148 + - Cross-platform builds: supported in theory, not wired up in practice. 149 + - Language support: 150 + - C: Limited built-in support, many parts need to be wired up manually. 151 + - Rust: No built-in support, needs to be wired up manually. 152 + - Test integration: partially supported, many parts need to be wired up 153 + manually. 154 + 155 + === autoconf 156 + 157 + - Platform support: ubiquitous on all platforms, but not well-integrated into Windows. 158 + - Auto-detection: supported. 159 + - Ease of use: easy to use, discovering available options is comparatively 160 + easy. The autoconf syntax is prohibitively hard to extend though due to its 161 + complex set of interacting files and the hard-to-understand M4 language. 162 + - IDE support: no integration into IDEs at generation time. The generated 163 + Makefiles have the same level of support as GNU Make. 164 + - Out-of-tree builds: supported in theory, not wired up in practice. 165 + - Cross-platform builds: supported. 166 + - Language support: 167 + - C: Limited built-in support, many parts need to be wired up manually. 168 + - Rust: No built-in support, needs to be wired up manually. 169 + - Test integration: partially supported, many parts need to be wired up 170 + manually. 171 + 172 + === CMake 173 + 174 + - Platform support: not as extensive as GNU Make or autoconf, but all major 175 + platforms are supported. 176 + - AIX 177 + - Cygwin 178 + - FreeBSD 179 + - Linux 180 + - OpenBSD 181 + - Solaris 182 + - Windows 183 + - macOS 184 + - Ease of use: easy to use, discovering available options is not always 185 + trivial. The scripting language used by CMake is somewhat cumbersome to use, 186 + but extending CMake build instructions is doable. 187 + - IDE support: natively integrated into Microsoft Visual Studio. Can generate 188 + project descriptions for Xcode. An extension is available for Visual Studio 189 + Code. Many other IDEs have plugins for CMake. 190 + - Out-of-tree builds: supported. 191 + - Cross-platform builds: supported. 192 + - Language support: 193 + - C: Supported for GCC, Clang, MSVC and other toolchains. 194 + - Rust: No built-in support, needs to be wired up manually. 195 + - Test integration: supported, even though test dependencies are a bit 196 + cumbersome to use via "test fixtures". Interactive test runs are not 197 + supported. 198 + 199 + === Meson 200 + 201 + - Platform: not as extensive as GNU Make or autoconf, but all major platforms 202 + and some smaller ones are supported. 203 + - AIX 204 + - Cygwin 205 + - DragonflyBSD 206 + - FreeBSD 207 + - Haiku 208 + - Linux 209 + - NetBSD 210 + - OpenBSD 211 + - Solaris 212 + - Windows 213 + - macOS 214 + - Ease of use: easy to use, discovering available options is easy. The 215 + scripting language is straight-forward to use. 216 + - IDE support: Supports generating build instructions for Xcode and Microsoft 217 + Visual Studio, a plugin exists for Visual Studio Code. 218 + - Out-of-tree builds: supported. 219 + - Cross-platform builds: supported. 220 + - Language support: 221 + - C: Supported for GCC, Clang, MSVC and other toolchains. 222 + - Rust: Supported for rustc. 223 + - Test integration: supported. Interactive tests are supported starting with 224 + Meson 1.5.0 via the `--interactive` flag.
+47
GIT-BUILD-OPTIONS.in
··· 1 + SHELL_PATH=@SHELL_PATH@ 2 + TEST_SHELL_PATH=@TEST_SHELL_PATH@ 3 + PERL_PATH=@PERL_PATH@ 4 + PERL_LOCALEDIR=@PERL_LOCALEDIR@ 5 + NO_PERL_CPAN_FALLBACKS=@NO_PERL_CPAN_FALLBACKS@ 6 + DIFF=@DIFF@ 7 + PYTHON_PATH=@PYTHON_PATH@ 8 + TAR=@TAR@ 9 + NO_CURL=@NO_CURL@ 10 + NO_ICONV=@NO_ICONV@ 11 + NO_EXPAT=@NO_EXPAT@ 12 + USE_LIBPCRE2=@USE_LIBPCRE2@ 13 + NO_PERL=@NO_PERL@ 14 + NO_PTHREADS=@NO_PTHREADS@ 15 + NO_PYTHON=@NO_PYTHON@ 16 + NO_REGEX=@NO_REGEX@ 17 + NO_UNIX_SOCKETS=@NO_UNIX_SOCKETS@ 18 + PAGER_ENV=@PAGER_ENV@ 19 + SANITIZE_LEAK=@SANITIZE_LEAK@ 20 + SANITIZE_ADDRESS=@SANITIZE_ADDRESS@ 21 + X=@X@ 22 + FSMONITOR_DAEMON_BACKEND=@FSMONITOR_DAEMON_BACKEND@ 23 + FSMONITOR_OS_SETTINGS=@FSMONITOR_OS_SETTINGS@ 24 + TEST_OUTPUT_DIRECTORY=@TEST_OUTPUT_DIRECTORY@ 25 + GIT_TEST_OPTS=@GIT_TEST_OPTS@ 26 + GIT_TEST_CMP=@GIT_TEST_CMP@ 27 + GIT_TEST_CMP_USE_COPIED_CONTEXT=@GIT_TEST_CMP_USE_COPIED_CONTEXT@ 28 + GIT_TEST_UTF8_LOCALE=@GIT_TEST_UTF8_LOCALE@ 29 + NO_GETTEXT=@NO_GETTEXT@ 30 + GIT_PERF_REPEAT_COUNT=@GIT_PERF_REPEAT_COUNT@ 31 + GIT_PERF_REPO=@GIT_PERF_REPO@ 32 + GIT_PERF_LARGE_REPO=@GIT_PERF_LARGE_REPO@ 33 + GIT_PERF_MAKE_OPTS=@GIT_PERF_MAKE_OPTS@ 34 + GIT_PERF_MAKE_COMMAND=@GIT_PERF_MAKE_COMMAND@ 35 + GIT_INTEROP_MAKE_OPTS=@GIT_INTEROP_MAKE_OPTS@ 36 + GIT_TEST_INDEX_VERSION=@GIT_TEST_INDEX_VERSION@ 37 + GIT_TEST_PERL_FATAL_WARNINGS=@GIT_TEST_PERL_FATAL_WARNINGS@ 38 + GIT_TEST_TEXTDOMAINDIR=@GIT_TEST_TEXTDOMAINDIR@ 39 + GIT_TEST_POPATH=@GIT_TEST_POPATH@ 40 + GIT_TEST_TEMPLATE_DIR=@GIT_TEST_TEMPLATE_DIR@ 41 + GIT_TEST_GITPERLLIB=@GIT_TEST_GITPERLLIB@ 42 + GIT_TEST_MERGE_TOOLS_DIR=@GIT_TEST_MERGE_TOOLS_DIR@ 43 + RUNTIME_PREFIX=@RUNTIME_PREFIX@ 44 + GITWEBDIR=@GITWEBDIR@ 45 + USE_GETTEXT_SCHEME=@USE_GETTEXT_SCHEME@ 46 + LOCALEDIR=@LOCALEDIR@ 47 + BROKEN_PATH_FIX=@BROKEN_PATH_FIX@
+1
GIT-VERSION-FILE.in
··· 1 + GIT_VERSION=@GIT_VERSION@
+59 -15
GIT-VERSION-GEN
··· 1 1 #!/bin/sh 2 2 3 - GVF=GIT-VERSION-FILE 4 3 DEF_VER=v2.47.GIT 5 4 6 5 LF=' 7 6 ' 8 7 8 + if test "$#" -ne 3 9 + then 10 + echo >&2 "USAGE: $0 <SOURCE_DIR> <INPUT> <OUTPUT>" 11 + exit 1 12 + fi 13 + 14 + SOURCE_DIR="$1" 15 + INPUT="$2" 16 + OUTPUT="$3" 17 + 18 + if ! test -f "$INPUT" 19 + then 20 + echo >&2 "Input is not a file: $INPUT" 21 + exit 1 22 + fi 23 + 24 + # Protect us from reading Git version information outside of the Git directory 25 + # in case it is not a repository itself, but embedded in an unrelated 26 + # repository. 27 + GIT_CEILING_DIRECTORIES="$SOURCE_DIR/.." 28 + export GIT_CEILING_DIRECTORIES 29 + 9 30 # First see if there is a version file (included in release tarballs), 10 31 # then try git-describe, then default. 11 - if test -f version 32 + if test -f "$SOURCE_DIR"/version 12 33 then 13 - VN=$(cat version) || VN="$DEF_VER" 14 - elif { test -d "${GIT_DIR:-.git}" || test -f .git; } && 15 - VN=$(git describe --match "v[0-9]*" HEAD 2>/dev/null) && 34 + VN=$(cat "$SOURCE_DIR"/version) || VN="$DEF_VER" 35 + elif { 36 + test -d "$SOURCE_DIR/.git" || 37 + test -d "${GIT_DIR:-.git}" || 38 + test -f "$SOURCE_DIR"/.git; 39 + } && 40 + VN=$(git -C "$SOURCE_DIR" describe --match "v[0-9]*" HEAD 2>/dev/null) && 16 41 case "$VN" in 17 42 *$LF*) (exit 1) ;; 18 43 v[0-9]*) 19 - git update-index -q --refresh 20 - test -z "$(git diff-index --name-only HEAD --)" || 44 + git -C "$SOURCE_DIR" update-index -q --refresh 45 + test -z "$(git -C "$SOURCE_DIR" diff-index --name-only HEAD --)" || 21 46 VN="$VN-dirty" ;; 22 47 esac 23 48 then ··· 26 51 VN="$DEF_VER" 27 52 fi 28 53 29 - VN=$(expr "$VN" : v*'\(.*\)') 54 + GIT_VERSION=$(expr "$VN" : v*'\(.*\)') 55 + GIT_BUILT_FROM_COMMIT=$(git -C "$SOURCE_DIR" rev-parse -q --verify HEAD 2>/dev/null) 56 + GIT_DATE=$(git -C "$SOURCE_DIR" show --quiet --format='%as' 2>/dev/null) 57 + if test -z "$GIT_USER_AGENT" 58 + then 59 + GIT_USER_AGENT="git/$GIT_VERSION" 60 + fi 61 + 62 + # While released Git versions only have three numbers, development builds also 63 + # have a fourth number that corresponds to the number of patches since the last 64 + # release. 65 + read GIT_MAJOR_VERSION GIT_MINOR_VERSION GIT_MICRO_VERSION GIT_PATCH_LEVEL trailing <<EOF 66 + $(echo "$GIT_VERSION" 0 0 0 0 | tr '.a-zA-Z-' ' ') 67 + EOF 68 + 69 + sed -e "s|@GIT_VERSION@|$GIT_VERSION|" \ 70 + -e "s|@GIT_MAJOR_VERSION@|$GIT_MAJOR_VERSION|" \ 71 + -e "s|@GIT_MINOR_VERSION@|$GIT_MINOR_VERSION|" \ 72 + -e "s|@GIT_MICRO_VERSION@|$GIT_MICRO_VERSION|" \ 73 + -e "s|@GIT_PATCH_LEVEL@|$GIT_PATCH_LEVEL|" \ 74 + -e "s|@GIT_BUILT_FROM_COMMIT@|$GIT_BUILT_FROM_COMMIT|" \ 75 + -e "s|@GIT_USER_AGENT@|$GIT_USER_AGENT|" \ 76 + -e "s|@GIT_DATE@|$GIT_DATE|" \ 77 + "$INPUT" >"$OUTPUT"+ 30 78 31 - if test -r $GVF 79 + if ! test -f "$OUTPUT" || ! cmp "$OUTPUT"+ "$OUTPUT" >/dev/null 32 80 then 33 - VC=$(sed -e 's/^GIT_VERSION = //' <$GVF) 81 + mv "$OUTPUT"+ "$OUTPUT" 34 82 else 35 - VC=unset 83 + rm "$OUTPUT"+ 36 84 fi 37 - test "$VN" = "$VC" || { 38 - echo >&2 "GIT_VERSION = $VN" 39 - echo "GIT_VERSION = $VN" >$GVF 40 - }
+104 -145
Makefile
··· 592 592 # Disable -pedantic compilation. 593 593 594 594 GIT-VERSION-FILE: FORCE 595 - @$(SHELL_PATH) ./GIT-VERSION-GEN 595 + @OLD=$$(cat $@ 2>/dev/null || :) && \ 596 + $(SHELL_PATH) ./GIT-VERSION-GEN "$(shell pwd)" GIT-VERSION-FILE.in $@ && \ 597 + NEW=$$(cat $@ 2>/dev/null || :) && \ 598 + if test "$$OLD" != "$$NEW"; then echo "$$NEW" >&2; fi 596 599 -include GIT-VERSION-FILE 597 600 598 601 # Set our default configuration. ··· 1555 1558 1556 1559 ifdef SANE_TOOL_PATH 1557 1560 SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH)) 1558 - BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix "$(SANE_TOOL_PATH_SQ)"|' 1561 + BROKEN_PATH_FIX = s|^\# @BROKEN_PATH_FIX@$$|git_broken_path_fix "$(SANE_TOOL_PATH_SQ)"| 1559 1562 PATH := $(SANE_TOOL_PATH):${PATH} 1560 1563 else 1561 - BROKEN_PATH_FIX = '/^\# @@BROKEN_PATH_FIX@@$$/d' 1564 + BROKEN_PATH_FIX = /^\# @BROKEN_PATH_FIX@$$/d 1562 1565 endif 1563 1566 1564 1567 ifeq (,$(HOST_CPU)) ··· 2505 2508 pager.sp pager.s pager.o: EXTRA_CPPFLAGS = \ 2506 2509 -DPAGER_ENV='$(PAGER_ENV_CQ_SQ)' 2507 2510 2508 - version.sp version.s version.o: GIT-VERSION-FILE GIT-USER-AGENT 2509 - version.sp version.s version.o: EXTRA_CPPFLAGS = \ 2510 - '-DGIT_VERSION="$(GIT_VERSION)"' \ 2511 - '-DGIT_USER_AGENT=$(GIT_USER_AGENT_CQ_SQ)' \ 2512 - '-DGIT_BUILT_FROM_COMMIT="$(shell \ 2513 - GIT_CEILING_DIRECTORIES="$(CURDIR)/.." \ 2514 - git rev-parse -q --verify HEAD 2>/dev/null)"' 2511 + version-def.h: version-def.h.in GIT-VERSION-GEN GIT-VERSION-FILE GIT-USER-AGENT 2512 + $(QUIET_GEN)GIT_USER_AGENT="$(GIT_USER_AGENT)" $(SHELL_PATH) ./GIT-VERSION-GEN "$(shell pwd)" $< $@+ 2513 + @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi 2514 + 2515 + version.sp version.s version.o: version-def.h 2515 2516 2516 2517 $(BUILT_INS): git$X 2517 2518 $(QUIET_BUILT_IN)$(RM) $@ && \ ··· 2522 2523 config-list.h: generate-configlist.sh 2523 2524 2524 2525 config-list.h: Documentation/*config.txt Documentation/config/*.txt 2525 - $(QUIET_GEN)$(SHELL_PATH) ./generate-configlist.sh >$@ 2526 + $(QUIET_GEN)$(SHELL_PATH) ./generate-configlist.sh . $@ 2526 2527 2527 2528 command-list.h: generate-cmdlist.sh command-list.txt 2528 2529 2529 2530 command-list.h: $(wildcard Documentation/git*.txt) 2530 2531 $(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh \ 2531 2532 $(patsubst %,--exclude-program %,$(EXCLUDED_PROGRAMS)) \ 2532 - command-list.txt >$@ 2533 + . $@ 2533 2534 2534 2535 hook-list.h: generate-hooklist.sh Documentation/githooks.txt 2535 - $(QUIET_GEN)$(SHELL_PATH) ./generate-hooklist.sh >$@ 2536 + $(QUIET_GEN)$(SHELL_PATH) ./generate-hooklist.sh . $@ 2536 2537 2537 2538 SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):\ 2538 2539 $(localedir_SQ):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\ ··· 2545 2546 echo "$$FLAGS" >$@; \ 2546 2547 fi 2547 2548 2548 - define cmd_munge_script 2549 - sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ 2550 - -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \ 2551 - -e 's|@@DIFF@@|$(DIFF_SQ)|' \ 2552 - -e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' \ 2553 - -e 's/@@USE_GETTEXT_SCHEME@@/$(USE_GETTEXT_SCHEME)/g' \ 2554 - -e $(BROKEN_PATH_FIX) \ 2555 - -e 's|@@GITWEBDIR@@|$(gitwebdir_SQ)|g' \ 2556 - -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \ 2557 - -e 's|@@PAGER_ENV@@|$(PAGER_ENV_SQ)|g' \ 2558 - $@.sh >$@+ 2559 - endef 2560 - 2561 - $(SCRIPT_SH_GEN) : % : %.sh GIT-SCRIPT-DEFINES 2562 - $(QUIET_GEN)$(cmd_munge_script) && \ 2563 - chmod +x $@+ && \ 2549 + $(SCRIPT_SH_GEN) $(SCRIPT_LIB) : % : %.sh generate-script.sh GIT-BUILD-OPTIONS GIT-SCRIPT-DEFINES 2550 + $(QUIET_GEN)./generate-script.sh "$<" "$@+" ./GIT-BUILD-OPTIONS && \ 2564 2551 mv $@+ $@ 2565 2552 2566 - $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES 2567 - $(QUIET_GEN)$(cmd_munge_script) && \ 2568 - mv $@+ $@ 2553 + git.rc: git.rc.in GIT-VERSION-GEN GIT-VERSION-FILE 2554 + $(QUIET_GEN)$(SHELL_PATH) ./GIT-VERSION-GEN "$(shell pwd)" $< $@+ 2555 + @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi 2569 2556 2570 - git.res: git.rc GIT-VERSION-FILE GIT-PREFIX 2571 - $(QUIET_RC)$(RC) \ 2572 - $(join -DMAJOR= -DMINOR= -DMICRO= -DPATCHLEVEL=, $(wordlist 1, 4, \ 2573 - $(shell echo $(GIT_VERSION) 0 0 0 0 | tr '.a-zA-Z-' ' '))) \ 2574 - -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" -i $< -o $@ 2557 + git.res: git.rc GIT-PREFIX 2558 + $(QUIET_RC)$(RC) -i $< -o $@ 2575 2559 2576 2560 # This makes sure we depend on the NO_PERL setting itself. 2577 2561 $(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS ··· 2604 2588 2605 2589 PERL_DEFINES += $(gitexecdir) $(perllibdir) $(localedir) 2606 2590 2607 - $(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE 2608 - $(QUIET_GEN) \ 2609 - sed -e '1{' \ 2610 - -e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \ 2611 - -e ' r GIT-PERL-HEADER' \ 2612 - -e ' G' \ 2613 - -e '}' \ 2614 - -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ 2615 - $< >$@+ && \ 2616 - chmod +x $@+ && \ 2591 + $(SCRIPT_PERL_GEN): % : %.perl generate-perl.sh GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE 2592 + $(QUIET_GEN)$(SHELL_PATH) generate-perl.sh ./GIT-BUILD-OPTIONS ./GIT-VERSION-FILE GIT-PERL-HEADER "$<" "$@+" && \ 2617 2593 mv $@+ $@ 2618 2594 2619 2595 PERL_DEFINES := $(subst $(space),:,$(PERL_DEFINES)) ··· 2629 2605 INSTLIBDIR='$(perllibdir_SQ)' && \ 2630 2606 INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \ 2631 2607 INSTLIBDIR="$$INSTLIBDIR$${INSTLIBDIR_EXTRA:+:$$INSTLIBDIR_EXTRA}" && \ 2632 - sed -e 's=@@PATHSEP@@=$(pathsep)=g' \ 2633 - -e "s=@@INSTLIBDIR@@=$$INSTLIBDIR=g" \ 2634 - -e 's=@@PERLLIBDIR_REL@@=$(perllibdir_relative_SQ)=g' \ 2635 - -e 's=@@GITEXECDIR_REL@@=$(gitexecdir_relative_SQ)=g' \ 2636 - -e 's=@@LOCALEDIR_REL@@=$(localedir_relative_SQ)=g' \ 2608 + sed -e 's=@PATHSEP@=$(pathsep)=g' \ 2609 + -e "s=@INSTLIBDIR@=$$INSTLIBDIR=g" \ 2610 + -e 's=@PERLLIBDIR_REL@=$(perllibdir_relative_SQ)=g' \ 2611 + -e 's=@GITEXECDIR_REL@=$(gitexecdir_relative_SQ)=g' \ 2612 + -e 's=@LOCALEDIR_REL@=$(localedir_relative_SQ)=g' \ 2637 2613 $< >$@+ && \ 2638 2614 mv $@+ $@ 2639 2615 ··· 2641 2617 perllibdir: 2642 2618 @echo '$(perllibdir_SQ)' 2643 2619 2644 - git-instaweb: git-instaweb.sh GIT-SCRIPT-DEFINES 2645 - $(QUIET_GEN)$(cmd_munge_script) && \ 2620 + git-instaweb: git-instaweb.sh generate-script.sh GIT-BUILD-OPTIONS GIT-SCRIPT-DEFINES 2621 + $(QUIET_GEN)./generate-script.sh "$<" "$@+" ./GIT-BUILD-OPTIONS && \ 2646 2622 chmod +x $@+ && \ 2647 2623 mv $@+ $@ 2648 2624 else # NO_PERL 2649 2625 $(SCRIPT_PERL_GEN) git-instaweb: % : unimplemented.sh 2650 2626 $(QUIET_GEN) \ 2651 2627 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ 2652 - -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \ 2628 + -e 's|@REASON@|NO_PERL=$(NO_PERL)|g' \ 2653 2629 unimplemented.sh >$@+ && \ 2654 2630 chmod +x $@+ && \ 2655 2631 mv $@+ $@ ··· 2659 2635 $(SCRIPT_PYTHON_GEN): GIT-BUILD-OPTIONS 2660 2636 2661 2637 ifndef NO_PYTHON 2662 - $(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS 2638 + $(SCRIPT_PYTHON_GEN): generate-python.sh 2663 2639 $(SCRIPT_PYTHON_GEN): % : %.py 2664 - $(QUIET_GEN) \ 2665 - sed -e '1s|#!.*python|#!$(PYTHON_PATH_SQ)|' \ 2666 - $< >$@+ && \ 2667 - chmod +x $@+ && \ 2668 - mv $@+ $@ 2640 + $(QUIET_GEN)$(SHELL_PATH) generate-python.sh ./GIT-BUILD-OPTIONS "$<" "$@" 2669 2641 else # NO_PYTHON 2670 2642 $(SCRIPT_PYTHON_GEN): % : unimplemented.sh 2671 2643 $(QUIET_GEN) \ 2672 2644 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ 2673 - -e 's|@@REASON@@|NO_PYTHON=$(NO_PYTHON)|g' \ 2645 + -e 's|@REASON@|NO_PYTHON=$(NO_PYTHON)|g' \ 2674 2646 unimplemented.sh >$@+ && \ 2675 2647 chmod +x $@+ && \ 2676 2648 mv $@+ $@ 2677 2649 endif # NO_PYTHON 2678 2650 2679 - CONFIGURE_RECIPE = sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ 2651 + CONFIGURE_RECIPE = sed -e 's/@GIT_VERSION@/$(GIT_VERSION)/g' \ 2680 2652 configure.ac >configure.ac+ && \ 2681 2653 autoconf -o configure configure.ac+ && \ 2682 2654 $(RM) configure.ac+ ··· 3102 3074 NO_PERL_CPAN_FALLBACKS_SQ = $(subst ','\'',$(NO_PERL_CPAN_FALLBACKS)) 3103 3075 endif 3104 3076 3105 - perl/build/lib/%.pm: perl/%.pm GIT-PERL-DEFINES 3077 + perl/build/lib/%.pm: perl/%.pm generate-perl.sh GIT-BUILD-OPTIONS GIT-VERSION-FILE GIT-PERL-DEFINES 3106 3078 $(call mkdir_p_parent_template) 3107 - $(QUIET_GEN) \ 3108 - sed -e 's|@@LOCALEDIR@@|$(perl_localedir_SQ)|g' \ 3109 - -e 's|@@NO_GETTEXT@@|$(NO_GETTEXT_SQ)|g' \ 3110 - -e 's|@@NO_PERL_CPAN_FALLBACKS@@|$(NO_PERL_CPAN_FALLBACKS_SQ)|g' \ 3111 - < $< > $@ 3079 + $(QUIET_GEN)$(SHELL_PATH) generate-perl.sh ./GIT-BUILD-OPTIONS ./GIT-VERSION-FILE GIT-PERL-HEADER "$<" "$@" 3112 3080 3113 3081 perl/build/man/man3/Git.3pm: perl/Git.pm 3114 3082 $(call mkdir_p_parent_template) ··· 3161 3129 echo "$$FLAGS" >GIT-LDFLAGS; \ 3162 3130 fi 3163 3131 3132 + ifdef RUNTIME_PREFIX 3133 + RUNTIME_PREFIX_OPTION = true 3134 + else 3135 + RUNTIME_PREFIX_OPTION = false 3136 + endif 3137 + 3164 3138 # We need to apply sq twice, once to protect from the shell 3165 3139 # that runs GIT-BUILD-OPTIONS, and then again to protect it 3166 3140 # and the first level quoting from the shell that runs "echo". 3167 3141 GIT-BUILD-OPTIONS: FORCE 3168 - @echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@+ 3169 - @echo TEST_SHELL_PATH=\''$(subst ','\'',$(TEST_SHELL_PATH_SQ))'\' >>$@+ 3170 - @echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@+ 3171 - @echo DIFF=\''$(subst ','\'',$(subst ','\'',$(DIFF)))'\' >>$@+ 3172 - @echo PYTHON_PATH=\''$(subst ','\'',$(PYTHON_PATH_SQ))'\' >>$@+ 3173 - @echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@+ 3174 - @echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@+ 3175 - @echo NO_ICONV=\''$(subst ','\'',$(subst ','\'',$(NO_ICONV)))'\' >>$@+ 3176 - @echo NO_EXPAT=\''$(subst ','\'',$(subst ','\'',$(NO_EXPAT)))'\' >>$@+ 3177 - @echo USE_LIBPCRE2=\''$(subst ','\'',$(subst ','\'',$(USE_LIBPCRE2)))'\' >>$@+ 3178 - @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@+ 3179 - @echo NO_PTHREADS=\''$(subst ','\'',$(subst ','\'',$(NO_PTHREADS)))'\' >>$@+ 3180 - @echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' >>$@+ 3181 - @echo NO_REGEX=\''$(subst ','\'',$(subst ','\'',$(NO_REGEX)))'\' >>$@+ 3182 - @echo NO_UNIX_SOCKETS=\''$(subst ','\'',$(subst ','\'',$(NO_UNIX_SOCKETS)))'\' >>$@+ 3183 - @echo PAGER_ENV=\''$(subst ','\'',$(subst ','\'',$(PAGER_ENV)))'\' >>$@+ 3184 - @echo SANITIZE_LEAK=\''$(subst ','\'',$(subst ','\'',$(SANITIZE_LEAK)))'\' >>$@+ 3185 - @echo SANITIZE_ADDRESS=\''$(subst ','\'',$(subst ','\'',$(SANITIZE_ADDRESS)))'\' >>$@+ 3186 - @echo X=\'$(X)\' >>$@+ 3187 - ifdef FSMONITOR_DAEMON_BACKEND 3188 - @echo FSMONITOR_DAEMON_BACKEND=\''$(subst ','\'',$(subst ','\'',$(FSMONITOR_DAEMON_BACKEND)))'\' >>$@+ 3189 - endif 3190 - ifdef FSMONITOR_OS_SETTINGS 3191 - @echo FSMONITOR_OS_SETTINGS=\''$(subst ','\'',$(subst ','\'',$(FSMONITOR_OS_SETTINGS)))'\' >>$@+ 3192 - endif 3193 - ifdef TEST_OUTPUT_DIRECTORY 3194 - @echo TEST_OUTPUT_DIRECTORY=\''$(subst ','\'',$(subst ','\'',$(TEST_OUTPUT_DIRECTORY)))'\' >>$@+ 3195 - endif 3196 - ifdef GIT_TEST_OPTS 3197 - @echo GIT_TEST_OPTS=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_OPTS)))'\' >>$@+ 3198 - endif 3199 - ifdef GIT_TEST_CMP 3200 - @echo GIT_TEST_CMP=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_CMP)))'\' >>$@+ 3201 - endif 3202 - ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT 3203 - @echo GIT_TEST_CMP_USE_COPIED_CONTEXT=YesPlease >>$@+ 3204 - endif 3205 - ifdef GIT_TEST_UTF8_LOCALE 3206 - @echo GIT_TEST_UTF8_LOCALE=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_UTF8_LOCALE)))'\' >>$@+ 3207 - endif 3208 - @echo NO_GETTEXT=\''$(subst ','\'',$(subst ','\'',$(NO_GETTEXT)))'\' >>$@+ 3209 - ifdef GIT_PERF_REPEAT_COUNT 3210 - @echo GIT_PERF_REPEAT_COUNT=\''$(subst ','\'',$(subst ','\'',$(GIT_PERF_REPEAT_COUNT)))'\' >>$@+ 3211 - endif 3212 - ifdef GIT_PERF_REPO 3213 - @echo GIT_PERF_REPO=\''$(subst ','\'',$(subst ','\'',$(GIT_PERF_REPO)))'\' >>$@+ 3214 - endif 3215 - ifdef GIT_PERF_LARGE_REPO 3216 - @echo GIT_PERF_LARGE_REPO=\''$(subst ','\'',$(subst ','\'',$(GIT_PERF_LARGE_REPO)))'\' >>$@+ 3217 - endif 3218 - ifdef GIT_PERF_MAKE_OPTS 3219 - @echo GIT_PERF_MAKE_OPTS=\''$(subst ','\'',$(subst ','\'',$(GIT_PERF_MAKE_OPTS)))'\' >>$@+ 3220 - endif 3221 - ifdef GIT_PERF_MAKE_COMMAND 3222 - @echo GIT_PERF_MAKE_COMMAND=\''$(subst ','\'',$(subst ','\'',$(GIT_PERF_MAKE_COMMAND)))'\' >>$@+ 3223 - endif 3224 - ifdef GIT_INTEROP_MAKE_OPTS 3225 - @echo GIT_INTEROP_MAKE_OPTS=\''$(subst ','\'',$(subst ','\'',$(GIT_INTEROP_MAKE_OPTS)))'\' >>$@+ 3226 - endif 3227 - ifdef GIT_TEST_INDEX_VERSION 3228 - @echo GIT_TEST_INDEX_VERSION=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_INDEX_VERSION)))'\' >>$@+ 3229 - endif 3230 - ifdef GIT_TEST_PERL_FATAL_WARNINGS 3231 - @echo GIT_TEST_PERL_FATAL_WARNINGS=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_PERL_FATAL_WARNINGS)))'\' >>$@+ 3232 - endif 3233 - ifdef RUNTIME_PREFIX 3234 - @echo RUNTIME_PREFIX=\'true\' >>$@+ 3235 - else 3236 - @echo RUNTIME_PREFIX=\'false\' >>$@+ 3237 - endif 3142 + @sed \ 3143 + -e "s|@SHELL_PATH@|\'$(SHELL_PATH_SQ)\'|" \ 3144 + -e "s|@TEST_SHELL_PATH@|\'$(TEST_SHELL_PATH_SQ)\'|" \ 3145 + -e "s|@PERL_PATH@|\'$(PERL_PATH_SQ)\'|" \ 3146 + -e "s|@PERL_LOCALEDIR@|\'$(perl_localedir_SQ)\'|" \ 3147 + -e "s|@NO_PERL_CPAN_FALLBACKS@|\'$(NO_PERL_CPAN_FALLBACKS_SQ)\'|" \ 3148 + -e "s|@DIFF@|\'$(DIFF)\'|" \ 3149 + -e "s|@PYTHON_PATH@|\'$(PYTHON_PATH_SQ)\'|" \ 3150 + -e "s|@TAR@|\'$(TAR)\'|" \ 3151 + -e "s|@NO_CURL@|\'$(NO_CURL)\'|" \ 3152 + -e "s|@NO_ICONV@|\'$(NO_ICONV)\'|" \ 3153 + -e "s|@NO_EXPAT@|\'$(NO_EXPAT)\'|" \ 3154 + -e "s|@USE_LIBPCRE2@|\'$(USE_LIBPCRE2)\'|" \ 3155 + -e "s|@NO_PERL@|\'$(NO_PERL)\'|" \ 3156 + -e "s|@NO_PTHREADS@|\'$(NO_PTHREADS)\'|" \ 3157 + -e "s|@NO_PYTHON@|\'$(NO_PYTHON)\'|" \ 3158 + -e "s|@NO_REGEX@|\'$(NO_REGEX)\'|" \ 3159 + -e "s|@NO_UNIX_SOCKETS@|\'$(NO_UNIX_SOCKETS)\'|" \ 3160 + -e "s|@PAGER_ENV@|\'$(PAGER_ENV)\'|" \ 3161 + -e "s|@SANITIZE_LEAK@|\'$(SANITIZE_LEAK)\'|" \ 3162 + -e "s|@SANITIZE_ADDRESS@|\'$(SANITIZE_ADDRESS)\'|" \ 3163 + -e "s|@X@|\'$(X)\'|" \ 3164 + -e "s|@FSMONITOR_DAEMON_BACKEND@|\'$(FSMONITOR_DAEMON_BACKEND)\'|" \ 3165 + -e "s|@FSMONITOR_OS_SETTINGS@|\'$(FSMONITOR_OS_SETTINGS)\'|" \ 3166 + -e "s|@TEST_OUTPUT_DIRECTORY@|\'$(TEST_OUTPUT_DIRECTORY)\'|" \ 3167 + -e "s|@GIT_TEST_OPTS@|\'$(GIT_TEST_OPTS)\'|" \ 3168 + -e "s|@GIT_TEST_CMP@|\'$(GIT_TEST_CMP)\'|" \ 3169 + -e "s|@GIT_TEST_CMP_USE_COPIED_CONTEXT@|\'$(GIT_TEST_CMP_USE_COPIED_CONTEXT)\'|" \ 3170 + -e "s|@GIT_TEST_UTF8_LOCALE@|\'$(GIT_TEST_UTF8_LOCALE)\'|" \ 3171 + -e "s|@NO_GETTEXT@|\'$(NO_GETTEXT)\'|" \ 3172 + -e "s|@GIT_PERF_REPEAT_COUNT@|\'$(GIT_PERF_REPEAT_COUNT)\'|" \ 3173 + -e "s|@GIT_PERF_REPO@|\'$(GIT_PERF_REPO)\'|" \ 3174 + -e "s|@GIT_PERF_LARGE_REPO@|\'$(GIT_PERF_LARGE_REPO)\'|" \ 3175 + -e "s|@GIT_PERF_MAKE_OPTS@|\'$(GIT_PERF_MAKE_OPTS)\'|" \ 3176 + -e "s|@GIT_PERF_MAKE_COMMAND@|\'$(GIT_PERF_MAKE_COMMAND)\'|" \ 3177 + -e "s|@GIT_INTEROP_MAKE_OPTS@|\'$(GIT_INTEROP_MAKE_OPTS)\'|" \ 3178 + -e "s|@GIT_TEST_INDEX_VERSION@|\'$(GIT_TEST_INDEX_VERSION)\'|" \ 3179 + -e "s|@GIT_TEST_PERL_FATAL_WARNINGS@|\'$(GIT_TEST_PERL_FATAL_WARNINGS)\'|" \ 3180 + -e "s|@GIT_TEST_TEXTDOMAINDIR@|\'$(shell pwd)/po/build/locale\'|" \ 3181 + -e "s|@GIT_TEST_POPATH@|\'$(shell pwd)/po\'|" \ 3182 + -e "s|@GIT_TEST_TEMPLATE_DIR@|\'$(shell pwd)/templates/blt\'|" \ 3183 + -e "s|@GIT_TEST_GITPERLLIB@|\'$(shell pwd)/perl/build/lib\'|" \ 3184 + -e "s|@GIT_TEST_MERGE_TOOLS_DIR@|\'$(shell pwd)/mergetools\'|" \ 3185 + -e "s|@RUNTIME_PREFIX@|\'$(RUNTIME_PREFIX_OPTION)\'|" \ 3186 + -e "s|@GITWEBDIR@|\'$(gitwebdir_SQ)\'|" \ 3187 + -e "s|@USE_GETTEXT_SCHEME@|\'$(USE_GETTEXT_SCHEME)\'|" \ 3188 + -e "s|@LOCALEDIR@|\'$(localedir_SQ)\'|" \ 3189 + -e "s!@BROKEN_PATH_FIX@!\'$(BROKEN_PATH_FIX)\'!" \ 3190 + GIT-BUILD-OPTIONS.in >$@+ 3191 + @if grep -q '^[A-Z][A-Z_]*=@.*@$$' $@+; then echo "Unsubstituted build options in $@" >&2 && exit 1; fi 3238 3192 @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi 3239 3193 @if test -f GIT-BUILD-DIR; then rm GIT-BUILD-DIR; fi 3240 3194 ··· 3254 3208 3255 3209 all:: $(TEST_PROGRAMS) $(test_bindir_programs) $(UNIT_TEST_PROGS) $(CLAR_TEST_PROG) 3256 3210 3257 - bin-wrappers/%: wrap-for-bin.sh 3258 - $(call mkdir_p_parent_template) 3211 + $(test_bindir_programs): bin-wrappers/%: bin-wrappers/wrap-for-bin.sh 3259 3212 $(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ 3260 - -e 's|@@BUILD_DIR@@|$(shell pwd)|' \ 3261 - -e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%,$(@F))$(if $(filter-out $(BINDIR_PROGRAMS_NO_X),$(@F)),$(X),)|' < $< > $@ && \ 3213 + -e 's|@BUILD_DIR@|$(shell pwd)|' \ 3214 + -e 's|@GIT_TEXTDOMAINDIR@|$(shell pwd)/po/build/locale|' \ 3215 + -e 's|@GITPERLLIB@|$(shell pwd)/perl/build/lib|' \ 3216 + -e 's|@MERGE_TOOLS_DIR@|$(shell pwd)/mergetools|' \ 3217 + -e 's|@TEMPLATE_DIR@|$(shell pwd)/templates/blt|' \ 3218 + -e 's|@PROG@|$(shell pwd)/$(patsubst test-%,t/helper/test-%,$(@F))$(if $(filter-out $(BINDIR_PROGRAMS_NO_X),$(@F)),$(X),)|' < $< > $@ && \ 3262 3219 chmod +x $@ 3263 3220 3264 3221 # GNU make supports exporting all variables by "export" without parameters. ··· 3742 3699 $(RM) -r .build $(UNIT_TEST_BIN) 3743 3700 $(RM) GIT-TEST-SUITES 3744 3701 $(RM) po/git.pot po/git-core.pot 3745 - $(RM) git.res 3702 + $(RM) git.rc git.res 3746 3703 $(RM) $(OBJECTS) 3747 3704 $(RM) headless-git.o 3748 3705 $(RM) $(LIB_FILE) $(XDIFF_LIB) $(REFTABLE_LIB) ··· 3751 3708 $(RM) $(FUZZ_PROGRAMS) 3752 3709 $(RM) $(SP_OBJ) 3753 3710 $(RM) $(HCC) 3754 - $(RM) -r bin-wrappers $(dep_dirs) $(compdb_dir) compile_commands.json 3711 + $(RM) version-def.h 3712 + $(RM) -r $(dep_dirs) $(compdb_dir) compile_commands.json 3713 + $(RM) $(test_bindir_programs) 3755 3714 $(RM) -r po/build/ 3756 3715 $(RM) *.pyc *.pyo */*.pyc */*.pyo $(GENERATED_H) $(ETAGS_TARGET) tags cscope* 3757 3716 $(RM) -r .dist-tmp-dir .doc-tmp-dir
+9
bin-wrappers/.gitignore
··· 1 + /git 2 + /git-cvsserver 3 + /git-receive-pack 4 + /git-shell 5 + /git-upload-archive 6 + /git-upload-pack 7 + /scalar 8 + /test-fake-ssh 9 + /test-tool
+28
bin-wrappers/meson.build
··· 1 + bin_wrappers_config = configuration_data() 2 + foreach key, value : { 3 + 'BUILD_DIR': meson.project_build_root(), 4 + 'MERGE_TOOLS_DIR': meson.project_source_root() / 'mergetools', 5 + 'TEMPLATE_DIR': meson.project_build_root() / 'templates', 6 + 'GIT_TEXTDOMAINDIR': meson.project_build_root() / 'po', 7 + 'GITPERLLIB': meson.project_build_root() / 'perl/lib', 8 + } 9 + # Paths need to be Unix-style without drive prefixes as they get added to the 10 + # PATH variable. And given that drive prefixes contain a colon we'd otherwise 11 + # end up with a broken PATH if we didn't convert them. 12 + if cygpath.found() 13 + value = run_command(cygpath, value, check: true).stdout().strip() 14 + endif 15 + bin_wrappers_config.set(key, value) 16 + endforeach 17 + 18 + foreach executable : bin_wrappers 19 + executable_config = configuration_data() 20 + executable_config.merge_from(bin_wrappers_config) 21 + executable_config.set('PROG', executable.full_path()) 22 + 23 + configure_file( 24 + input: 'wrap-for-bin.sh', 25 + output: fs.stem(executable.full_path()), 26 + configuration: executable_config, 27 + ) 28 + endforeach
+37
bin-wrappers/wrap-for-bin.sh
··· 1 + #!/bin/sh 2 + 3 + # wrap-for-bin.sh: Template for git executable wrapper scripts 4 + # to run test suite against sandbox, but with only bindir-installed 5 + # executables in PATH. The Makefile copies this into various 6 + # files in bin-wrappers, substituting 7 + # @BUILD_DIR@, @TEMPLATE_DIR@ and @PROG@. 8 + 9 + GIT_EXEC_PATH='@BUILD_DIR@' 10 + if test -n "$NO_SET_GIT_TEMPLATE_DIR" 11 + then 12 + unset GIT_TEMPLATE_DIR 13 + else 14 + GIT_TEMPLATE_DIR='@TEMPLATE_DIR@' 15 + export GIT_TEMPLATE_DIR 16 + fi 17 + MERGE_TOOLS_DIR='@MERGE_TOOLS_DIR@' 18 + GITPERLLIB='@GITPERLLIB@'"${GITPERLLIB:+:$GITPERLLIB}" 19 + GIT_TEXTDOMAINDIR='@GIT_TEXTDOMAINDIR@' 20 + PATH='@BUILD_DIR@/bin-wrappers:'"$PATH" 21 + 22 + export MERGE_TOOLS_DIR GIT_EXEC_PATH GITPERLLIB PATH GIT_TEXTDOMAINDIR 23 + 24 + case "$GIT_DEBUGGER" in 25 + '') 26 + exec "@PROG@" "$@" 27 + ;; 28 + 1) 29 + unset GIT_DEBUGGER 30 + exec gdb --args "@PROG@" "$@" 31 + ;; 32 + *) 33 + GIT_DEBUGGER_ARGS="$GIT_DEBUGGER" 34 + unset GIT_DEBUGGER 35 + exec ${GIT_DEBUGGER_ARGS} "@PROG@" "$@" 36 + ;; 37 + esac
+1 -1
ci/test-documentation.sh
··· 6 6 . ${0%/*}/lib.sh 7 7 8 8 filter_log () { 9 - sed -e '/^GIT_VERSION = /d' \ 9 + sed -e '/^GIT_VERSION=/d' \ 10 10 -e "/constant Gem::ConfigMap is deprecated/d" \ 11 11 -e '/^ \* new asciidoc flags$/d' \ 12 12 -e '/stripped namespace before processing/d' \
+1 -1
configure.ac
··· 142 142 ## Configure body starts here. 143 143 144 144 AC_PREREQ(2.59) 145 - AC_INIT([git], [@@GIT_VERSION@@], [git@vger.kernel.org]) 145 + AC_INIT([git], [@GIT_VERSION@], [git@vger.kernel.org]) 146 146 147 147 AC_CONFIG_SRCDIR([git.c]) 148 148
+175 -119
contrib/buildsystems/CMakeLists.txt
··· 83 83 "On Windows, you can get it as part of 'Git for Windows' install at https://gitforwindows.org/") 84 84 endif() 85 85 86 - #Create GIT-VERSION-FILE using GIT-VERSION-GEN 87 - if(NOT EXISTS ${CMAKE_SOURCE_DIR}/GIT-VERSION-FILE) 88 - message("Generating GIT-VERSION-FILE") 89 - execute_process(COMMAND ${SH_EXE} ${CMAKE_SOURCE_DIR}/GIT-VERSION-GEN 90 - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) 91 - endif() 92 - 93 - #Parse GIT-VERSION-FILE to get the version 94 - file(STRINGS ${CMAKE_SOURCE_DIR}/GIT-VERSION-FILE git_version REGEX "GIT_VERSION = (.*)") 95 - string(REPLACE "GIT_VERSION = " "" git_version ${git_version}) 96 - string(FIND ${git_version} "GIT" location) 97 - if(location EQUAL -1) 98 - string(REGEX MATCH "[0-9]*\\.[0-9]*\\.[0-9]*" git_version ${git_version}) 99 - else() 100 - string(REGEX MATCH "[0-9]*\\.[0-9]*" git_version ${git_version}) 101 - string(APPEND git_version ".0") #for building from a snapshot 102 - endif() 86 + message("Generating Git version") 87 + execute_process(COMMAND ${SH_EXE} "${CMAKE_SOURCE_DIR}/GIT-VERSION-GEN" 88 + "${CMAKE_SOURCE_DIR}" 89 + "${CMAKE_SOURCE_DIR}/contrib/buildsystems/git-version.in" 90 + "${CMAKE_BINARY_DIR}/git-version") 91 + file(STRINGS "${CMAKE_BINARY_DIR}/git-version" git_version) 103 92 104 93 project(git 105 94 VERSION ${git_version} ··· 110 99 #TODO Enable NLS on windows natively 111 100 112 101 #macros for parsing the Makefile for sources and scripts 113 - macro(parse_makefile_for_sources list_var regex) 114 - file(STRINGS ${CMAKE_SOURCE_DIR}/Makefile ${list_var} REGEX "^${regex} \\+=(.*)") 102 + macro(parse_makefile_for_sources list_var makefile regex) 103 + file(STRINGS ${makefile} ${list_var} REGEX "^${regex} \\+=(.*)") 115 104 string(REPLACE "${regex} +=" "" ${list_var} ${${list_var}}) 116 105 string(REPLACE "$(COMPAT_OBJS)" "" ${list_var} ${${list_var}}) #remove "$(COMPAT_OBJS)" This is only for libgit. 117 106 string(STRIP ${${list_var}} ${list_var}) #remove trailing/leading whitespaces ··· 240 229 GIT_HTML_PATH="share/doc/git-doc" 241 230 DEFAULT_HELP_FORMAT="html" 242 231 DEFAULT_GIT_TEMPLATE_DIR="share/git-core/templates" 243 - GIT_VERSION="${PROJECT_VERSION}.GIT" 244 - GIT_USER_AGENT="git/${PROJECT_VERSION}.GIT" 245 - BINDIR="bin" 246 - GIT_BUILT_FROM_COMMIT="") 232 + BINDIR="bin") 247 233 248 234 if(WIN32) 249 235 set(FALLBACK_RUNTIME_PREFIX /mingw64) ··· 652 638 if(NOT EXISTS ${CMAKE_BINARY_DIR}/command-list.h OR NOT EXCLUSION_PROGS_CACHE STREQUAL EXCLUSION_PROGS) 653 639 list(REMOVE_ITEM EXCLUSION_PROGS empty) 654 640 message("Generating command-list.h") 655 - execute_process(COMMAND ${SH_EXE} ${CMAKE_SOURCE_DIR}/generate-cmdlist.sh ${EXCLUSION_PROGS} command-list.txt 656 - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 657 - OUTPUT_FILE ${CMAKE_BINARY_DIR}/command-list.h) 641 + execute_process(COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/generate-cmdlist.sh" 642 + ${EXCLUSION_PROGS} 643 + "${CMAKE_SOURCE_DIR}" 644 + "${CMAKE_BINARY_DIR}/command-list.h") 658 645 endif() 659 646 660 647 if(NOT EXISTS ${CMAKE_BINARY_DIR}/config-list.h) 661 648 message("Generating config-list.h") 662 - execute_process(COMMAND ${SH_EXE} ${CMAKE_SOURCE_DIR}/generate-configlist.sh 663 - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 664 - OUTPUT_FILE ${CMAKE_BINARY_DIR}/config-list.h) 649 + execute_process(COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/generate-configlist.sh" 650 + "${CMAKE_SOURCE_DIR}" 651 + "${CMAKE_BINARY_DIR}/config-list.h") 665 652 endif() 666 653 667 654 if(NOT EXISTS ${CMAKE_BINARY_DIR}/hook-list.h) 668 655 message("Generating hook-list.h") 669 - execute_process(COMMAND ${SH_EXE} ${CMAKE_SOURCE_DIR}/generate-hooklist.sh 670 - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 671 - OUTPUT_FILE ${CMAKE_BINARY_DIR}/hook-list.h) 656 + execute_process(COMMAND "${SH_EXE}" ${CMAKE_SOURCE_DIR}/generate-hooklist.sh 657 + "${CMAKE_SOURCE_DIR}" 658 + "${CMAKE_BINARY_DIR}/hook-list.h") 672 659 endif() 673 660 674 661 include_directories(${CMAKE_BINARY_DIR}) 675 662 676 663 #build 677 664 #libgit 678 - parse_makefile_for_sources(libgit_SOURCES "LIB_OBJS") 665 + parse_makefile_for_sources(libgit_SOURCES ${CMAKE_SOURCE_DIR}/Makefile "LIB_OBJS") 679 666 680 667 list(TRANSFORM libgit_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/") 681 668 list(TRANSFORM compat_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/") 669 + 670 + add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/version-def.h" 671 + COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/GIT-VERSION-GEN" 672 + "${CMAKE_SOURCE_DIR}" 673 + "${CMAKE_SOURCE_DIR}/version-def.h.in" 674 + "${CMAKE_BINARY_DIR}/version-def.h" 675 + DEPENDS "${SH_EXE}" "${CMAKE_SOURCE_DIR}/GIT-VERSION-GEN" 676 + "${CMAKE_SOURCE_DIR}/version-def.h.in" 677 + VERBATIM) 678 + list(APPEND libgit_SOURCES "${CMAKE_BINARY_DIR}/version-def.h") 679 + 682 680 add_library(libgit ${libgit_SOURCES} ${compat_SOURCES}) 683 681 684 682 #libxdiff 685 - parse_makefile_for_sources(libxdiff_SOURCES "XDIFF_OBJS") 683 + parse_makefile_for_sources(libxdiff_SOURCES ${CMAKE_SOURCE_DIR}/Makefile "XDIFF_OBJS") 686 684 687 685 list(TRANSFORM libxdiff_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/") 688 686 add_library(xdiff STATIC ${libxdiff_SOURCES}) 689 687 690 688 #reftable 691 - parse_makefile_for_sources(reftable_SOURCES "REFTABLE_OBJS") 689 + parse_makefile_for_sources(reftable_SOURCES ${CMAKE_SOURCE_DIR}/Makefile "REFTABLE_OBJS") 692 690 693 691 list(TRANSFORM reftable_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/") 694 692 add_library(reftable STATIC ${reftable_SOURCES}) 695 693 696 694 if(WIN32) 695 + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git.rc 696 + COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/GIT-VERSION-GEN" 697 + "${CMAKE_SOURCE_DIR}" 698 + "${CMAKE_SOURCE_DIR}/git.rc.in" 699 + "${CMAKE_BINARY_DIR}/git.rc" 700 + DEPENDS "${CMAKE_SOURCE_DIR}/GIT-VERSION-GEN" 701 + "${CMAKE_SOURCE_DIR}/git.rc.in" 702 + VERBATIM) 703 + 697 704 if(NOT MSVC)#use windres when compiling with gcc and clang 698 705 add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git.res 699 - COMMAND ${WINDRES_EXE} -O coff -DMAJOR=${PROJECT_VERSION_MAJOR} -DMINOR=${PROJECT_VERSION_MINOR} 700 - -DMICRO=${PROJECT_VERSION_PATCH} -DPATCHLEVEL=0 -DGIT_VERSION="\\\"${PROJECT_VERSION}.GIT\\\"" 701 - -i ${CMAKE_SOURCE_DIR}/git.rc -o ${CMAKE_BINARY_DIR}/git.res 706 + COMMAND ${WINDRES_EXE} -O coff -i ${CMAKE_BINARY_DIR}/git.rc -o ${CMAKE_BINARY_DIR}/git.res 707 + DEPENDS "${CMAKE_BINARY_DIR}/git.rc" 702 708 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 703 709 VERBATIM) 704 710 else()#MSVC use rc 705 711 add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git.res 706 - COMMAND ${CMAKE_RC_COMPILER} /d MAJOR=${PROJECT_VERSION_MAJOR} /d MINOR=${PROJECT_VERSION_MINOR} 707 - /d MICRO=${PROJECT_VERSION_PATCH} /d PATCHLEVEL=0 /d GIT_VERSION="${PROJECT_VERSION}.GIT" 708 - /fo ${CMAKE_BINARY_DIR}/git.res ${CMAKE_SOURCE_DIR}/git.rc 712 + COMMAND ${CMAKE_RC_COMPILER} /fo ${CMAKE_BINARY_DIR}/git.res ${CMAKE_BINARY_DIR}/git.rc 713 + DEPENDS "${CMAKE_BINARY_DIR}/git.rc" 709 714 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 710 715 VERBATIM) 711 716 endif() ··· 752 757 endif() 753 758 754 759 #git 755 - parse_makefile_for_sources(git_SOURCES "BUILTIN_OBJS") 760 + parse_makefile_for_sources(git_SOURCES ${CMAKE_SOURCE_DIR}/Makefile "BUILTIN_OBJS") 756 761 757 762 list(TRANSFORM git_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/") 758 763 add_executable(git ${CMAKE_SOURCE_DIR}/git.c ${git_SOURCES}) ··· 834 839 ${git_sh_scripts} ${git_shlib_scripts} git-instaweb) 835 840 836 841 foreach(script ${git_shell_scripts}) 837 - file(STRINGS ${CMAKE_SOURCE_DIR}/${script}.sh content NEWLINE_CONSUME) 838 - string(REPLACE "@SHELL_PATH@" "${SHELL_PATH}" content "${content}") 839 - string(REPLACE "@@DIFF@@" "diff" content "${content}") 840 - string(REPLACE "@LOCALEDIR@" "${LOCALEDIR}" content "${content}") 841 - string(REPLACE "@GITWEBDIR@" "${GITWEBDIR}" content "${content}") 842 - string(REPLACE "@@NO_CURL@@" "" content "${content}") 843 - string(REPLACE "@@USE_GETTEXT_SCHEME@@" "" content "${content}") 844 - string(REPLACE "# @@BROKEN_PATH_FIX@@" "" content "${content}") 845 - string(REPLACE "@@PERL@@" "${PERL_PATH}" content "${content}") 846 - string(REPLACE "@@PAGER_ENV@@" "LESS=FRX LV=-c" content "${content}") 847 - file(WRITE ${CMAKE_BINARY_DIR}/${script} ${content}) 842 + if ("${script}" IN_LIST git_sh_scripts) 843 + string(REPLACE ".sh" "" shell_gen_path "${script}") 844 + else() 845 + set(shell_gen_path "${script}") 846 + endif() 847 + 848 + add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/${shell_gen_path}" 849 + COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/generate-script.sh" 850 + "${CMAKE_SOURCE_DIR}/${script}.sh" 851 + "${CMAKE_BINARY_DIR}/${shell_gen_path}" 852 + "${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS" 853 + DEPENDS "${CMAKE_SOURCE_DIR}/generate-script.sh" 854 + "${CMAKE_SOURCE_DIR}/${script}.sh" 855 + VERBATIM) 856 + list(APPEND shell_gen ${CMAKE_BINARY_DIR}/${shell_gen_path}) 848 857 endforeach() 858 + add_custom_target(shell-gen ALL DEPENDS ${shell_gen}) 849 859 850 860 #perl scripts 851 - parse_makefile_for_scripts(git_perl_scripts "SCRIPT_PERL" ".perl") 861 + parse_makefile_for_scripts(git_perl_scripts "SCRIPT_PERL" "") 862 + #perl modules 863 + file(GLOB_RECURSE perl_modules "${CMAKE_SOURCE_DIR}/perl/*.pm") 864 + list(TRANSFORM perl_modules REPLACE "${CMAKE_SOURCE_DIR}/" "") 852 865 853 866 #create perl header 854 867 file(STRINGS ${CMAKE_SOURCE_DIR}/perl/header_templates/fixed_prefix.template.pl perl_header ) 855 - string(REPLACE "@@PATHSEP@@" ":" perl_header "${perl_header}") 856 - string(REPLACE "@@INSTLIBDIR@@" "${INSTLIBDIR}" perl_header "${perl_header}") 868 + string(REPLACE "@PATHSEP@" ":" perl_header "${perl_header}") 869 + string(REPLACE "@INSTLIBDIR@" "${INSTLIBDIR}" perl_header "${perl_header}") 870 + file(WRITE ${CMAKE_BINARY_DIR}/PERL-HEADER ${perl_header}) 857 871 858 - foreach(script ${git_perl_scripts}) 859 - file(STRINGS ${CMAKE_SOURCE_DIR}/${script}.perl content NEWLINE_CONSUME) 860 - string(REPLACE "#!/usr/bin/perl" "#!/usr/bin/perl\n${perl_header}\n" content "${content}") 861 - string(REPLACE "@@GIT_VERSION@@" "${PROJECT_VERSION}" content "${content}") 862 - file(WRITE ${CMAKE_BINARY_DIR}/${script} ${content}) 863 - endforeach() 872 + add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/GIT-VERSION-FILE" 873 + COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/GIT-VERSION-GEN" 874 + "${CMAKE_SOURCE_DIR}" 875 + "${CMAKE_SOURCE_DIR}/GIT-VERSION-FILE.in" 876 + "${CMAKE_BINARY_DIR}/GIT-VERSION-FILE" 877 + DEPENDS ${SH_EXE} "${CMAKE_SOURCE_DIR}/GIT-VERSION-GEN" 878 + "${CMAKE_SOURCE_DIR}/GIT-VERSION-FILE.in" 879 + VERBATIM) 864 880 865 - #python script 866 - file(STRINGS ${CMAKE_SOURCE_DIR}/git-p4.py content NEWLINE_CONSUME) 867 - string(REPLACE "#!/usr/bin/env python" "#!/usr/bin/python" content "${content}") 868 - file(WRITE ${CMAKE_BINARY_DIR}/git-p4 ${content}) 881 + foreach(script ${git_perl_scripts} ${perl_modules}) 882 + string(REPLACE ".perl" "" perl_gen_path "${script}") 869 883 870 - #perl modules 871 - file(GLOB_RECURSE perl_modules "${CMAKE_SOURCE_DIR}/perl/*.pm") 884 + get_filename_component(perl_gen_dir "${perl_gen_path}" DIRECTORY) 885 + file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${perl_gen_dir}") 872 886 873 - foreach(pm ${perl_modules}) 874 - string(REPLACE "${CMAKE_SOURCE_DIR}/perl/" "" file_path ${pm}) 875 - file(STRINGS ${pm} content NEWLINE_CONSUME) 876 - string(REPLACE "@@LOCALEDIR@@" "${LOCALEDIR}" content "${content}") 877 - string(REPLACE "@@NO_PERL_CPAN_FALLBACKS@@" "" content "${content}") 878 - file(WRITE ${CMAKE_BINARY_DIR}/perl/build/lib/${file_path} ${content}) 879 - #test-lib.sh requires perl/build/lib to be the build directory of perl modules 887 + add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/${perl_gen_path}" 888 + COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/generate-perl.sh" 889 + "${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS" 890 + "${CMAKE_BINARY_DIR}/GIT-VERSION-FILE" 891 + "${CMAKE_BINARY_DIR}/PERL-HEADER" 892 + "${CMAKE_SOURCE_DIR}/${script}" 893 + "${CMAKE_BINARY_DIR}/${perl_gen_path}" 894 + DEPENDS "${CMAKE_SOURCE_DIR}/generate-perl.sh" 895 + "${CMAKE_SOURCE_DIR}/${script}" 896 + "${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS" 897 + "${CMAKE_BINARY_DIR}/GIT-VERSION-FILE" 898 + VERBATIM) 899 + list(APPEND perl_gen ${CMAKE_BINARY_DIR}/${perl_gen_path}) 880 900 endforeach() 881 - 882 - 883 - #templates 884 - file(GLOB templates "${CMAKE_SOURCE_DIR}/templates/*") 885 - list(TRANSFORM templates REPLACE "${CMAKE_SOURCE_DIR}/templates/" "") 886 - list(REMOVE_ITEM templates ".gitignore") 887 - list(REMOVE_ITEM templates "Makefile") 888 - list(REMOVE_ITEM templates "blt")# Prevents an error when reconfiguring for in source builds 901 + add_custom_target(perl-gen ALL DEPENDS ${perl_gen}) 889 902 890 - list(REMOVE_ITEM templates "branches--") 891 - file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/templates/blt/branches) #create branches 903 + # Python script 904 + add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/git-p4" 905 + COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/generate-python.sh" 906 + "${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS" 907 + "${CMAKE_SOURCE_DIR}/git-p4.py" 908 + "${CMAKE_BINARY_DIR}/git-p4" 909 + DEPENDS "${CMAKE_SOURCE_DIR}/generate-python.sh" 910 + "${CMAKE_SOURCE_DIR}/git-p4.py" 911 + "${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS" 912 + VERBATIM) 913 + add_custom_target(python-gen ALL DEPENDS "${CMAKE_BINARY_DIR}/git-p4") 892 914 915 + #${CMAKE_SOURCE_DIR}/Makefile templates 916 + parse_makefile_for_sources(templates ${CMAKE_SOURCE_DIR}/templates/Makefile "TEMPLATES") 917 + string(REPLACE " " ";" templates ${templates}) 893 918 #templates have @.*@ replacement so use configure_file instead 894 919 foreach(tm ${templates}) 895 - string(REPLACE "--" "/" blt_tm ${tm}) 896 - string(REPLACE "this" "" blt_tm ${blt_tm})# for this-- 897 - configure_file(${CMAKE_SOURCE_DIR}/templates/${tm} ${CMAKE_BINARY_DIR}/templates/blt/${blt_tm} @ONLY) 920 + configure_file(${CMAKE_SOURCE_DIR}/templates/${tm} ${CMAKE_BINARY_DIR}/templates/blt/${tm} @ONLY) 898 921 endforeach() 899 - 900 922 901 923 #translations 902 924 if(MSGFMT_EXE) ··· 971 993 target_link_libraries(test-fake-ssh common-main) 972 994 973 995 #unit-tests 974 - parse_makefile_for_sources(unit-test_SOURCES "UNIT_TEST_OBJS") 996 + parse_makefile_for_sources(unit-test_SOURCES ${CMAKE_SOURCE_DIR}/Makefile "UNIT_TEST_OBJS") 975 997 list(TRANSFORM unit-test_SOURCES REPLACE "\\$\\(UNIT_TEST_DIR\\)/" "${CMAKE_SOURCE_DIR}/t/unit-tests/") 976 998 add_library(unit-test-lib STATIC ${unit-test_SOURCES}) 977 999 ··· 1037 1059 endif() 1038 1060 1039 1061 #test-tool 1040 - parse_makefile_for_sources(test-tool_SOURCES "TEST_BUILTINS_OBJS") 1062 + parse_makefile_for_sources(test-tool_SOURCES ${CMAKE_SOURCE_DIR}/Makefile "TEST_BUILTINS_OBJS") 1041 1063 add_library(test-lib OBJECT ${CMAKE_SOURCE_DIR}/t/unit-tests/test-lib.c) 1042 1064 1043 1065 list(TRANSFORM test-tool_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/t/helper/") ··· 1063 1085 1064 1086 1065 1087 foreach(script ${wrapper_scripts}) 1066 - file(STRINGS ${CMAKE_SOURCE_DIR}/wrap-for-bin.sh content NEWLINE_CONSUME) 1067 - string(REPLACE "@@BUILD_DIR@@" "${CMAKE_BINARY_DIR}" content "${content}") 1068 - string(REPLACE "@@PROG@@" "${script}${EXE_EXTENSION}" content "${content}") 1088 + file(STRINGS ${CMAKE_SOURCE_DIR}/bin-wrappers/wrap-for-bin.sh content NEWLINE_CONSUME) 1089 + string(REPLACE "@BUILD_DIR@" "${CMAKE_BINARY_DIR}" content "${content}") 1090 + string(REPLACE "@PROG@" "${CMAKE_BINARY_DIR}/${script}${EXE_EXTENSION}" content "${content}") 1069 1091 file(WRITE ${CMAKE_BINARY_DIR}/bin-wrappers/${script} ${content}) 1070 1092 endforeach() 1071 1093 1072 1094 foreach(script ${wrapper_test_scripts}) 1073 - file(STRINGS ${CMAKE_SOURCE_DIR}/wrap-for-bin.sh content NEWLINE_CONSUME) 1074 - string(REPLACE "@@BUILD_DIR@@" "${CMAKE_BINARY_DIR}" content "${content}") 1075 - string(REPLACE "@@PROG@@" "t/helper/${script}${EXE_EXTENSION}" content "${content}") 1095 + file(STRINGS ${CMAKE_SOURCE_DIR}/bin-wrappers/wrap-for-bin.sh content NEWLINE_CONSUME) 1096 + string(REPLACE "@BUILD_DIR@" "${CMAKE_BINARY_DIR}" content "${content}") 1097 + string(REPLACE "@PROG@" "${CMAKE_BINARY_DIR}/t/helper/${script}${EXE_EXTENSION}" content "${content}") 1076 1098 file(WRITE ${CMAKE_BINARY_DIR}/bin-wrappers/${script} ${content}) 1077 1099 endforeach() 1078 1100 1079 - file(STRINGS ${CMAKE_SOURCE_DIR}/wrap-for-bin.sh content NEWLINE_CONSUME) 1080 - string(REPLACE "@@BUILD_DIR@@" "${CMAKE_BINARY_DIR}" content "${content}") 1081 - string(REPLACE "@@PROG@@" "git-cvsserver" content "${content}") 1101 + file(STRINGS ${CMAKE_SOURCE_DIR}/bin-wrappers/wrap-for-bin.sh content NEWLINE_CONSUME) 1102 + string(REPLACE "@BUILD_DIR@" "${CMAKE_BINARY_DIR}" content "${content}") 1103 + string(REPLACE "@GIT_TEXTDOMAINDIR@" "${CMAKE_BINARY_DIR}/po/build/locale" content "${content}") 1104 + string(REPLACE "@GITPERLLIB@" "${CMAKE_BINARY_DIR}/perl/build/lib" content "${content}") 1105 + string(REPLACE "@MERGE_TOOLS_DIR@" "${CMAKE_SOURCE_DIR}/mergetools" content "${content}") 1106 + string(REPLACE "@PROG@" "${CMAKE_BINARY_DIR}/git-cvsserver" content "${content}") 1082 1107 file(WRITE ${CMAKE_BINARY_DIR}/bin-wrappers/git-cvsserver ${content}) 1083 1108 1084 1109 #options for configuring test options ··· 1125 1150 set(NO_PYTHON 1) 1126 1151 endif() 1127 1152 1128 - file(WRITE ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "SHELL_PATH='${SHELL_PATH}'\n") 1129 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "TEST_SHELL_PATH='${TEST_SHELL_PATH}'\n") 1130 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "PERL_PATH='${PERL_PATH}'\n") 1131 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "DIFF='${DIFF}'\n") 1132 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "PYTHON_PATH='${PYTHON_PATH}'\n") 1133 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "TAR='${TAR}'\n") 1134 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "NO_CURL='${NO_CURL}'\n") 1135 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "NO_ICONV='${NO_ICONV}'\n") 1136 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "NO_EXPAT='${NO_EXPAT}'\n") 1137 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "NO_PERL='${NO_PERL}'\n") 1138 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "NO_PTHREADS='${NO_PTHREADS}'\n") 1139 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "NO_UNIX_SOCKETS='${NO_UNIX_SOCKETS}'\n") 1140 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "PAGER_ENV='${PAGER_ENV}'\n") 1141 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "X='${EXE_EXTENSION}'\n") 1142 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "NO_GETTEXT='${NO_GETTEXT}'\n") 1143 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "RUNTIME_PREFIX='${RUNTIME_PREFIX}'\n") 1144 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "NO_PYTHON='${NO_PYTHON}'\n") 1145 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "SUPPORTS_SIMPLE_IPC='${SUPPORTS_SIMPLE_IPC}'\n") 1153 + file(STRINGS ${CMAKE_SOURCE_DIR}/GIT-BUILD-OPTIONS.in git_build_options NEWLINE_CONSUME) 1154 + string(REPLACE "@SHELL_PATH@" "'${SHELL_PATH}'" git_build_options "${git_build_options}") 1155 + string(REPLACE "@TEST_SHELL_PATH@" "'${TEST_SHELL_PATH}'" git_build_options "${git_build_options}") 1156 + string(REPLACE "@PERL_PATH@" "'${PERL_PATH}'" git_build_options "${git_build_options}") 1157 + string(REPLACE "@PERL_LOCALEDIR@" "'${LOCALEDIR}'" git_build_options "${git_build_options}") 1158 + string(REPLACE "@NO_PERL_CPAN_FALLBACKS@" "" git_build_options "${git_build_options}") 1159 + string(REPLACE "@DIFF@" "'${DIFF}'" git_build_options "${git_build_options}") 1160 + string(REPLACE "@PYTHON_PATH@" "'${PYTHON_PATH}'" git_build_options "${git_build_options}") 1161 + string(REPLACE "@TAR@" "'${TAR}'" git_build_options "${git_build_options}") 1162 + string(REPLACE "@NO_CURL@" "${NO_CURL}" git_build_options "${git_build_options}") 1163 + string(REPLACE "@NO_ICONV@" "${NO_ICONV}" git_build_options "${git_build_options}") 1164 + string(REPLACE "@NO_EXPAT@" "${NO_EXPAT}" git_build_options "${git_build_options}") 1165 + string(REPLACE "@USE_LIBPCRE2@" "" git_build_options "${git_build_options}") 1166 + string(REPLACE "@NO_PERL@" "${NO_PERL}" git_build_options "${git_build_options}") 1167 + string(REPLACE "@NO_PTHREADS@" "${NO_PTHREADS}" git_build_options "${git_build_options}") 1168 + string(REPLACE "@NO_PYTHON@" "${NO_PYTHON}" git_build_options "${git_build_options}") 1169 + string(REPLACE "@NO_REGEX@" "" git_build_options "${git_build_options}") 1170 + string(REPLACE "@NO_UNIX_SOCKETS@" "${NO_UNIX_SOCKETS}" git_build_options "${git_build_options}") 1171 + string(REPLACE "@PAGER_ENV@" "'${PAGER_ENV}'" git_build_options "${git_build_options}") 1172 + string(REPLACE "@SANITIZE_LEAK@" "" git_build_options "${git_build_options}") 1173 + string(REPLACE "@SANITIZE_ADDRESS@" "" git_build_options "${git_build_options}") 1174 + string(REPLACE "@X@" "${EXE_EXTENSION}" git_build_options "${git_build_options}") 1175 + string(REPLACE "@FSMONITOR_DAEMON_BACKEND@" "win32" git_build_options "${git_build_options}") 1176 + string(REPLACE "@FSMONITOR_OS_SETTINGS@" "win32" git_build_options "${git_build_options}") 1177 + string(REPLACE "@TEST_OUTPUT_DIRECTORY@" "" git_build_options "${git_build_options}") 1178 + string(REPLACE "@GIT_TEST_OPTS@" "" git_build_options "${git_build_options}") 1179 + string(REPLACE "@GIT_TEST_CMP@" "" git_build_options "${git_build_options}") 1180 + string(REPLACE "@GIT_TEST_CMP_USE_COPIED_CONTEXT@" "" git_build_options "${git_build_options}") 1181 + string(REPLACE "@GIT_TEST_UTF8_LOCALE@" "" git_build_options "${git_build_options}") 1182 + string(REPLACE "@NO_GETTEXT@" "${NO_GETTEXT}" git_build_options "${git_build_options}") 1183 + string(REPLACE "@GIT_PERF_REPEAT_COUNT@" "" git_build_options "${git_build_options}") 1184 + string(REPLACE "@GIT_PERF_REPO@" "" git_build_options "${git_build_options}") 1185 + string(REPLACE "@GIT_PERF_LARGE_REPO@" "" git_build_options "${git_build_options}") 1186 + string(REPLACE "@GIT_PERF_MAKE_OPTS@" "" git_build_options "${git_build_options}") 1187 + string(REPLACE "@GIT_PERF_MAKE_COMMAND@" "" git_build_options "${git_build_options}") 1188 + string(REPLACE "@GIT_INTEROP_MAKE_OPTS@" "" git_build_options "${git_build_options}") 1189 + string(REPLACE "@GIT_TEST_INDEX_VERSION@" "" git_build_options "${git_build_options}") 1190 + string(REPLACE "@GIT_TEST_PERL_FATAL_WARNINGS@" "" git_build_options "${git_build_options}") 1191 + string(REPLACE "@GIT_TEST_TEXTDOMAINDIR@" "'${CMAKE_BINARY_DIR}/po/build/locale'" git_build_options "${git_build_options}") 1192 + string(REPLACE "@GIT_TEST_POPATH@" "'${CMAKE_BINARY_DIR}/po'" git_build_options "${git_build_options}") 1193 + string(REPLACE "@GIT_TEST_TEMPLATE_DIR@" "'${CMAKE_BINARY_DIR}/templates/blt'" git_build_options "${git_build_options}") 1194 + string(REPLACE "@GIT_TEST_GITPERLLIB@" "'${CMAKE_BINARY_DIR}/perl/build/lib'" git_build_options "${git_build_options}") 1195 + string(REPLACE "@GIT_TEST_MERGE_TOOLS_DIR@" "'${RUNTIME_PREFIX}'" git_build_options "${git_build_options}") 1196 + string(REPLACE "@RUNTIME_PREFIX@" "'${RUNTIME_PREFIX}'" git_build_options "${git_build_options}") 1197 + string(REPLACE "@GITWEBDIR@" "'${GITWEBDIR}'" git_build_options "${git_build_options}") 1198 + string(REPLACE "@USE_GETTEXT_SCHEME@" "" git_build_options "${git_build_options}") 1199 + string(REPLACE "@LOCALEDIR@" "'${LOCALEDIR}'" git_build_options "${git_build_options}") 1200 + string(REPLACE "@BROKEN_PATH_FIX@" "" git_build_options "${git_build_options}") 1146 1201 if(USE_VCPKG) 1147 - file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "PATH=\"$PATH:$TEST_DIRECTORY/../compat/vcbuild/vcpkg/installed/x64-windows/bin\"\n") 1202 + string(APPEND git_build_options "PATH=\"$PATH:$TEST_DIRECTORY/../compat/vcbuild/vcpkg/installed/x64-windows/bin\"\n") 1148 1203 endif() 1204 + file(WRITE ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS ${git_build_options}) 1149 1205 1150 1206 #Make the tests work when building out of the source tree 1151 1207 get_filename_component(CACHE_PATH ${CMAKE_CURRENT_LIST_DIR}/../../CMakeCache.txt ABSOLUTE)
+1
contrib/buildsystems/git-version.in
··· 1 + @GIT_MAJOR_VERSION@.@GIT_MINOR_VERSION@.@GIT_MICRO_VERSION@
+16
contrib/completion/meson.build
··· 1 + foreach script : [ 2 + 'git-completion.bash', 3 + 'git-completion.tcsh', 4 + 'git-completion.zsh', 5 + 'git-prompt.sh' 6 + ] 7 + if meson.version().version_compare('>=1.3.0') 8 + test_dependencies += fs.copyfile(script) 9 + else 10 + configure_file( 11 + input: script, 12 + output: script, 13 + copy: true, 14 + ) 15 + endif 16 + endforeach
+1
contrib/meson.build
··· 1 + subdir('completion')
+26 -16
generate-cmdlist.sh
··· 64 64 print_command_list () { 65 65 echo "static struct cmdname_help command_list[] = {" 66 66 67 - echo "$1" | 67 + echo "$2" | 68 68 while read cmd rest 69 69 do 70 70 synopsis= ··· 76 76 break 77 77 ;; 78 78 esac 79 - done <"Documentation/$cmd.txt" 79 + done <"$1/Documentation/$cmd.txt" 80 80 81 81 printf '\t{ "%s", N_("%s"), 0' "$cmd" "$synopsis" 82 82 printf " | CAT_%s" $rest ··· 93 93 shift 94 94 done 95 95 96 - commands="$(command_list "$1")" 97 - categories="$(category_list "$commands")" 96 + if test "$#" -ne 2 97 + then 98 + die "USAGE: $0 <SOURCE_DIR> <OUTPUT>" 99 + fi 98 100 99 - echo "/* Automatically generated by generate-cmdlist.sh */ 100 - struct cmdname_help { 101 - const char *name; 102 - const char *help; 103 - uint32_t category; 104 - }; 105 - " 106 - define_categories "$categories" 107 - echo 108 - define_category_names "$categories" 109 - echo 110 - print_command_list "$commands" 101 + SOURCE_DIR="$1" 102 + OUTPUT="$2" 103 + 104 + { 105 + commands="$(command_list "$SOURCE_DIR"/command-list.txt)" 106 + categories="$(category_list "$commands")" 107 + 108 + echo "/* Automatically generated by generate-cmdlist.sh */ 109 + struct cmdname_help { 110 + const char *name; 111 + const char *help; 112 + uint32_t category; 113 + }; 114 + " 115 + define_categories "$categories" 116 + echo 117 + define_category_names "$categories" 118 + echo 119 + print_command_list "$SOURCE_DIR" "$commands" 120 + } >"$OUTPUT"
+15 -5
generate-configlist.sh
··· 1 1 #!/bin/sh 2 2 3 - echo "/* Automatically generated by generate-configlist.sh */" 4 - echo 3 + SOURCE_DIR="$1" 4 + OUTPUT="$2" 5 + 6 + if test -z "$SOURCE_DIR" || ! test -d "$SOURCE_DIR" || test -z "$OUTPUT" 7 + then 8 + echo >&2 "USAGE: $0 <SOURCE_DIR> <OUTPUT>" 9 + exit 1 10 + fi 5 11 6 12 print_config_list () { 7 13 cat <<EOF 8 14 static const char *config_name_list[] = { 9 15 EOF 10 - grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt Documentation/config/*.txt | 16 + grep -h '^[a-zA-Z].*\..*::$' "$SOURCE_DIR"/Documentation/*config.txt "$SOURCE_DIR"/Documentation/config/*.txt | 11 17 sed '/deprecated/d; s/::$//; s/, */\n/g' | 12 18 sort | 13 19 sed 's/^.*$/ "&",/' ··· 17 23 EOF 18 24 } 19 25 20 - echo 21 - print_config_list 26 + { 27 + echo "/* Automatically generated by generate-configlist.sh */" 28 + echo 29 + echo 30 + print_config_list 31 + } >"$OUTPUT"
+14 -1
generate-hooklist.sh
··· 2 2 # 3 3 # Usage: ./generate-hooklist.sh >hook-list.h 4 4 5 + SOURCE_DIR="$1" 6 + OUTPUT="$2" 7 + 8 + if test -z "$SOURCE_DIR" || ! test -d "$SOURCE_DIR" || test -z "$OUTPUT" 9 + then 10 + echo >&2 "USAGE: $0 <SOURCE_DIR> <OUTPUT>" 11 + exit 1 12 + fi 13 + 14 + { 15 + 5 16 cat <<EOF 6 17 /* Automatically generated by generate-hooklist.sh */ 7 18 ··· 11 22 sed -n \ 12 23 -e '/^~~~~*$/ {x; s/^.*$/ "&",/; p;}' \ 13 24 -e 'x' \ 14 - <Documentation/githooks.txt | 25 + <"$SOURCE_DIR"/Documentation/githooks.txt | 15 26 LC_ALL=C sort 16 27 17 28 cat <<EOF 18 29 NULL, 19 30 }; 20 31 EOF 32 + 33 + } >"$OUTPUT"
+37
generate-perl.sh
··· 1 + #!/bin/sh 2 + 3 + set -e 4 + 5 + if test $# -ne 5 6 + then 7 + echo >&2 "USAGE: $0 <GIT_BUILD_OPTIONS> <GIT_VERSION_FILE> <PERL_HEADER> <INPUT> <OUTPUT>" 8 + exit 1 9 + fi 10 + 11 + GIT_BUILD_OPTIONS="$1" 12 + GIT_VERSION_FILE="$2" 13 + PERL_HEADER="$3" 14 + INPUT="$4" 15 + OUTPUT="$5" 16 + 17 + . "$GIT_BUILD_OPTIONS" 18 + . "$GIT_VERSION_FILE" 19 + 20 + sed -e '1{' \ 21 + -e " /^#!.*perl/!b" \ 22 + -e " s|#!.*perl|#!$PERL_PATH|" \ 23 + -e " r $PERL_HEADER" \ 24 + -e ' G' \ 25 + -e '}' \ 26 + -e "s|@GIT_VERSION@|$GIT_VERSION|g" \ 27 + -e "s|@LOCALEDIR@|$PERL_LOCALEDIR|g" \ 28 + -e "s|@NO_GETTEXT@|$NO_GETTEXT|g" \ 29 + -e "s|@NO_PERL_CPAN_FALLBACKS@|$NO_PERL_CPAN_FALLBACKS|g" \ 30 + "$INPUT" >"$OUTPUT" 31 + 32 + case "$INPUT" in 33 + *.perl) 34 + chmod a+x "$OUTPUT";; 35 + *) 36 + ;; 37 + esac
+20
generate-python.sh
··· 1 + #!/bin/sh 2 + 3 + set -e 4 + 5 + if test $# -ne 3 6 + then 7 + echo >&2 "USAGE: $0 <GIT_BUILD_OPTIONS> <INPUT> <OUTPUT>" 8 + exit 1 9 + fi 10 + 11 + GIT_BUILD_OPTIONS="$1" 12 + INPUT="$2" 13 + OUTPUT="$3" 14 + 15 + . "$GIT_BUILD_OPTIONS" 16 + 17 + sed -e "1s|#!.*python|#!$PYTHON_PATH|" \ 18 + "$INPUT" >"$OUTPUT+" 19 + chmod a+x "$OUTPUT+" 20 + mv "$OUTPUT+" "$OUTPUT"
+34
generate-script.sh
··· 1 + #!/bin/sh 2 + 3 + set -e 4 + 5 + if test $# -ne 3 6 + then 7 + echo >&2 "USAGE: $0 <INPUT> <OUTPUT> <GIT-BUILD-OPTIONS>" 8 + exit 1 9 + fi 10 + 11 + INPUT="$1" 12 + OUTPUT="$2" 13 + BUILD_OPTIONS="$3" 14 + 15 + . "$BUILD_OPTIONS" 16 + 17 + sed -e "1s|#!.*/sh|#!$SHELL_PATH|" \ 18 + -e "s|@SHELL_PATH@|$SHELL_PATH|" \ 19 + -e "s|@DIFF@|$DIFF|" \ 20 + -e "s|@LOCALEDIR@|$LOCALEDIR|g" \ 21 + -e "s/@USE_GETTEXT_SCHEME@/$USE_GETTEXT_SCHEME/g" \ 22 + -e "$BROKEN_PATH_FIX" \ 23 + -e "s|@GITWEBDIR@|$GITWEBDIR|g" \ 24 + -e "s|@PERL_PATH@|$PERL_PATH|g" \ 25 + -e "s|@PAGER_ENV@|$PAGER_ENV|g" \ 26 + "$INPUT" >"$OUTPUT" 27 + 28 + case "$(basename "$INPUT")" in 29 + git-mergetool--lib.sh|git-sh-i18n.sh|git-sh-setup.sh) 30 + ;; 31 + *) 32 + chmod a+x "$OUTPUT" 33 + ;; 34 + esac
+1 -1
git-cvsserver.perl
··· 26 26 use File::Basename; 27 27 use Getopt::Long qw(:config require_order no_ignore_case); 28 28 29 - my $VERSION = '@@GIT_VERSION@@'; 29 + my $VERSION = '@GIT_VERSION@'; 30 30 31 31 my $log = GITCVS::log->new(); 32 32 my $cfg;
+4 -4
git-instaweb.sh
··· 3 3 # Copyright (c) 2006 Eric Wong 4 4 # 5 5 6 - PERL='@@PERL@@' 6 + PERL='@PERL_PATH@' 7 7 OPTIONS_KEEPDASHDASH= 8 8 OPTIONS_STUCKLONG= 9 9 OPTIONS_SPEC="\ ··· 38 38 # if installed, it doesn't need further configuration (module_path) 39 39 test -z "$httpd" && httpd='lighttpd -f' 40 40 41 - # Default is @@GITWEBDIR@@ 42 - test -z "$root" && root='@@GITWEBDIR@@' 41 + # Default is @GITWEBDIR@ 42 + test -z "$root" && root='@GITWEBDIR@' 43 43 44 44 # any untaken local port will do... 45 45 test -z "$port" && port=1234 ··· 716 716 717 717 gitweb_conf() { 718 718 cat > "$fqgitdir/gitweb/gitweb_config.perl" <<EOF 719 - #!@@PERL@@ 719 + #!@PERL_PATH@ 720 720 our \$projectroot = "$(dirname "$fqgitdir")"; 721 721 our \$git_temp = "$fqgitdir/gitweb/tmp"; 722 722 our \$projects_list = \$projectroot;
+1 -1
git-request-pull.sh
··· 112 112 } 113 113 ' 114 114 115 - set fnord $(git ls-remote "$url" | @@PERL@@ -e "$find_matching_ref" "${remote:-HEAD}" "$headrev") 115 + set fnord $(git ls-remote "$url" | @PERL_PATH@ -e "$find_matching_ref" "${remote:-HEAD}" "$headrev") 116 116 remote_sha1=$2 117 117 ref=$3 118 118
+1 -1
git-send-email.perl
··· 1501 1501 @recipients = unique_email_list(@recipients,@cc,@initial_bcc); 1502 1502 @recipients = (map { extract_valid_address_or_die($_) } @recipients); 1503 1503 my $date = format_2822_time($time++); 1504 - my $gitversion = '@@GIT_VERSION@@'; 1504 + my $gitversion = '@GIT_VERSION@'; 1505 1505 if ($gitversion =~ m/..GIT_VERSION../) { 1506 1506 $gitversion = Git::version(); 1507 1507 }
+3 -3
git-sh-i18n.sh
··· 9 9 export TEXTDOMAIN 10 10 if test -z "$GIT_TEXTDOMAINDIR" 11 11 then 12 - TEXTDOMAINDIR="@@LOCALEDIR@@" 12 + TEXTDOMAINDIR="@LOCALEDIR@" 13 13 else 14 14 TEXTDOMAINDIR="$GIT_TEXTDOMAINDIR" 15 15 fi ··· 17 17 18 18 # First decide what scheme to use... 19 19 GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough 20 - if test -n "@@USE_GETTEXT_SCHEME@@" 20 + if test -n "@USE_GETTEXT_SCHEME@" 21 21 then 22 - GIT_INTERNAL_GETTEXT_SH_SCHEME="@@USE_GETTEXT_SCHEME@@" 22 + GIT_INTERNAL_GETTEXT_SH_SCHEME="@USE_GETTEXT_SCHEME@" 23 23 elif test -n "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS" 24 24 then 25 25 : no probing necessary
+3 -3
git-sh-setup.sh
··· 41 41 esac 42 42 } 43 43 44 - # @@BROKEN_PATH_FIX@@ 44 + # @BROKEN_PATH_FIX@ 45 45 46 46 # Source git-sh-i18n for gettext support. 47 47 . "$(git --exec-path)/git-sh-i18n" ··· 154 154 else 155 155 GIT_PAGER=cat 156 156 fi 157 - for vardef in @@PAGER_ENV@@ 157 + for vardef in @PAGER_ENV@ 158 158 do 159 159 var=${vardef%%=*} 160 160 eval ": \"\${$vardef}\" && export $var" ··· 280 280 # remove lines from $1 that are not in $2, leaving only common lines. 281 281 create_virtual_base() { 282 282 sz0=$(wc -c <"$1") 283 - @@DIFF@@ -u -La/"$1" -Lb/"$1" "$1" "$2" | git apply --no-add 283 + @DIFF@ -u -La/"$1" -Lb/"$1" "$1" "$2" | git apply --no-add 284 284 sz1=$(wc -c <"$1") 285 285 286 286 # If we do not have enough common material, it is not
+1 -1
git-svn.perl
··· 9 9 $_revision $_repository 10 10 $_q $_authors $_authors_prog %users/; 11 11 $AUTHOR = 'Eric Wong <normalperson@yhbt.net>'; 12 - $VERSION = '@@GIT_VERSION@@'; 12 + $VERSION = '@GIT_VERSION@'; 13 13 14 14 use Carp qw/croak/; 15 15 use File::Basename qw/dirname basename/;
+3 -3
git.rc git.rc.in
··· 1 1 1 VERSIONINFO 2 - FILEVERSION MAJOR,MINOR,MICRO,PATCHLEVEL 3 - PRODUCTVERSION MAJOR,MINOR,MICRO,PATCHLEVEL 2 + FILEVERSION @GIT_MAJOR_VERSION@,@GIT_MINOR_VERSION@,@GIT_MICRO_VERSION@,@GIT_PATCH_LEVEL@ 3 + PRODUCTVERSION @GIT_MAJOR_VERSION@,@GIT_MINOR_VERSION@,@GIT_MICRO_VERSION@,@GIT_PATCH_LEVEL@ 4 4 BEGIN 5 5 BLOCK "StringFileInfo" 6 6 BEGIN ··· 11 11 VALUE "InternalName", "git\0" 12 12 VALUE "OriginalFilename", "git.exe\0" 13 13 VALUE "ProductName", "Git\0" 14 - VALUE "ProductVersion", GIT_VERSION "\0" 14 + VALUE "ProductVersion", "@GIT_VERSION@\0" 15 15 END 16 16 END 17 17
+24
gitweb/GITWEB-BUILD-OPTIONS.in
··· 1 + PERL_PATH=@PERL_PATH@ 2 + JSMIN=@JSMIN@ 3 + CSSMIN=@CSSMIN@ 4 + GIT_BINDIR=@GIT_BINDIR@ 5 + GITWEB_CONFIG=@GITWEB_CONFIG@ 6 + GITWEB_CONFIG_SYSTEM=@GITWEB_CONFIG_SYSTEM@ 7 + GITWEB_CONFIG_COMMON=@GITWEB_CONFIG_COMMON@ 8 + GITWEB_HOME_LINK_STR=@GITWEB_HOME_LINK_STR@ 9 + GITWEB_SITENAME=@GITWEB_SITENAME@ 10 + GITWEB_PROJECTROOT=@GITWEB_PROJECTROOT@ 11 + GITWEB_PROJECT_MAXDEPTH=@GITWEB_PROJECT_MAXDEPTH@ 12 + GITWEB_EXPORT_OK=@GITWEB_EXPORT_OK@ 13 + GITWEB_STRICT_EXPORT=@GITWEB_STRICT_EXPORT@ 14 + GITWEB_BASE_URL=@GITWEB_BASE_URL@ 15 + GITWEB_LIST=@GITWEB_LIST@ 16 + GITWEB_HOMETEXT=@GITWEB_HOMETEXT@ 17 + GITWEB_CSS=@GITWEB_CSS@ 18 + GITWEB_LOGO=@GITWEB_LOGO@ 19 + GITWEB_FAVICON=@GITWEB_FAVICON@ 20 + GITWEB_JS=@GITWEB_JS@ 21 + GITWEB_SITE_HTML_HEAD_STRING=@GITWEB_SITE_HTML_HEAD_STRING@ 22 + GITWEB_SITE_HEADER=@GITWEB_SITE_HEADER@ 23 + GITWEB_SITE_FOOTER=@GITWEB_SITE_FOOTER@ 24 + HIGHLIGHT_BIN=@HIGHLIGHT_BIN@
+31 -31
gitweb/Makefile
··· 77 77 GITWEB_JSLIB_FILES += static/js/adjust-timezone.js 78 78 GITWEB_JSLIB_FILES += static/js/blame_incremental.js 79 79 80 - 81 - GITWEB_REPLACE = \ 82 - -e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \ 83 - -e 's|++GIT_BINDIR++|$(bindir)|g' \ 84 - -e 's|++GITWEB_CONFIG++|$(GITWEB_CONFIG)|g' \ 85 - -e 's|++GITWEB_CONFIG_SYSTEM++|$(GITWEB_CONFIG_SYSTEM)|g' \ 86 - -e 's|++GITWEB_CONFIG_COMMON++|$(GITWEB_CONFIG_COMMON)|g' \ 87 - -e 's|++GITWEB_HOME_LINK_STR++|$(GITWEB_HOME_LINK_STR)|g' \ 88 - -e 's|++GITWEB_SITENAME++|$(GITWEB_SITENAME)|g' \ 89 - -e 's|++GITWEB_PROJECTROOT++|$(GITWEB_PROJECTROOT)|g' \ 90 - -e 's|"++GITWEB_PROJECT_MAXDEPTH++"|$(GITWEB_PROJECT_MAXDEPTH)|g' \ 91 - -e 's|++GITWEB_EXPORT_OK++|$(GITWEB_EXPORT_OK)|g' \ 92 - -e 's|++GITWEB_STRICT_EXPORT++|$(GITWEB_STRICT_EXPORT)|g' \ 93 - -e 's|++GITWEB_BASE_URL++|$(GITWEB_BASE_URL)|g' \ 94 - -e 's|++GITWEB_LIST++|$(GITWEB_LIST)|g' \ 95 - -e 's|++GITWEB_HOMETEXT++|$(GITWEB_HOMETEXT)|g' \ 96 - -e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \ 97 - -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \ 98 - -e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \ 99 - -e 's|++GITWEB_JS++|$(GITWEB_JS)|g' \ 100 - -e 's|++GITWEB_SITE_HTML_HEAD_STRING++|$(GITWEB_SITE_HTML_HEAD_STRING)|g' \ 101 - -e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER)|g' \ 102 - -e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \ 103 - -e 's|++HIGHLIGHT_BIN++|$(HIGHLIGHT_BIN)|g' 104 - 105 80 .PHONY: FORCE 106 81 $(MAK_DIR_GITWEB)GITWEB-BUILD-OPTIONS: FORCE 107 - @rm -f $@+ 108 - @echo "x" '$(PERL_PATH_SQ)' $(GITWEB_REPLACE) "$(JSMIN)|$(CSSMIN)" >$@+ 82 + @sed -e 's|@PERL_PATH@|$(PERL_PATH_SQ)|' \ 83 + -e 's|@JSMIN@|$(JSMIN)|' \ 84 + -e 's|@CSSMIN@|$(CSSMIN)|' \ 85 + -e 's|@GIT_VERSION@|$(GIT_VERSION)|' \ 86 + -e 's|@GIT_BINDIR@|$(bindir)|' \ 87 + -e 's|@GITWEB_CONFIG@|$(GITWEB_CONFIG)|' \ 88 + -e 's|@GITWEB_CONFIG_SYSTEM@|$(GITWEB_CONFIG_SYSTEM)|' \ 89 + -e 's|@GITWEB_CONFIG_COMMON@|$(GITWEB_CONFIG_COMMON)|' \ 90 + -e 's|@GITWEB_HOME_LINK_STR@|$(GITWEB_HOME_LINK_STR)|' \ 91 + -e 's|@GITWEB_SITENAME@|$(GITWEB_SITENAME)|' \ 92 + -e 's|@GITWEB_PROJECTROOT@|$(GITWEB_PROJECTROOT)|' \ 93 + -e 's|@GITWEB_PROJECT_MAXDEPTH@|$(GITWEB_PROJECT_MAXDEPTH)|' \ 94 + -e 's|@GITWEB_EXPORT_OK@|$(GITWEB_EXPORT_OK)|' \ 95 + -e 's|@GITWEB_STRICT_EXPORT@|$(GITWEB_STRICT_EXPORT)|' \ 96 + -e 's|@GITWEB_BASE_URL@|$(GITWEB_BASE_URL)|' \ 97 + -e 's|@GITWEB_LIST@|$(GITWEB_LIST)|' \ 98 + -e 's|@GITWEB_HOMETEXT@|$(GITWEB_HOMETEXT)|' \ 99 + -e 's|@GITWEB_CSS@|$(GITWEB_CSS)|' \ 100 + -e 's|@GITWEB_LOGO@|$(GITWEB_LOGO)|' \ 101 + -e 's|@GITWEB_FAVICON@|$(GITWEB_FAVICON)|' \ 102 + -e 's|@GITWEB_JS@|$(GITWEB_JS)|' \ 103 + -e 's|@GITWEB_SITE_HTML_HEAD_STRING@|$(GITWEB_SITE_HTML_HEAD_STRING)|' \ 104 + -e 's|@GITWEB_SITE_HEADER@|$(GITWEB_SITE_HEADER)|' \ 105 + -e 's|@GITWEB_SITE_FOOTER@|$(GITWEB_SITE_FOOTER)|' \ 106 + -e 's|@HIGHLIGHT_BIN@|$(HIGHLIGHT_BIN)|' \ 107 + $(MAK_DIR_GITWEB)GITWEB-BUILD-OPTIONS.in >"$@+" 109 108 @cmp -s $@+ $@ && rm -f $@+ || mv -f $@+ $@ 110 109 110 + $(MAK_DIR_GITWEB)gitweb.cgi: $(MAK_DIR_GITWEB)generate-gitweb-cgi.sh 111 111 $(MAK_DIR_GITWEB)gitweb.cgi: $(MAK_DIR_GITWEB)GITWEB-BUILD-OPTIONS 112 + $(MAK_DIR_GITWEB)gitweb.cgi: GIT-VERSION-FILE 112 113 $(MAK_DIR_GITWEB)gitweb.cgi: $(MAK_DIR_GITWEB)gitweb.perl 113 114 $(QUIET_GEN)$(RM) $@ $@+ && \ 114 - sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \ 115 - $(GITWEB_REPLACE) $< >$@+ && \ 116 - chmod +x $@+ && \ 115 + $(MAK_DIR_GITWEB)generate-gitweb-cgi.sh $(MAK_DIR_GITWEB)/GITWEB-BUILD-OPTIONS ./GIT-VERSION-FILE $< $@+ && \ 117 116 mv $@+ $@ 118 117 118 + $(MAK_DIR_GITWEB)static/gitweb.js: $(MAK_DIR_GITWEB)generate-gitweb-js.sh 119 119 $(MAK_DIR_GITWEB)static/gitweb.js: $(addprefix $(MAK_DIR_GITWEB),$(GITWEB_JSLIB_FILES)) 120 120 $(QUIET_GEN)$(RM) $@ $@+ && \ 121 - cat $^ >$@+ && \ 121 + $(MAK_DIR_GITWEB)generate-gitweb-js.sh $@+ $^ && \ 122 122 mv $@+ $@ 123 123 124 124 ### Installation rules
+47
gitweb/generate-gitweb-cgi.sh
··· 1 + #!/bin/sh 2 + 3 + set -e 4 + 5 + if test $# -ne 4 6 + then 7 + echo >&2 "USAGE: $0 <GITWEB-BUILD-OPTIONS> <GIT-VERSION-FILE> <INPUT> <OUTPUT>" 8 + exit 1 9 + fi 10 + 11 + GITWEB_BUILD_OPTIONS="$1" 12 + GIT_VERSION_FILE="$2" 13 + INPUT="$3" 14 + OUTPUT="$4" 15 + 16 + . "$GITWEB_BUILD_OPTIONS" 17 + . "$GIT_VERSION_FILE" 18 + 19 + sed -e "1s|#!/usr/bin/perl|#!$PERL_PATH|" \ 20 + -e "s|@PERL_PATH@|$PERL_PATH|" \ 21 + -e "s|@JSMIN@|$JSMIN|" \ 22 + -e "s|@CSSMIN@|$CSSMIN|" \ 23 + -e "s|@GIT_VERSION@|$GIT_VERSION|" \ 24 + -e "s|@GIT_BINDIR@|$GIT_BINDIR|" \ 25 + -e "s|@GITWEB_CONFIG@|$GITWEB_CONFIG|" \ 26 + -e "s|@GITWEB_CONFIG_SYSTEM@|$GITWEB_CONFIG_SYSTEM|" \ 27 + -e "s|@GITWEB_CONFIG_COMMON@|$GITWEB_CONFIG_COMMON|" \ 28 + -e "s|@GITWEB_HOME_LINK_STR@|$GITWEB_HOME_LINK_STR|" \ 29 + -e "s|@GITWEB_SITENAME@|$GITWEB_SITENAME|" \ 30 + -e "s|@GITWEB_PROJECTROOT@|$GITWEB_PROJECTROOT|" \ 31 + -e "s|@GITWEB_PROJECT_MAXDEPTH@|$GITWEB_PROJECT_MAXDEPTH|" \ 32 + -e "s|@GITWEB_EXPORT_OK@|$GITWEB_EXPORT_OK|" \ 33 + -e "s|@GITWEB_STRICT_EXPORT@|$GITWEB_STRICT_EXPORT|" \ 34 + -e "s|@GITWEB_BASE_URL@|$GITWEB_BASE_URL|" \ 35 + -e "s|@GITWEB_LIST@|$GITWEB_LIST|" \ 36 + -e "s|@GITWEB_HOMETEXT@|$GITWEB_HOMETEXT|" \ 37 + -e "s|@GITWEB_CSS@|$GITWEB_CSS|" \ 38 + -e "s|@GITWEB_LOGO@|$GITWEB_LOGO|" \ 39 + -e "s|@GITWEB_FAVICON@|$GITWEB_FAVICON|" \ 40 + -e "s|@GITWEB_JS@|$GITWEB_JS|" \ 41 + -e "s|@GITWEB_SITE_HTML_HEAD_STRING@|$GITWEB_SITE_HTML_HEAD_STRING|" \ 42 + -e "s|@GITWEB_SITE_HEADER@|$GITWEB_SITE_HEADER|" \ 43 + -e "s|@GITWEB_SITE_FOOTER@|$GITWEB_SITE_FOOTER|" \ 44 + -e "s|@HIGHLIGHT_BIN@|$HIGHLIGHT_BIN|" \ 45 + "$INPUT" >"$OUTPUT" 46 + 47 + chmod a+x "$OUTPUT"
+12
gitweb/generate-gitweb-js.sh
··· 1 + #!/bin/sh 2 + 3 + if test "$#" -lt 2 4 + then 5 + echo >&2 "USAGE: $0 <OUTPUT> <INPUT>..." 6 + exit 1 7 + fi 8 + 9 + OUTPUT="$1" 10 + shift 11 + 12 + cat "$@" >"$OUTPUT"
+22 -22
gitweb/gitweb.perl
··· 35 35 CGI->compile() if $ENV{'MOD_PERL'}; 36 36 } 37 37 38 - our $version = "++GIT_VERSION++"; 38 + our $version = "@GIT_VERSION@"; 39 39 40 40 our ($my_url, $my_uri, $base_url, $path_info, $home_link); 41 41 sub evaluate_uri { ··· 80 80 81 81 # core git executable to use 82 82 # this can just be "git" if your webserver has a sensible PATH 83 - our $GIT = "++GIT_BINDIR++/git"; 83 + our $GIT = "@GIT_BINDIR@/git"; 84 84 85 85 # absolute fs-path which will be prepended to the project path 86 86 #our $projectroot = "/pub/scm"; 87 - our $projectroot = "++GITWEB_PROJECTROOT++"; 87 + our $projectroot = "@GITWEB_PROJECTROOT@"; 88 88 89 89 # fs traversing limit for getting project list 90 90 # the number is relative to the projectroot 91 - our $project_maxdepth = "++GITWEB_PROJECT_MAXDEPTH++"; 91 + our $project_maxdepth = @GITWEB_PROJECT_MAXDEPTH@; 92 92 93 93 # string of the home link on top of all pages 94 - our $home_link_str = "++GITWEB_HOME_LINK_STR++"; 94 + our $home_link_str = "@GITWEB_HOME_LINK_STR@"; 95 95 96 96 # extra breadcrumbs preceding the home link 97 97 our @extra_breadcrumbs = (); 98 98 99 99 # name of your site or organization to appear in page titles 100 100 # replace this with something more descriptive for clearer bookmarks 101 - our $site_name = "++GITWEB_SITENAME++" 101 + our $site_name = "@GITWEB_SITENAME@" 102 102 || ($ENV{'SERVER_NAME'} || "Untitled") . " Git"; 103 103 104 104 # html snippet to include in the <head> section of each page 105 - our $site_html_head_string = "++GITWEB_SITE_HTML_HEAD_STRING++"; 105 + our $site_html_head_string = "@GITWEB_SITE_HTML_HEAD_STRING@"; 106 106 # filename of html text to include at top of each page 107 - our $site_header = "++GITWEB_SITE_HEADER++"; 107 + our $site_header = "@GITWEB_SITE_HEADER@"; 108 108 # html text to include at home page 109 - our $home_text = "++GITWEB_HOMETEXT++"; 109 + our $home_text = "@GITWEB_HOMETEXT@"; 110 110 # filename of html text to include at bottom of each page 111 - our $site_footer = "++GITWEB_SITE_FOOTER++"; 111 + our $site_footer = "@GITWEB_SITE_FOOTER@"; 112 112 113 113 # URI of stylesheets 114 - our @stylesheets = ("++GITWEB_CSS++"); 114 + our @stylesheets = ("@GITWEB_CSS@"); 115 115 # URI of a single stylesheet, which can be overridden in GITWEB_CONFIG. 116 116 our $stylesheet = undef; 117 117 # URI of GIT logo (72x27 size) 118 - our $logo = "++GITWEB_LOGO++"; 118 + our $logo = "@GITWEB_LOGO@"; 119 119 # URI of GIT favicon, assumed to be image/png type 120 - our $favicon = "++GITWEB_FAVICON++"; 120 + our $favicon = "@GITWEB_FAVICON@"; 121 121 # URI of gitweb.js (JavaScript code for gitweb) 122 - our $javascript = "++GITWEB_JS++"; 122 + our $javascript = "@GITWEB_JS@"; 123 123 124 124 # URI and label (title) of GIT logo link 125 125 #our $logo_url = "https://www.kernel.org/pub/software/scm/git/docs/"; ··· 128 128 our $logo_label = "git homepage"; 129 129 130 130 # source of projects list 131 - our $projects_list = "++GITWEB_LIST++"; 131 + our $projects_list = "@GITWEB_LIST@"; 132 132 133 133 # the width (in characters) of the projects list "Description" column 134 134 our $projects_list_description_width = 25; ··· 147 147 148 148 # show repository only if this file exists 149 149 # (only effective if this variable evaluates to true) 150 - our $export_ok = "++GITWEB_EXPORT_OK++"; 150 + our $export_ok = "@GITWEB_EXPORT_OK@"; 151 151 152 152 # don't generate age column on the projects list page 153 153 our $omit_age_column = 0; ··· 161 161 our $export_auth_hook = undef; 162 162 163 163 # only allow viewing of repositories also shown on the overview page 164 - our $strict_export = "++GITWEB_STRICT_EXPORT++"; 164 + our $strict_export = "@GITWEB_STRICT_EXPORT@"; 165 165 166 166 # list of git base URLs used for URL to where fetch project from, 167 167 # i.e. full URL is "$git_base_url/$project" 168 - our @git_base_url_list = grep { $_ ne '' } ("++GITWEB_BASE_URL++"); 168 + our @git_base_url_list = grep { $_ ne '' } ("@GITWEB_BASE_URL@"); 169 169 170 170 # default blob_plain mimetype and default charset for text/plain blob 171 171 our $default_blob_plain_mimetype = 'text/plain'; ··· 200 200 # http://andre-simon.de/zip/download.php due to assumptions about parameters and output). 201 201 # Useful if highlight is not installed on your webserver's PATH. 202 202 # [Default: highlight] 203 - our $highlight_bin = "++HIGHLIGHT_BIN++"; 203 + our $highlight_bin = "@HIGHLIGHT_BIN@"; 204 204 205 205 # information about snapshot formats that gitweb is capable of serving 206 206 our %known_snapshot_formats = ( ··· 741 741 742 742 our ($GITWEB_CONFIG, $GITWEB_CONFIG_SYSTEM, $GITWEB_CONFIG_COMMON); 743 743 sub evaluate_gitweb_config { 744 - our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++"; 745 - our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++"; 746 - our $GITWEB_CONFIG_COMMON = $ENV{'GITWEB_CONFIG_COMMON'} || "++GITWEB_CONFIG_COMMON++"; 744 + our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "@GITWEB_CONFIG@"; 745 + our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "@GITWEB_CONFIG_SYSTEM@"; 746 + our $GITWEB_CONFIG_COMMON = $ENV{'GITWEB_CONFIG_COMMON'} || "@GITWEB_CONFIG_COMMON@"; 747 747 748 748 # Protect against duplications of file names, to not read config twice. 749 749 # Only one of $GITWEB_CONFIG and $GITWEB_CONFIG_SYSTEM is used, so
+89
gitweb/meson.build
··· 1 + gitweb_config = configuration_data() 2 + gitweb_config.set_quoted('PERL_PATH', perl.full_path()) 3 + gitweb_config.set_quoted('CSSMIN', '') 4 + gitweb_config.set_quoted('JSMIN', '') 5 + gitweb_config.set_quoted('GIT_BINDIR', get_option('prefix') / get_option('bindir')) 6 + gitweb_config.set_quoted('GITWEB_CONFIG', get_option('gitweb_config')) 7 + gitweb_config.set_quoted('GITWEB_CONFIG_SYSTEM', get_option('gitweb_config_system')) 8 + gitweb_config.set_quoted('GITWEB_CONFIG_COMMON', get_option('gitweb_config_common')) 9 + gitweb_config.set_quoted('GITWEB_HOME_LINK_STR', get_option('gitweb_home_link_str')) 10 + gitweb_config.set_quoted('GITWEB_SITENAME', get_option('gitweb_sitename')) 11 + gitweb_config.set_quoted('GITWEB_PROJECTROOT', get_option('gitweb_projectroot')) 12 + gitweb_config.set_quoted('GITWEB_PROJECT_MAXDEPTH', get_option('gitweb_project_maxdepth')) 13 + gitweb_config.set_quoted('GITWEB_EXPORT_OK', get_option('gitweb_export_ok')) 14 + gitweb_config.set_quoted('GITWEB_STRICT_EXPORT', get_option('gitweb_strict_export')) 15 + gitweb_config.set_quoted('GITWEB_BASE_URL', get_option('gitweb_base_url')) 16 + gitweb_config.set_quoted('GITWEB_LIST', get_option('gitweb_list')) 17 + gitweb_config.set_quoted('GITWEB_HOMETEXT', get_option('gitweb_hometext')) 18 + gitweb_config.set_quoted('GITWEB_CSS', get_option('gitweb_css')) 19 + gitweb_config.set_quoted('GITWEB_LOGO', get_option('gitweb_logo')) 20 + gitweb_config.set_quoted('GITWEB_FAVICON', get_option('gitweb_favicon')) 21 + gitweb_config.set_quoted('GITWEB_JS', get_option('gitweb_js')) 22 + gitweb_config.set_quoted('GITWEB_SITE_HTML_HEAD_STRING', get_option('gitweb_site_html_head_string')) 23 + gitweb_config.set_quoted('GITWEB_SITE_HEADER', get_option('gitweb_site_header')) 24 + gitweb_config.set_quoted('GITWEB_SITE_FOOTER', get_option('gitweb_site_footer')) 25 + gitweb_config.set_quoted('HIGHLIGHT_BIN', get_option('highlight_bin')) 26 + 27 + configure_file( 28 + input: 'GITWEB-BUILD-OPTIONS.in', 29 + output: 'GITWEB-BUILD-OPTIONS', 30 + configuration: gitweb_config, 31 + ) 32 + 33 + test_dependencies += custom_target( 34 + input: 'gitweb.perl', 35 + output: 'gitweb.cgi', 36 + command: [ 37 + shell, 38 + meson.current_source_dir() / 'generate-gitweb-cgi.sh', 39 + meson.current_build_dir() / 'GITWEB-BUILD-OPTIONS', 40 + git_version_file.full_path(), 41 + '@INPUT@', 42 + '@OUTPUT@', 43 + ], 44 + install: true, 45 + install_dir: get_option('datadir') / 'gitweb', 46 + depends: [git_version_file], 47 + ) 48 + 49 + javascript_files = [ 50 + meson.current_source_dir() / 'static/js/adjust-timezone.js', 51 + meson.current_source_dir() / 'static/js/blame_incremental.js', 52 + meson.current_source_dir() / 'static/js/javascript-detection.js', 53 + meson.current_source_dir() / 'static/js/lib/common-lib.js', 54 + meson.current_source_dir() / 'static/js/lib/cookies.js', 55 + meson.current_source_dir() / 'static/js/lib/datetime.js', 56 + ] 57 + 58 + test_dependencies += custom_target( 59 + input: javascript_files, 60 + output: 'gitweb.js', 61 + command: [ 62 + shell, 63 + meson.current_source_dir() / 'generate-gitweb-js.sh', 64 + '@OUTPUT@', 65 + ] + javascript_files, 66 + install: true, 67 + install_dir: get_option('datadir') / 'gitweb/static', 68 + ) 69 + 70 + foreach asset : [ 71 + 'static/git-favicon.png', 72 + 'static/git-logo.png', 73 + 'static/gitweb.css', 74 + ] 75 + if meson.version().version_compare('>=1.3.0') 76 + fs.copyfile(asset, 77 + install: true, 78 + install_dir: get_option('datadir') / 'gitweb' / fs.parent(asset), 79 + ) 80 + else 81 + configure_file( 82 + input: asset, 83 + output: fs.stem(asset), 84 + copy: true, 85 + install: true, 86 + install_dir: get_option('datadir') / 'gitweb' / fs.parent(asset), 87 + ) 88 + endif 89 + endforeach
+1901
meson.build
··· 1 + # Meson build system 2 + # ================== 3 + # 4 + # The Meson build system is an alternative to our Makefile that you can use to 5 + # build, test and install Git. Using Meson results in a couple of benefits: 6 + # 7 + # - Out-of-tree builds. 8 + # - Better integration into IDEs. 9 + # - Easy-to-use autoconfiguration of available features on your system. 10 + # 11 + # To use Meson from the command line you need to have both Meson and Ninja 12 + # installed. Alternatively, if you do not have Python available on your system, 13 + # you can also use Muon instead of Meson and Samurai instead of Ninja, both of 14 + # which are drop-ins replacement that only depend on C. 15 + # 16 + # Basic usage 17 + # =========== 18 + # 19 + # In the most trivial case, you can configure, build and install Git like this: 20 + # 21 + # 1. Set up the build directory. This only needs to happen once per build 22 + # directory you want to have. You can also configure multiple different 23 + # build directories with different configurations. 24 + # 25 + # $ meson setup build/ 26 + # 27 + # The build directory gets ignored by Git automatically as Meson will write 28 + # a ".gitignore" file into it. From hereon, we will assume that you execute 29 + # commands inside this build directory. 30 + # 31 + # 2. Compile Git. You can either use Meson, Ninja or Samurai to do this, so all 32 + # of the following invocations are equivalent: 33 + # 34 + # $ meson compile 35 + # $ ninja 36 + # $ samu 37 + # 38 + # The different invocations should ultimately not make much of a difference. 39 + # Using Meson also works with other generators though, like when the build 40 + # directory has been set up for use with Microsoft Visual Studio. 41 + # 42 + # Ninja and Samurai use multiple jobs by default, scaling with the number of 43 + # processor cores available. You can pass the `-jN` flag to change this. 44 + # 45 + # Meson automatically picks up ccache and sccache when these are installed 46 + # when setting up the build directory. You can override this behaviour when 47 + # setting up the build directory by setting the `CC` environment variable to 48 + # your desired compiler. 49 + # 50 + # 3. Execute tests. Again, you can either use Meson, Ninja or Samurai to do this: 51 + # 52 + # $ meson test 53 + # $ ninja test 54 + # $ samu test 55 + # 56 + # It is recommended to use Meson in this case though as it also provides you 57 + # additional features that the other build systems don't have available. 58 + # You can e.g. pass additional arguments to the test executables or run 59 + # individual tests: 60 + # 61 + # # Execute the t0000-basic integration test and t-reftable-stack unit test. 62 + # $ meson test t0000-basic t-reftable-stack 63 + # 64 + # # Execute all reftable unit tests. 65 + # $ meson test t-reftable-* 66 + # 67 + # # Execute all tests and stop with the first failure. 68 + # $ meson test --maxfail 1 69 + # 70 + # # Execute single test interactively such that features like `debug ()` work. 71 + # $ meson test -i --test-args='-ix' t1400-update-ref 72 + # 73 + # Test execution is parallelized by default and scales with the number of 74 + # processor cores available. You can change the number of processes by passing 75 + # the `-jN` flag to `meson test`. 76 + # 77 + # 4. Install the Git distribution. Again, this can be done via Meson, Ninja or 78 + # Samurai: 79 + # 80 + # $ meson install 81 + # $ ninja install 82 + # $ samu install 83 + # 84 + # The prefix into which Git shall be installed is defined when setting up 85 + # the build directory. More on that in the "Configuration" section. 86 + # 87 + # Meson supports multiple backends. The default backend generates Ninja build 88 + # instructions, but it also supports the generation of Microsoft Visual 89 + # Studio solutions as well as Xcode projects by passing the `--backend` option 90 + # to `meson setup`. IDEs like Eclipse and Visual Studio Code provide plugins to 91 + # import Meson files directly. 92 + # 93 + # Configuration 94 + # ============= 95 + # 96 + # The exact configuration of Git is determined when setting up the build 97 + # directory via `meson setup`. Unless told otherwise, Meson will automatically 98 + # detect the availability of various bits and pieces. There are two different 99 + # kinds of options that can be used to further tweak the build: 100 + # 101 + # - Built-in options provided by Meson. 102 + # 103 + # - Options defined by the project in the "meson_options.txt" file. 104 + # 105 + # Both kinds of options can be inspected by running `meson configure` in the 106 + # build directory, which will give you a list of the current value for all 107 + # options. 108 + # 109 + # Options can be configured either when setting up the build directory or can 110 + # be changed in preexisting build directories: 111 + # 112 + # # Set up a new build directory with optimized settings that will be 113 + # # installed into an alternative prefix. 114 + # $ meson setup --buildtype release --optimization 3 --strip --prefix=/home/$USER build 115 + # 116 + # # Set up a new build directory with a higher warning level. Level 2 is 117 + # # mostly equivalent to setting DEVELOPER=1, level 3 and "everything" 118 + # # will enable even more warnings. 119 + # $ meson setup -Dwarning_level=2 build 120 + # 121 + # # Set up a new build directory with 'address' and 'undefined' sanitizers 122 + # # using Clang. 123 + # $ CC=clang meson setup -Db_sanitize=address,undefined build 124 + # 125 + # # Disable tests in a preexisting build directory. 126 + # $ meson configure -Dtests=false 127 + # 128 + # # Disable features based on Python 129 + # $ meson configure -Dpython=disabled 130 + # 131 + # Options have a type like booleans, choices, strings or features. Features are 132 + # somewhat special as they can have one of three values: enabled, disabled or 133 + # auto. While the first two values are self-explanatory, "auto" will enable or 134 + # disable the feature based on the availability of prerequisites to support it. 135 + # Python-based features for example will be enabled automatically when a Python 136 + # interpreter could be found. The default value of such features can be changed 137 + # via `meson setup --auto-features={enabled,disabled,auto}`, which will set the 138 + # value of all features with a value of "auto" to the provided one by default. 139 + # 140 + # It is also possible to store a set of configuration options in machine files. 141 + # This can be useful in case you regularly want to reuse the same set of options: 142 + # 143 + # [binaries] 144 + # c = ['clang'] 145 + # ar = ['ar'] 146 + # 147 + # [project options] 148 + # gettext = 'disabled' 149 + # default_editor = 'vim' 150 + # 151 + # [built-in options] 152 + # b_lto = true 153 + # b_sanitize = 'address,undefined' 154 + # 155 + # These machine files can be passed to `meson setup` via the `--native-file` 156 + # option. 157 + # 158 + # Subproject wrappers 159 + # =================== 160 + # 161 + # Subproject wrappers are a feature provided by Meson that allows the automatic 162 + # fallback to a "wrapped" dependency in case the dependency is not provided by 163 + # the system. For example if the system is lacking curl, then Meson will use 164 + # "subprojects/curl.wrap" to set up curl as a subproject and compile and link 165 + # the dependency into Git itself. This is especially helpful on systems like 166 + # Windows, where you typically don't have such dependencies installed. 167 + # 168 + # The use of subproject wrappers can be disabled by executing `meson setup` 169 + # with the `--wrap-mode nofallback` option. 170 + 171 + project('git', 'c', 172 + meson_version: '>=0.61.0', 173 + version: 'v2.47.GIT', 174 + ) 175 + 176 + fs = import('fs') 177 + 178 + program_path = [] 179 + # Git for Windows provides all the tools we need to build Git. 180 + if host_machine.system() == 'windows' 181 + program_path += [ 'C:/Program Files/Git/bin', 'C:/Program Files/Git/usr/bin' ] 182 + endif 183 + 184 + cygpath = find_program('cygpath', dirs: program_path, required: false) 185 + diff = find_program('diff', dirs: program_path) 186 + shell = find_program('sh', dirs: program_path) 187 + tar = find_program('tar', dirs: program_path) 188 + 189 + script_environment = environment() 190 + foreach tool : ['cat', 'cut', 'grep', 'sed', 'sort', 'tr', 'uname'] 191 + program = find_program(tool, dirs: program_path) 192 + script_environment.prepend('PATH', fs.parent(program.full_path())) 193 + endforeach 194 + 195 + git = find_program('git', dirs: program_path, required: false) 196 + if git.found() 197 + script_environment.prepend('PATH', fs.parent(git.full_path())) 198 + endif 199 + 200 + if get_option('sane_tool_path') != '' 201 + script_environment.prepend('PATH', get_option('sane_tool_path')) 202 + endif 203 + 204 + compiler = meson.get_compiler('c') 205 + 206 + libgit_sources = [ 207 + 'abspath.c', 208 + 'add-interactive.c', 209 + 'add-patch.c', 210 + 'advice.c', 211 + 'alias.c', 212 + 'alloc.c', 213 + 'apply.c', 214 + 'archive-tar.c', 215 + 'archive-zip.c', 216 + 'archive.c', 217 + 'attr.c', 218 + 'base85.c', 219 + 'bisect.c', 220 + 'blame.c', 221 + 'blob.c', 222 + 'bloom.c', 223 + 'branch.c', 224 + 'bulk-checkin.c', 225 + 'bundle-uri.c', 226 + 'bundle.c', 227 + 'cache-tree.c', 228 + 'cbtree.c', 229 + 'chdir-notify.c', 230 + 'checkout.c', 231 + 'chunk-format.c', 232 + 'color.c', 233 + 'column.c', 234 + 'combine-diff.c', 235 + 'commit-graph.c', 236 + 'commit-reach.c', 237 + 'commit.c', 238 + 'compat/nonblock.c', 239 + 'compat/obstack.c', 240 + 'compat/terminal.c', 241 + 'compat/zlib-uncompress2.c', 242 + 'config.c', 243 + 'connect.c', 244 + 'connected.c', 245 + 'convert.c', 246 + 'copy.c', 247 + 'credential.c', 248 + 'csum-file.c', 249 + 'ctype.c', 250 + 'date.c', 251 + 'decorate.c', 252 + 'delta-islands.c', 253 + 'diagnose.c', 254 + 'diff-delta.c', 255 + 'diff-merges.c', 256 + 'diff-lib.c', 257 + 'diff-no-index.c', 258 + 'diff.c', 259 + 'diffcore-break.c', 260 + 'diffcore-delta.c', 261 + 'diffcore-order.c', 262 + 'diffcore-pickaxe.c', 263 + 'diffcore-rename.c', 264 + 'diffcore-rotate.c', 265 + 'dir-iterator.c', 266 + 'dir.c', 267 + 'editor.c', 268 + 'entry.c', 269 + 'environment.c', 270 + 'ewah/bitmap.c', 271 + 'ewah/ewah_bitmap.c', 272 + 'ewah/ewah_io.c', 273 + 'ewah/ewah_rlw.c', 274 + 'exec-cmd.c', 275 + 'fetch-negotiator.c', 276 + 'fetch-pack.c', 277 + 'fmt-merge-msg.c', 278 + 'fsck.c', 279 + 'fsmonitor.c', 280 + 'fsmonitor-ipc.c', 281 + 'fsmonitor-settings.c', 282 + 'gettext.c', 283 + 'git-zlib.c', 284 + 'gpg-interface.c', 285 + 'graph.c', 286 + 'grep.c', 287 + 'hash-lookup.c', 288 + 'hashmap.c', 289 + 'help.c', 290 + 'hex.c', 291 + 'hex-ll.c', 292 + 'hook.c', 293 + 'ident.c', 294 + 'json-writer.c', 295 + 'kwset.c', 296 + 'levenshtein.c', 297 + 'line-log.c', 298 + 'line-range.c', 299 + 'linear-assignment.c', 300 + 'list-objects-filter-options.c', 301 + 'list-objects-filter.c', 302 + 'list-objects.c', 303 + 'lockfile.c', 304 + 'log-tree.c', 305 + 'loose.c', 306 + 'ls-refs.c', 307 + 'mailinfo.c', 308 + 'mailmap.c', 309 + 'match-trees.c', 310 + 'mem-pool.c', 311 + 'merge-blobs.c', 312 + 'merge-ll.c', 313 + 'merge-ort.c', 314 + 'merge-ort-wrappers.c', 315 + 'merge-recursive.c', 316 + 'merge.c', 317 + 'midx.c', 318 + 'midx-write.c', 319 + 'name-hash.c', 320 + 'negotiator/default.c', 321 + 'negotiator/noop.c', 322 + 'negotiator/skipping.c', 323 + 'notes-cache.c', 324 + 'notes-merge.c', 325 + 'notes-utils.c', 326 + 'notes.c', 327 + 'object-file-convert.c', 328 + 'object-file.c', 329 + 'object-name.c', 330 + 'object.c', 331 + 'oid-array.c', 332 + 'oidmap.c', 333 + 'oidset.c', 334 + 'oidtree.c', 335 + 'pack-bitmap-write.c', 336 + 'pack-bitmap.c', 337 + 'pack-check.c', 338 + 'pack-mtimes.c', 339 + 'pack-objects.c', 340 + 'pack-revindex.c', 341 + 'pack-write.c', 342 + 'packfile.c', 343 + 'pager.c', 344 + 'parallel-checkout.c', 345 + 'parse.c', 346 + 'parse-options-cb.c', 347 + 'parse-options.c', 348 + 'patch-delta.c', 349 + 'patch-ids.c', 350 + 'path.c', 351 + 'pathspec.c', 352 + 'pkt-line.c', 353 + 'preload-index.c', 354 + 'pretty.c', 355 + 'prio-queue.c', 356 + 'progress.c', 357 + 'promisor-remote.c', 358 + 'prompt.c', 359 + 'protocol.c', 360 + 'protocol-caps.c', 361 + 'prune-packed.c', 362 + 'pseudo-merge.c', 363 + 'quote.c', 364 + 'range-diff.c', 365 + 'reachable.c', 366 + 'read-cache.c', 367 + 'rebase-interactive.c', 368 + 'rebase.c', 369 + 'ref-filter.c', 370 + 'reflog-walk.c', 371 + 'reflog.c', 372 + 'refs.c', 373 + 'refs/debug.c', 374 + 'refs/files-backend.c', 375 + 'refs/reftable-backend.c', 376 + 'refs/iterator.c', 377 + 'refs/packed-backend.c', 378 + 'refs/ref-cache.c', 379 + 'refspec.c', 380 + 'reftable/basics.c', 381 + 'reftable/error.c', 382 + 'reftable/block.c', 383 + 'reftable/blocksource.c', 384 + 'reftable/iter.c', 385 + 'reftable/merged.c', 386 + 'reftable/pq.c', 387 + 'reftable/reader.c', 388 + 'reftable/record.c', 389 + 'reftable/stack.c', 390 + 'reftable/system.c', 391 + 'reftable/tree.c', 392 + 'reftable/writer.c', 393 + 'remote.c', 394 + 'replace-object.c', 395 + 'repo-settings.c', 396 + 'repository.c', 397 + 'rerere.c', 398 + 'reset.c', 399 + 'resolve-undo.c', 400 + 'revision.c', 401 + 'run-command.c', 402 + 'send-pack.c', 403 + 'sequencer.c', 404 + 'serve.c', 405 + 'server-info.c', 406 + 'setup.c', 407 + 'shallow.c', 408 + 'sideband.c', 409 + 'sigchain.c', 410 + 'sparse-index.c', 411 + 'split-index.c', 412 + 'stable-qsort.c', 413 + 'statinfo.c', 414 + 'strbuf.c', 415 + 'streaming.c', 416 + 'string-list.c', 417 + 'strmap.c', 418 + 'strvec.c', 419 + 'sub-process.c', 420 + 'submodule-config.c', 421 + 'submodule.c', 422 + 'symlinks.c', 423 + 'tag.c', 424 + 'tempfile.c', 425 + 'thread-utils.c', 426 + 'tmp-objdir.c', 427 + 'trace.c', 428 + 'trace2.c', 429 + 'trace2/tr2_cfg.c', 430 + 'trace2/tr2_cmd_name.c', 431 + 'trace2/tr2_ctr.c', 432 + 'trace2/tr2_dst.c', 433 + 'trace2/tr2_sid.c', 434 + 'trace2/tr2_sysenv.c', 435 + 'trace2/tr2_tbuf.c', 436 + 'trace2/tr2_tgt_event.c', 437 + 'trace2/tr2_tgt_normal.c', 438 + 'trace2/tr2_tgt_perf.c', 439 + 'trace2/tr2_tls.c', 440 + 'trace2/tr2_tmr.c', 441 + 'trailer.c', 442 + 'transport-helper.c', 443 + 'transport.c', 444 + 'tree-diff.c', 445 + 'tree-walk.c', 446 + 'tree.c', 447 + 'unpack-trees.c', 448 + 'upload-pack.c', 449 + 'url.c', 450 + 'urlmatch.c', 451 + 'usage.c', 452 + 'userdiff.c', 453 + 'utf8.c', 454 + 'varint.c', 455 + 'versioncmp.c', 456 + 'walker.c', 457 + 'wildmatch.c', 458 + 'worktree.c', 459 + 'wrapper.c', 460 + 'write-or-die.c', 461 + 'ws.c', 462 + 'wt-status.c', 463 + 'xdiff-interface.c', 464 + 'xdiff/xdiffi.c', 465 + 'xdiff/xemit.c', 466 + 'xdiff/xhistogram.c', 467 + 'xdiff/xmerge.c', 468 + 'xdiff/xpatience.c', 469 + 'xdiff/xprepare.c', 470 + 'xdiff/xutils.c', 471 + ] 472 + 473 + builtin_sources = [ 474 + 'builtin/add.c', 475 + 'builtin/am.c', 476 + 'builtin/annotate.c', 477 + 'builtin/apply.c', 478 + 'builtin/archive.c', 479 + 'builtin/bisect.c', 480 + 'builtin/blame.c', 481 + 'builtin/branch.c', 482 + 'builtin/bugreport.c', 483 + 'builtin/bundle.c', 484 + 'builtin/cat-file.c', 485 + 'builtin/check-attr.c', 486 + 'builtin/check-ignore.c', 487 + 'builtin/check-mailmap.c', 488 + 'builtin/check-ref-format.c', 489 + 'builtin/checkout--worker.c', 490 + 'builtin/checkout-index.c', 491 + 'builtin/checkout.c', 492 + 'builtin/clean.c', 493 + 'builtin/clone.c', 494 + 'builtin/column.c', 495 + 'builtin/commit-graph.c', 496 + 'builtin/commit-tree.c', 497 + 'builtin/commit.c', 498 + 'builtin/config.c', 499 + 'builtin/count-objects.c', 500 + 'builtin/credential-cache--daemon.c', 501 + 'builtin/credential-cache.c', 502 + 'builtin/credential-store.c', 503 + 'builtin/credential.c', 504 + 'builtin/describe.c', 505 + 'builtin/diagnose.c', 506 + 'builtin/diff-files.c', 507 + 'builtin/diff-index.c', 508 + 'builtin/diff-tree.c', 509 + 'builtin/diff.c', 510 + 'builtin/difftool.c', 511 + 'builtin/fast-export.c', 512 + 'builtin/fast-import.c', 513 + 'builtin/fetch-pack.c', 514 + 'builtin/fetch.c', 515 + 'builtin/fmt-merge-msg.c', 516 + 'builtin/for-each-ref.c', 517 + 'builtin/for-each-repo.c', 518 + 'builtin/fsck.c', 519 + 'builtin/fsmonitor--daemon.c', 520 + 'builtin/gc.c', 521 + 'builtin/get-tar-commit-id.c', 522 + 'builtin/grep.c', 523 + 'builtin/hash-object.c', 524 + 'builtin/help.c', 525 + 'builtin/hook.c', 526 + 'builtin/index-pack.c', 527 + 'builtin/init-db.c', 528 + 'builtin/interpret-trailers.c', 529 + 'builtin/log.c', 530 + 'builtin/ls-files.c', 531 + 'builtin/ls-remote.c', 532 + 'builtin/ls-tree.c', 533 + 'builtin/mailinfo.c', 534 + 'builtin/mailsplit.c', 535 + 'builtin/merge-base.c', 536 + 'builtin/merge-file.c', 537 + 'builtin/merge-index.c', 538 + 'builtin/merge-ours.c', 539 + 'builtin/merge-recursive.c', 540 + 'builtin/merge-tree.c', 541 + 'builtin/merge.c', 542 + 'builtin/mktag.c', 543 + 'builtin/mktree.c', 544 + 'builtin/multi-pack-index.c', 545 + 'builtin/mv.c', 546 + 'builtin/name-rev.c', 547 + 'builtin/notes.c', 548 + 'builtin/pack-objects.c', 549 + 'builtin/pack-redundant.c', 550 + 'builtin/pack-refs.c', 551 + 'builtin/patch-id.c', 552 + 'builtin/prune-packed.c', 553 + 'builtin/prune.c', 554 + 'builtin/pull.c', 555 + 'builtin/push.c', 556 + 'builtin/range-diff.c', 557 + 'builtin/read-tree.c', 558 + 'builtin/rebase.c', 559 + 'builtin/receive-pack.c', 560 + 'builtin/reflog.c', 561 + 'builtin/refs.c', 562 + 'builtin/remote-ext.c', 563 + 'builtin/remote-fd.c', 564 + 'builtin/remote.c', 565 + 'builtin/repack.c', 566 + 'builtin/replace.c', 567 + 'builtin/replay.c', 568 + 'builtin/rerere.c', 569 + 'builtin/reset.c', 570 + 'builtin/rev-list.c', 571 + 'builtin/rev-parse.c', 572 + 'builtin/revert.c', 573 + 'builtin/rm.c', 574 + 'builtin/send-pack.c', 575 + 'builtin/shortlog.c', 576 + 'builtin/show-branch.c', 577 + 'builtin/show-index.c', 578 + 'builtin/show-ref.c', 579 + 'builtin/sparse-checkout.c', 580 + 'builtin/stash.c', 581 + 'builtin/stripspace.c', 582 + 'builtin/submodule--helper.c', 583 + 'builtin/symbolic-ref.c', 584 + 'builtin/tag.c', 585 + 'builtin/unpack-file.c', 586 + 'builtin/unpack-objects.c', 587 + 'builtin/update-index.c', 588 + 'builtin/update-ref.c', 589 + 'builtin/update-server-info.c', 590 + 'builtin/upload-archive.c', 591 + 'builtin/upload-pack.c', 592 + 'builtin/var.c', 593 + 'builtin/verify-commit.c', 594 + 'builtin/verify-pack.c', 595 + 'builtin/verify-tag.c', 596 + 'builtin/worktree.c', 597 + 'builtin/write-tree.c', 598 + ] 599 + 600 + libgit_sources += custom_target( 601 + input: 'command-list.txt', 602 + output: 'command-list.h', 603 + command: [shell, meson.current_source_dir() + '/generate-cmdlist.sh', meson.current_source_dir(), '@OUTPUT@'], 604 + env: script_environment, 605 + ) 606 + 607 + libgit_sources += custom_target( 608 + output: 'config-list.h', 609 + command: [ 610 + shell, 611 + meson.current_source_dir() + '/generate-configlist.sh', 612 + meson.current_source_dir(), 613 + '@OUTPUT@', 614 + ], 615 + env: script_environment, 616 + ) 617 + 618 + libgit_sources += custom_target( 619 + input: 'Documentation/githooks.txt', 620 + output: 'hook-list.h', 621 + command: [ 622 + shell, 623 + meson.current_source_dir() + '/generate-hooklist.sh', 624 + meson.current_source_dir(), 625 + '@OUTPUT@', 626 + ], 627 + env: script_environment, 628 + ) 629 + 630 + # This contains the variables for GIT-BUILD-OPTIONS, which we use to propagate 631 + # build options to our tests. 632 + build_options_config = configuration_data() 633 + build_options_config.set('GIT_INTEROP_MAKE_OPTS', '') 634 + build_options_config.set('GIT_PERF_LARGE_REPO', '') 635 + build_options_config.set('GIT_PERF_MAKE_COMMAND', '') 636 + build_options_config.set('GIT_PERF_MAKE_OPTS', '') 637 + build_options_config.set('GIT_PERF_REPEAT_COUNT', '') 638 + build_options_config.set('GIT_PERF_REPO', '') 639 + build_options_config.set('GIT_TEST_CMP_USE_COPIED_CONTEXT', '') 640 + build_options_config.set('GIT_TEST_INDEX_VERSION', '') 641 + build_options_config.set('GIT_TEST_OPTS', '') 642 + build_options_config.set('GIT_TEST_PERL_FATAL_WARNINGS', '') 643 + build_options_config.set('GIT_TEST_UTF8_LOCALE', '') 644 + build_options_config.set_quoted('LOCALEDIR', fs.as_posix(get_option('prefix') / get_option('localedir'))) 645 + build_options_config.set('GITWEBDIR', fs.as_posix(get_option('prefix') / get_option('datadir') / 'gitweb')) 646 + 647 + if get_option('sane_tool_path') != '' 648 + build_options_config.set_quoted('BROKEN_PATH_FIX', 's|^\# @BROKEN_PATH_FIX@$|git_broken_path_fix "' + get_option('sane_tool_path') + '"|') 649 + else 650 + build_options_config.set_quoted('BROKEN_PATH_FIX', '/^\# @BROKEN_PATH_FIX@$/d') 651 + endif 652 + 653 + test_output_directory = get_option('test_output_directory') 654 + if test_output_directory == '' 655 + test_output_directory = meson.project_build_root() / 'test-output' 656 + endif 657 + 658 + # These variables are used for building libgit.a. 659 + libgit_c_args = [ 660 + '-DBINDIR="' + get_option('bindir') + '"', 661 + '-DDEFAULT_EDITOR="' + get_option('default_editor') + '"', 662 + '-DDEFAULT_GIT_TEMPLATE_DIR="' + get_option('datadir') / 'git-core/templates' + '"', 663 + '-DDEFAULT_HELP_FORMAT="' + get_option('default_help_format') + '"', 664 + '-DDEFAULT_PAGER="' + get_option('default_pager') + '"', 665 + '-DETC_GITATTRIBUTES="' + get_option('gitattributes') + '"', 666 + '-DETC_GITCONFIG="' + get_option('gitconfig') + '"', 667 + '-DFALLBACK_RUNTIME_PREFIX="' + get_option('prefix') + '"', 668 + '-DGIT_EXEC_PATH="' + get_option('prefix') / get_option('libexecdir') / 'git-core"', 669 + '-DGIT_HOST_CPU="' + host_machine.cpu_family() + '"', 670 + '-DGIT_HTML_PATH="' + get_option('datadir') / 'doc/git-doc"', 671 + '-DGIT_INFO_PATH="' + get_option('infodir') + '"', 672 + '-DGIT_LOCALE_PATH="' + get_option('localedir') + '"', 673 + '-DGIT_MAN_PATH="' + get_option('mandir') + '"', 674 + '-DPAGER_ENV="' + get_option('pager_environment') + '"', 675 + '-DSHELL_PATH="' + fs.as_posix(shell.full_path()) + '"', 676 + ] 677 + libgit_include_directories = [ '.' ] 678 + libgit_dependencies = [ ] 679 + 680 + # Treat any warning level above 1 the same as we treat DEVELOPER=1 in our 681 + # Makefile. 682 + if get_option('warning_level') in ['2','3', 'everything'] and compiler.get_argument_syntax() == 'gcc' 683 + foreach cflag : [ 684 + '-Wdeclaration-after-statement', 685 + '-Wformat-security', 686 + '-Wold-style-definition', 687 + '-Woverflow', 688 + '-Wpointer-arith', 689 + '-Wstrict-prototypes', 690 + '-Wunused', 691 + '-Wvla', 692 + '-Wwrite-strings', 693 + '-fno-common', 694 + '-Wtautological-constant-out-of-range-compare', 695 + # If a function is public, there should be a prototype and the right 696 + # header file should be included. If not, it should be static. 697 + '-Wmissing-prototypes', 698 + # These are disabled because we have these all over the place. 699 + '-Wno-empty-body', 700 + '-Wno-missing-field-initializers', 701 + '-Wno-sign-compare', 702 + ] 703 + if compiler.has_argument(cflag) 704 + libgit_c_args += cflag 705 + endif 706 + endforeach 707 + endif 708 + 709 + if get_option('b_sanitize').contains('address') 710 + build_options_config.set('SANITIZE_ADDRESS', 'YesCompiledWithIt') 711 + else 712 + build_options_config.set('SANITIZE_ADDRESS', '') 713 + endif 714 + if get_option('b_sanitize').contains('leak') 715 + libgit_c_args += '-DSUPPRESS_ANNOTATED_LEAKS' 716 + build_options_config.set('SANITIZE_LEAK', 'YesCompiledWithIt') 717 + else 718 + build_options_config.set('SANITIZE_LEAK', '') 719 + endif 720 + if get_option('b_sanitize').contains('undefined') 721 + libgit_c_args += '-DSHA1DC_FORCE_ALIGNED_ACCESS' 722 + endif 723 + 724 + executable_suffix = '' 725 + if host_machine.system() == 'cygwin' or host_machine.system() == 'windows' 726 + executable_suffix = '.exe' 727 + libgit_c_args += '-DSTRIP_EXTENSION="' + executable_suffix + '"' 728 + endif 729 + build_options_config.set_quoted('X', executable_suffix) 730 + 731 + python = import('python').find_installation('python3', required: get_option('python')) 732 + if python.found() 733 + build_options_config.set('NO_PYTHON', '') 734 + else 735 + libgit_c_args += '-DNO_PYTHON' 736 + build_options_config.set('NO_PYTHON', '1') 737 + endif 738 + 739 + # Perl is used for two different things: our test harness and to provide some 740 + # features. It is optional if you want to neither execute tests nor use any of 741 + # these optional features. 742 + perl_required = get_option('perl') 743 + if get_option('tests') 744 + perl_required = true 745 + endif 746 + 747 + # Note that we only set NO_PERL if the Perl features were disabled by the user. 748 + # It may not be set when we have found Perl, but only use it to run tests. 749 + perl = find_program('perl', version: '>=5.8.1', dirs: program_path, required: perl_required) 750 + perl_features_enabled = perl.found() and get_option('perl').allowed() 751 + if perl_features_enabled 752 + build_options_config.set('NO_PERL', '') 753 + 754 + if get_option('runtime_prefix') 755 + build_options_config.set('PERL_LOCALEDIR', '') 756 + else 757 + build_options_config.set_quoted('PERL_LOCALEDIR', fs.as_posix(get_option('prefix') / get_option('localedir'))) 758 + endif 759 + 760 + if get_option('perl_cpan_fallback') 761 + build_options_config.set('NO_PERL_CPAN_FALLBACKS', '') 762 + else 763 + build_options_config.set_quoted('NO_PERL_CPAN_FALLBACKS', 'YesPlease') 764 + endif 765 + else 766 + libgit_c_args += '-DNO_PERL' 767 + build_options_config.set('NO_PERL', '1') 768 + build_options_config.set('PERL_LOCALEDIR', '') 769 + build_options_config.set('NO_PERL_CPAN_FALLBACKS', '') 770 + endif 771 + 772 + zlib = dependency('zlib', default_options: ['default_library=static', 'tests=disabled']) 773 + if zlib.version().version_compare('<1.2.0') 774 + libgit_c_args += '-DNO_DEFLATE_BOUND' 775 + endif 776 + libgit_dependencies += zlib 777 + 778 + threads = dependency('threads', required: false) 779 + if threads.found() 780 + libgit_dependencies += threads 781 + build_options_config.set('NO_PTHREADS', '') 782 + else 783 + libgit_c_args += '-DNO_PTHREADS' 784 + build_options_config.set('NO_PTHREADS', '1') 785 + endif 786 + 787 + msgfmt = find_program('msgfmt', dirs: program_path, required: false) 788 + gettext_option = get_option('gettext').disable_auto_if(not msgfmt.found()) 789 + if not msgfmt.found() and gettext_option.enabled() 790 + error('Internationalization via libintl requires msgfmt') 791 + endif 792 + 793 + if gettext_option.allowed() and host_machine.system() == 'darwin' and get_option('macos_use_homebrew_gettext') 794 + if host_machine.cpu_family() == 'x86_64' 795 + libintl_prefix = '/usr/local' 796 + elif host_machine.cpu_family() == 'aarch64' 797 + libintl_prefix = '/opt/homebrew' 798 + else 799 + error('Homebrew workaround not supported on current architecture') 800 + endif 801 + 802 + intl = compiler.find_library('intl', dirs: libintl_prefix / 'lib', required: gettext_option) 803 + if intl.found() 804 + intl = declare_dependency( 805 + dependencies: intl, 806 + include_directories: libintl_prefix / 'include', 807 + ) 808 + endif 809 + else 810 + intl = dependency('intl', required: gettext_option) 811 + endif 812 + if intl.found() 813 + libgit_dependencies += intl 814 + build_options_config.set('NO_GETTEXT', '') 815 + build_options_config.set('USE_GETTEXT_SCHEME', '') 816 + 817 + # POSIX nowadays requires `nl_langinfo()`, but some systems still don't have 818 + # the function available. On such systems we instead fall back to libcharset. 819 + # On native Windows systems we use our own emulation. 820 + if host_machine.system() != 'windows' and not compiler.has_function('nl_langinfo') 821 + libcharset = compiler.find_library('charset', required: true) 822 + libgit_dependencies += libcharset 823 + libgit_c_args += '-DHAVE_LIBCHARSET_H' 824 + endif 825 + else 826 + libgit_c_args += '-DNO_GETTEXT' 827 + build_options_config.set('NO_GETTEXT', '1') 828 + build_options_config.set('USE_GETTEXT_SCHEME', 'fallthrough') 829 + endif 830 + 831 + iconv = dependency('iconv', required: get_option('iconv')) 832 + if iconv.found() 833 + libgit_dependencies += iconv 834 + build_options_config.set('NO_ICONV', '') 835 + 836 + have_old_iconv = false 837 + if not compiler.compiles(''' 838 + #include <iconv.h> 839 + 840 + extern size_t iconv(iconv_t cd, 841 + char **inbuf, size_t *inbytesleft, 842 + char **outbuf, size_t *outbytesleft); 843 + ''', name: 'old iconv interface', dependencies: [iconv]) 844 + libgit_c_args += '-DOLD_ICONV' 845 + have_old_iconv = true 846 + endif 847 + 848 + iconv_omits_bom_source = '''# 849 + #include <iconv.h> 850 + 851 + int main(int argc, const char **argv) 852 + { 853 + ''' 854 + if have_old_iconv 855 + iconv_omits_bom_source += ''' 856 + typedef const char *iconv_ibp; 857 + ''' 858 + else 859 + iconv_omits_bom_source += ''' 860 + typedef char *iconv_ibp; 861 + ''' 862 + endif 863 + iconv_omits_bom_source += ''' 864 + int v; 865 + iconv_t conv; 866 + char in[] = "a"; iconv_ibp pin = in; 867 + char out[20] = ""; char *pout = out; 868 + size_t isz = sizeof in; 869 + size_t osz = sizeof out; 870 + 871 + conv = iconv_open("UTF-16", "UTF-8"); 872 + iconv(conv, &pin, &isz, &pout, &osz); 873 + iconv_close(conv); 874 + v = (unsigned char)(out[0]) + (unsigned char)(out[1]); 875 + return v != 0xfe + 0xff; 876 + } 877 + ''' 878 + 879 + if compiler.run(iconv_omits_bom_source, 880 + dependencies: iconv, 881 + name: 'iconv omits BOM', 882 + ).returncode() != 0 883 + libgit_c_args += '-DICONV_OMITS_BOM' 884 + endif 885 + else 886 + libgit_c_args += '-DNO_ICONV' 887 + build_options_config.set('NO_ICONV', '1') 888 + endif 889 + 890 + pcre2 = dependency('libpcre2-8', required: get_option('pcre2'), default_options: ['default_library=static', 'test=false']) 891 + if pcre2.found() 892 + libgit_dependencies += pcre2 893 + libgit_c_args += '-DUSE_LIBPCRE2' 894 + build_options_config.set('USE_LIBPCRE2', '1') 895 + else 896 + build_options_config.set('USE_LIBPCRE2', '') 897 + endif 898 + 899 + curl = dependency('libcurl', version: '>=7.21.3', required: get_option('curl'), default_options: ['default_library=static', 'tests=disabled', 'tool=disabled']) 900 + use_curl_for_imap_send = false 901 + if curl.found() 902 + if curl.version().version_compare('>=7.34.0') 903 + libgit_c_args += '-DUSE_CURL_FOR_IMAP_SEND' 904 + use_curl_for_imap_send = true 905 + endif 906 + 907 + libgit_dependencies += curl 908 + libgit_c_args += '-DCURL_DISABLE_TYPECHECK' 909 + build_options_config.set('NO_CURL', '') 910 + else 911 + libgit_c_args += '-DNO_CURL' 912 + build_options_config.set('NO_CURL', '1') 913 + endif 914 + 915 + expat = dependency('expat', required: get_option('expat'), default_options: ['default_library=static', 'build_tests=false']) 916 + if expat.found() 917 + libgit_dependencies += expat 918 + 919 + if expat.version().version_compare('<=1.2') 920 + libgit_c_args += '-DEXPAT_NEEDS_XMLPARSE_H' 921 + endif 922 + build_options_config.set('NO_EXPAT', '') 923 + else 924 + libgit_c_args += '-DNO_EXPAT' 925 + build_options_config.set('NO_EXPAT', '1') 926 + endif 927 + 928 + if not compiler.has_header('sys/select.h') 929 + libgit_c_args += '-DNO_SYS_SELECT_H' 930 + endif 931 + 932 + has_poll_h = compiler.has_header('poll.h') 933 + if not has_poll_h 934 + libgit_c_args += '-DNO_POLL_H' 935 + endif 936 + 937 + has_sys_poll_h = compiler.has_header('sys/poll.h') 938 + if not has_sys_poll_h 939 + libgit_c_args += '-DNO_SYS_POLL_H' 940 + endif 941 + 942 + if not has_poll_h and not has_sys_poll_h 943 + libgit_c_args += '-DNO_POLL' 944 + libgit_sources += 'compat/poll/poll.c' 945 + libgit_include_directories += 'compat/poll' 946 + endif 947 + 948 + if not compiler.has_header('inttypes.h') 949 + libgit_c_args += '-DNO_INTTYPES_H' 950 + endif 951 + 952 + if compiler.has_header('alloca.h') 953 + libgit_c_args += '-DHAVE_ALLOCA_H' 954 + endif 955 + 956 + if compiler.has_header('sys/sysinfo.h') 957 + libgit_c_args += '-DHAVE_SYSINFO' 958 + endif 959 + 960 + # Windows has libgen.h and a basename implementation, but we still need our own 961 + # implementation to threat things like drive prefixes specially. 962 + if host_machine.system() == 'windows' or not compiler.has_header('libgen.h') 963 + libgit_c_args += '-DNO_LIBGEN_H' 964 + libgit_sources += 'compat/basename.c' 965 + endif 966 + 967 + if compiler.has_header('paths.h') 968 + libgit_c_args += '-DHAVE_PATHS_H' 969 + endif 970 + 971 + if compiler.has_header('strings.h') 972 + libgit_c_args += '-DHAVE_STRINGS_H' 973 + endif 974 + 975 + networking_dependencies = [ ] 976 + if host_machine.system() == 'windows' 977 + winsock = compiler.find_library('ws2_32', required: false) 978 + if winsock.found() 979 + networking_dependencies += winsock 980 + endif 981 + else 982 + libresolv = compiler.find_library('resolv', required: false) 983 + if libresolv.found() 984 + networking_dependencies += libresolv 985 + endif 986 + endif 987 + libgit_dependencies += networking_dependencies 988 + 989 + foreach symbol : ['inet_ntop', 'inet_pton', 'strerror'] 990 + if not compiler.has_function(symbol, dependencies: networking_dependencies) 991 + libgit_c_args += '-DNO_' + symbol.to_upper() 992 + endif 993 + endforeach 994 + 995 + has_ipv6 = compiler.has_function('getaddrinfo', dependencies: networking_dependencies) 996 + if not has_ipv6 997 + libgit_c_args += '-DNO_IPV6' 998 + endif 999 + 1000 + if not compiler.compiles(''' 1001 + #ifdef _WIN32 1002 + # include <winsock2.h> 1003 + #else 1004 + # include <sys/types.h> 1005 + # include <sys/socket.h> 1006 + #endif 1007 + 1008 + void func(void) 1009 + { 1010 + struct sockaddr_storage x; 1011 + } 1012 + ''', name: 'struct sockaddr_storage') 1013 + if has_ipv6 1014 + libgit_c_args += '-Dsockaddr_storage=sockaddr_in6' 1015 + else 1016 + libgit_c_args += '-Dsockaddr_storage=sockaddr_in' 1017 + endif 1018 + endif 1019 + 1020 + if compiler.has_function('socket', dependencies: networking_dependencies) 1021 + libgit_sources += [ 1022 + 'unix-socket.c', 1023 + 'unix-stream-server.c', 1024 + ] 1025 + build_options_config.set('NO_UNIX_SOCKETS', '') 1026 + else 1027 + libgit_c_args += '-DNO_UNIX_SOCKETS' 1028 + build_options_config.set('NO_UNIX_SOCKETS', '1') 1029 + endif 1030 + 1031 + if not compiler.has_function('pread') 1032 + libgit_c_args += '-DNO_PREAD' 1033 + libgit_sources += 'compat/pread.c' 1034 + endif 1035 + 1036 + if host_machine.system() == 'darwin' 1037 + libgit_sources += 'compat/precompose_utf8.c' 1038 + libgit_c_args += '-DPRECOMPOSE_UNICODE' 1039 + libgit_c_args += '-DPROTECT_HFS_DEFAULT' 1040 + endif 1041 + 1042 + # Configure general compatibility wrappers. 1043 + if host_machine.system() == 'cygwin' 1044 + libgit_sources += [ 1045 + 'compat/win32/path-utils.c', 1046 + ] 1047 + elif host_machine.system() == 'windows' 1048 + libgit_sources += [ 1049 + 'compat/mingw.c', 1050 + 'compat/winansi.c', 1051 + 'compat/win32/flush.c', 1052 + 'compat/win32/path-utils.c', 1053 + 'compat/win32/pthread.c', 1054 + 'compat/win32/syslog.c', 1055 + 'compat/win32/dirent.c', 1056 + 'compat/win32mmap.c', 1057 + 'compat/nedmalloc/nedmalloc.c', 1058 + ] 1059 + 1060 + libgit_c_args += [ 1061 + '-DDETECT_MSYS_TTY', 1062 + '-DENSURE_MSYSTEM_IS_SET', 1063 + '-DNATIVE_CRLF', 1064 + '-DNOGDI', 1065 + '-DNO_POSIX_GOODIES', 1066 + '-DWIN32', 1067 + '-D_CONSOLE', 1068 + '-D_CONSOLE_DETECT_MSYS_TTY', 1069 + '-D__USE_MINGW_ANSI_STDIO=0', 1070 + ] 1071 + 1072 + libgit_dependencies += compiler.find_library('ntdll') 1073 + libgit_include_directories += 'compat/win32' 1074 + if compiler.get_id() == 'msvc' 1075 + libgit_include_directories += 'compat/vcbuild/include' 1076 + endif 1077 + endif 1078 + 1079 + if host_machine.system() == 'linux' 1080 + libgit_sources += 'compat/linux/procinfo.c' 1081 + elif host_machine.system() == 'windows' 1082 + libgit_sources += 'compat/win32/trace2_win32_process_info.c' 1083 + else 1084 + libgit_sources += 'compat/stub/procinfo.c' 1085 + endif 1086 + 1087 + if host_machine.system() == 'cygwin' or host_machine.system() == 'windows' 1088 + libgit_c_args += [ 1089 + '-DUNRELIABLE_FSTAT', 1090 + '-DMMAP_PREVENTS_DELETE', 1091 + '-DOBJECT_CREATION_MODE=1', 1092 + ] 1093 + endif 1094 + 1095 + # Configure the simple-ipc subsystem required fro the fsmonitor. 1096 + if host_machine.system() == 'windows' 1097 + libgit_sources += [ 1098 + 'compat/simple-ipc/ipc-shared.c', 1099 + 'compat/simple-ipc/ipc-win32.c', 1100 + ] 1101 + libgit_c_args += '-DSUPPORTS_SIMPLE_IPC' 1102 + else 1103 + libgit_sources += [ 1104 + 'compat/simple-ipc/ipc-shared.c', 1105 + 'compat/simple-ipc/ipc-unix-socket.c', 1106 + ] 1107 + libgit_c_args += '-DSUPPORTS_SIMPLE_IPC' 1108 + endif 1109 + 1110 + fsmonitor_backend = '' 1111 + if host_machine.system() == 'windows' 1112 + fsmonitor_backend = 'win32' 1113 + elif host_machine.system() == 'darwin' 1114 + fsmonitor_backend = 'darwin' 1115 + libgit_dependencies += dependency('CoreServices') 1116 + endif 1117 + if fsmonitor_backend != '' 1118 + libgit_c_args += '-DHAVE_FSMONITOR_DAEMON_BACKEND' 1119 + libgit_c_args += '-DHAVE_FSMONITOR_OS_SETTINGS' 1120 + 1121 + libgit_sources += [ 1122 + 'compat/fsmonitor/fsm-health-' + fsmonitor_backend + '.c', 1123 + 'compat/fsmonitor/fsm-ipc-' + fsmonitor_backend + '.c', 1124 + 'compat/fsmonitor/fsm-listen-' + fsmonitor_backend + '.c', 1125 + 'compat/fsmonitor/fsm-path-utils-' + fsmonitor_backend + '.c', 1126 + 'compat/fsmonitor/fsm-settings-' + fsmonitor_backend + '.c', 1127 + ] 1128 + endif 1129 + build_options_config.set_quoted('FSMONITOR_DAEMON_BACKEND', fsmonitor_backend) 1130 + build_options_config.set_quoted('FSMONITOR_OS_SETTINGS', fsmonitor_backend) 1131 + 1132 + if not get_option('b_sanitize').contains('address') and get_option('regex').allowed() and compiler.has_header('regex.h') and compiler.get_define('REG_STARTEND', prefix: '#include <regex.h>') != '' 1133 + build_options_config.set('NO_REGEX', '') 1134 + 1135 + if compiler.get_define('REG_ENHANCED', prefix: '#include <regex.h>') != '' 1136 + libgit_c_args += '-DUSE_ENHANCED_BASIC_REGULAR_EXPRESSIONS' 1137 + libgit_sources += 'compat/regcomp_enhanced.c' 1138 + endif 1139 + elif not get_option('regex').enabled() 1140 + libgit_c_args += [ 1141 + '-DNO_REGEX', 1142 + '-DGAWK', 1143 + '-DNO_MBSUPPORT', 1144 + ] 1145 + build_options_config.set('NO_REGEX', '1') 1146 + libgit_sources += 'compat/regex/regex.c' 1147 + libgit_include_directories += 'compat/regex' 1148 + else 1149 + error('Native regex support requested but not found') 1150 + endif 1151 + 1152 + # setitimer and friends are provided by compat/mingw.c. 1153 + if host_machine.system() != 'windows' 1154 + if not compiler.compiles(''' 1155 + #include <sys/time.h> 1156 + void func(void) 1157 + { 1158 + struct itimerval value; 1159 + } 1160 + ''', name: 'struct itimerval') 1161 + libgit_c_args += '-DNO_STRUCT_ITIMERVAL' 1162 + libgit_c_args += '-DNO_SETITIMER' 1163 + elif not compiler.has_function('setitimer') 1164 + libgit_c_args += '-DNO_SETITIMER' 1165 + endif 1166 + endif 1167 + 1168 + if compiler.has_member('struct stat', 'st_mtimespec.tv_nsec', prefix: '#include <sys/stat.h>') 1169 + libgit_c_args += '-DUSE_ST_TIMESPEC' 1170 + elif not compiler.has_member('struct stat', 'st_mtim.tv_nsec', prefix: '#include <sys/stat.h>') 1171 + libgit_c_args += '-DNO_NSEC' 1172 + endif 1173 + 1174 + if not compiler.has_member('struct stat', 'st_blocks', prefix: '#include <sys/stat.h>') 1175 + libgit_c_args += '-DNO_ST_BLOCKS_IN_STRUCT_STAT' 1176 + endif 1177 + 1178 + if not compiler.has_member('struct dirent', 'd_type', prefix: '#include <dirent.h>') 1179 + libgit_c_args += '-DNO_D_TYPE_IN_DIRENT' 1180 + endif 1181 + 1182 + if not compiler.has_member('struct passwd', 'pw_gecos', prefix: '#include <pwd.h>') 1183 + libgit_c_args += '-DNO_GECOS_IN_PWENT' 1184 + endif 1185 + 1186 + if compiler.has_function('sync_file_range') 1187 + libgit_c_args += '-DHAVE_SYNC_FILE_RANGE' 1188 + endif 1189 + 1190 + if not compiler.has_function('strcasestr') 1191 + libgit_c_args += '-DNO_STRCASESTR' 1192 + libgit_sources += 'compat/strcasestr.c' 1193 + endif 1194 + 1195 + if not compiler.has_function('memmem') 1196 + libgit_c_args += '-DNO_MEMMEM' 1197 + libgit_sources += 'compat/memmem.c' 1198 + endif 1199 + 1200 + if not compiler.has_function('strlcpy') 1201 + libgit_c_args += '-DNO_STRLCPY' 1202 + libgit_sources += 'compat/strlcpy.c' 1203 + endif 1204 + 1205 + if not compiler.has_function('strdup') 1206 + libgit_c_args += '-DOVERRIDE_STRDUP' 1207 + libgit_sources += 'compat/strdup.c' 1208 + endif 1209 + 1210 + if not compiler.has_function('strtoumax') 1211 + libgit_c_args += '-DNO_STRTOUMAX' 1212 + libgit_sources += [ 1213 + 'compat/strtoumax.c', 1214 + 'compat/strtoimax.c', 1215 + ] 1216 + endif 1217 + 1218 + if not compiler.has_function('strtoull') 1219 + libgit_c_args += '-DNO_STRTOULL' 1220 + endif 1221 + 1222 + if not compiler.has_function('setenv') 1223 + libgit_c_args += '-DNO_SETENV' 1224 + libgit_sources += 'compat/setenv.c' 1225 + endif 1226 + 1227 + if not compiler.has_function('qsort') 1228 + libgit_c_args += '-DINTERNAL_QSORT' 1229 + endif 1230 + libgit_sources += 'compat/qsort_s.c' 1231 + 1232 + # unsetenv is provided by compat/mingw.c. 1233 + if host_machine.system() != 'windows' and not compiler.has_function('unsetenv') 1234 + libgit_c_args += '-DNO_UNSETENV' 1235 + libgit_sources += 'compat/unsetenv.c' 1236 + endif 1237 + 1238 + if not compiler.has_function('mkdtemp') 1239 + libgit_c_args += '-DNO_MKDTEMP' 1240 + libgit_sources += 'compat/mkdtemp.c' 1241 + endif 1242 + 1243 + if not compiler.has_function('initgroups') 1244 + libgit_c_args += '-DNO_INITGROUPS' 1245 + endif 1246 + 1247 + if compiler.has_function('getdelim') 1248 + libgit_c_args += '-DHAVE_GETDELIM' 1249 + endif 1250 + 1251 + if host_machine.system() == 'windows' 1252 + libgit_c_args += '-DUSE_WIN32_MMAP' 1253 + elif not compiler.has_function('mmap') 1254 + libgit_c_args += '-DNO_MMAP' 1255 + libgit_sources += 'compat/mmap.c' 1256 + endif 1257 + 1258 + if compiler.has_function('clock_gettime') 1259 + libgit_c_args += '-DHAVE_CLOCK_GETTIME' 1260 + endif 1261 + 1262 + if compiler.compiles(''' 1263 + #include <time.h> 1264 + 1265 + void func(void) 1266 + { 1267 + clockid_t id = CLOCK_MONOTONIC; 1268 + } 1269 + ''', name: 'monotonic clock') 1270 + libgit_c_args += '-DHAVE_CLOCK_MONOTONIC' 1271 + endif 1272 + 1273 + if not compiler.compiles(''' 1274 + #include <inttypes.h> 1275 + 1276 + void func(void) 1277 + { 1278 + uintmax_t x = 0; 1279 + } 1280 + ''', name: 'uintmax_t') 1281 + libgit_c_args += '-DNO_UINTMAX_T' 1282 + endif 1283 + 1284 + has_bsd_sysctl = false 1285 + if compiler.has_header('sys/sysctl.h') 1286 + if compiler.compiles(''' 1287 + #include <stddef.h> 1288 + #include <sys/sysctl.h> 1289 + 1290 + void func(void) 1291 + { 1292 + int val, mib[2] = { 0 }; 1293 + size_t len = sizeof(val); 1294 + sysctl(mib, 2, &val, &len, NULL, 0); 1295 + } 1296 + ''', name: 'BSD sysctl') 1297 + libgit_c_args += '-DHAVE_BSD_SYSCTL' 1298 + has_bsd_sysctl = true 1299 + endif 1300 + endif 1301 + 1302 + if not meson.is_cross_build() and compiler.run(''' 1303 + #include <stdio.h> 1304 + 1305 + int main(int argc, const char **argv) 1306 + { 1307 + FILE *f = fopen(".", "r"); 1308 + return f ? 0 : 1; 1309 + } 1310 + ''', name: 'fread reads directories').returncode() == 0 1311 + libgit_c_args += '-DFREAD_READS_DIRECTORIES' 1312 + libgit_sources += 'compat/fopen.c' 1313 + endif 1314 + 1315 + if not meson.is_cross_build() and fs.exists('/dev/tty') 1316 + libgit_c_args += '-DHAVE_DEV_TTY' 1317 + endif 1318 + 1319 + https_backend = get_option('https_backend') 1320 + 1321 + security_framework = dependency('Security', required: https_backend == 'CommonCrypto') 1322 + core_foundation_framework = dependency('CoreFoundation', required: security_framework.found()) 1323 + if https_backend == 'auto' and security_framework.found() 1324 + https_backend = 'CommonCrypto' 1325 + endif 1326 + 1327 + openssl_required = https_backend == 'openssl' or get_option('sha1_backend') == 'openssl' or get_option('sha256_backend') == 'openssl' 1328 + openssl = dependency('openssl', required: openssl_required, default_options: ['default_library=static']) 1329 + if https_backend == 'auto' and openssl.found() 1330 + https_backend = 'openssl' 1331 + endif 1332 + 1333 + if https_backend == 'CommonCrypto' 1334 + libgit_dependencies += security_framework 1335 + libgit_dependencies += core_foundation_framework 1336 + libgit_c_args += '-DAPPLE_COMMON_CRYPTO' 1337 + elif https_backend == 'openssl' 1338 + libgit_dependencies += openssl 1339 + else 1340 + # We either couldn't find any dependencies with 'auto' or the user requested 1341 + # 'none'. Both cases are benign. 1342 + endif 1343 + 1344 + if https_backend != 'openssl' 1345 + libgit_c_args += '-DNO_OPENSSL' 1346 + endif 1347 + 1348 + sha1_backend = get_option('sha1_backend') 1349 + if sha1_backend == 'sha1dc' 1350 + libgit_c_args += '-DSHA1_DC' 1351 + libgit_c_args += '-DSHA1DC_NO_STANDARD_INCLUDES=1' 1352 + libgit_c_args += '-DSHA1DC_INIT_SAFE_HASH_DEFAULT=0' 1353 + libgit_c_args += '-DSHA1DC_CUSTOM_INCLUDE_SHA1_C="git-compat-util.h"' 1354 + libgit_c_args += '-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="git-compat-util.h"' 1355 + 1356 + libgit_sources += [ 1357 + 'sha1dc_git.c', 1358 + 'sha1dc/sha1.c', 1359 + 'sha1dc/ubc_check.c', 1360 + ] 1361 + elif sha1_backend == 'common-crypto' 1362 + libgit_c_args += '-DCOMMON_DIGEST_FOR_OPENSSL' 1363 + libgit_c_args += '-DSHA1_APPLE' 1364 + # Apple CommonCrypto requires chunking 1365 + libgit_c_args += '-DSHA1_MAX_BLOCK_SIZE=1024L*1024L*1024L' 1366 + elif sha1_backend == 'openssl' 1367 + libgit_c_args += '-DSHA1_OPENSSL' 1368 + libgit_dependencies += openssl 1369 + elif sha1_backend == 'block' 1370 + libgit_c_args += '-DSHA1_BLK' 1371 + libgit_sources += 'block-sha1/sha1.c' 1372 + else 1373 + error('Unhandled SHA1 backend ' + sha1_backend) 1374 + endif 1375 + 1376 + sha256_backend = get_option('sha256_backend') 1377 + if sha256_backend == 'openssl' 1378 + libgit_c_args += '-DSHA256_OPENSSL' 1379 + libgit_dependencies += openssl 1380 + elif sha256_backend == 'nettle' 1381 + nettle = dependency('nettle') 1382 + libgit_dependencies += nettle 1383 + libgit_c_args += '-DSHA256_NETTLE' 1384 + elif sha256_backend == 'gcrypt' 1385 + gcrypt = dependency('gcrypt') 1386 + libgit_dependencies += gcrypt 1387 + libgit_c_args += '-DSHA256_GCRYPT' 1388 + elif sha256_backend == 'block' 1389 + libgit_c_args += '-DSHA256_BLK' 1390 + libgit_sources += 'sha256/block/sha256.c' 1391 + else 1392 + error('Unhandled SHA256 backend ' + sha256_backend) 1393 + endif 1394 + 1395 + if compiler.has_header_symbol('stdlib.h', 'arc4random_buf') 1396 + libgit_c_args += '-DHAVE_ARC4RANDOM' 1397 + elif compiler.has_header_symbol('bsd/stdlib.h', 'arc4random_buf') 1398 + libgit_c_args += '-DHAVE_ARC4RANDOM_BSD' 1399 + elif compiler.has_function('getrandom', prefix: '#include <sys/random.h>') 1400 + libgit_c_args += '-DHAVE_GETRANDOM' 1401 + elif compiler.has_function('getentropy', prefix: '#include <unistd.h>') 1402 + libgit_c_args += '-DHAVE_GETENTROPY' 1403 + elif compiler.has_function('RtlGenRandom', prefix: '#include <windows.h>\n#include <ntsecapi.h>') 1404 + libgit_c_args += '-DHAVE_RTLGENRANDOM' 1405 + elif openssl.found() 1406 + libgit_c_args += '-DHAVE_OPENSSL_CSPRNG' 1407 + endif 1408 + 1409 + if get_option('runtime_prefix') 1410 + libgit_c_args += '-DRUNTIME_PREFIX' 1411 + build_options_config.set('RUNTIME_PREFIX', 'true') 1412 + 1413 + if compiler.has_header('mach-o/dyld.h') 1414 + libgit_c_args += '-DHAVE_NS_GET_EXECUTABLE_PATH' 1415 + endif 1416 + 1417 + if has_bsd_sysctl and compiler.compiles(''' 1418 + #include <sys/sysctl.h> 1419 + 1420 + void func(void) 1421 + { 1422 + KERN_PROC_PATHNAME; KERN_PROC; 1423 + } 1424 + ''', name: 'BSD KERN_PROC_PATHNAME') 1425 + libgit_c_args += '-DHAVE_NS_GET_EXECUTABLE_PATH' 1426 + endif 1427 + 1428 + if host_machine.system() == 'linux' 1429 + libgit_c_args += '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe' + '"' 1430 + elif host_machine.system() == 'openbsd' 1431 + libgit_c_args += '-DPROCFS_EXECUTABLE_PATH="' + '/proc/curproc/file' + '"' 1432 + elif host_machine.system() == 'netbsd' 1433 + libgit_c_args += '-DPROCFS_EXECUTABLE_PATH="' + '/proc/curproc/exe' + '"' 1434 + endif 1435 + 1436 + if host_machine.system() == 'windows' and compiler.compiles(''' 1437 + #include <stdlib.h> 1438 + 1439 + void func(void) 1440 + { 1441 + _wpgmptr; 1442 + } 1443 + ''', name: 'Win32 _wpgmptr') 1444 + libgit_c_args += '-DHAVE_WPGMPTR' 1445 + endif 1446 + else 1447 + build_options_config.set('RUNTIME_PREFIX', 'false') 1448 + endif 1449 + 1450 + foreach key, value : { 1451 + 'DIFF': diff.full_path(), 1452 + 'GIT_TEST_CMP': diff.full_path() + ' -u', 1453 + 'GIT_TEST_GITPERLLIB': meson.project_build_root() / 'perl', 1454 + 'GIT_TEST_MERGE_TOOLS_DIR': meson.project_source_root() / 'mergetools', 1455 + 'GIT_TEST_POPATH': meson.project_source_root() / 'po', 1456 + 'GIT_TEST_TEMPLATE_DIR': meson.project_build_root() / 'templates', 1457 + 'GIT_TEST_TEXTDOMAINDIR': meson.project_build_root() / 'po', 1458 + 'PAGER_ENV': get_option('pager_environment'), 1459 + 'PERL_PATH': perl.found() ? perl.full_path() : '', 1460 + 'PYTHON_PATH': python.found () ? python.full_path() : '', 1461 + 'SHELL_PATH': shell.full_path(), 1462 + 'TAR': tar.full_path(), 1463 + 'TEST_OUTPUT_DIRECTORY': test_output_directory, 1464 + 'TEST_SHELL_PATH': shell.full_path(), 1465 + } 1466 + if value != '' and cygpath.found() 1467 + value = run_command(cygpath, value, check: true).stdout().strip() 1468 + endif 1469 + build_options_config.set_quoted(key, value) 1470 + endforeach 1471 + 1472 + configure_file( 1473 + input: 'GIT-BUILD-OPTIONS.in', 1474 + output: 'GIT-BUILD-OPTIONS', 1475 + configuration: build_options_config, 1476 + ) 1477 + 1478 + git_version_file = custom_target( 1479 + command: [ 1480 + shell, 1481 + meson.current_source_dir() / 'GIT-VERSION-GEN', 1482 + meson.current_source_dir(), 1483 + '@INPUT@', 1484 + '@OUTPUT@', 1485 + ], 1486 + input: meson.current_source_dir() / 'GIT-VERSION-FILE.in', 1487 + output: 'GIT-VERSION-FILE', 1488 + build_always_stale: true, 1489 + ) 1490 + 1491 + version_def_h = custom_target( 1492 + command: [ 1493 + shell, 1494 + meson.current_source_dir() / 'GIT-VERSION-GEN', 1495 + meson.current_source_dir(), 1496 + '@INPUT@', 1497 + '@OUTPUT@', 1498 + ], 1499 + input: meson.current_source_dir() / 'version-def.h.in', 1500 + output: 'version-def.h', 1501 + # Depend on GIT-VERSION-FILE so that we don't always try to rebuild this 1502 + # target for the same commit. 1503 + depends: [git_version_file], 1504 + ) 1505 + 1506 + # Build a separate library for "version.c" so that we do not have to rebuild 1507 + # everything when the current Git commit changes. 1508 + libgit_version_library = static_library('git-version', 1509 + sources: [ 1510 + 'version.c', 1511 + version_def_h, 1512 + ], 1513 + c_args: libgit_c_args, 1514 + dependencies: libgit_dependencies, 1515 + include_directories: libgit_include_directories, 1516 + ) 1517 + 1518 + libgit_library = static_library('git', 1519 + sources: libgit_sources, 1520 + c_args: libgit_c_args, 1521 + link_with: libgit_version_library, 1522 + dependencies: libgit_dependencies, 1523 + include_directories: libgit_include_directories, 1524 + ) 1525 + 1526 + libgit = declare_dependency( 1527 + compile_args: libgit_c_args, 1528 + link_with: libgit_library, 1529 + dependencies: libgit_dependencies, 1530 + include_directories: libgit_include_directories, 1531 + ) 1532 + 1533 + common_main_sources = ['common-main.c'] 1534 + common_main_link_args = [ ] 1535 + if host_machine.system() == 'windows' 1536 + git_rc = custom_target( 1537 + command: [ 1538 + shell, 1539 + meson.current_source_dir() / 'GIT-VERSION-GEN', 1540 + meson.current_source_dir(), 1541 + '@INPUT@', 1542 + '@OUTPUT@', 1543 + ], 1544 + input: meson.current_source_dir() / 'git.rc.in', 1545 + output: 'git.rc', 1546 + depends: [git_version_file], 1547 + ) 1548 + 1549 + common_main_sources += import('windows').compile_resources(git_rc, 1550 + include_directories: [meson.current_source_dir()], 1551 + ) 1552 + if compiler.get_argument_syntax() == 'gcc' 1553 + common_main_link_args += [ 1554 + '-municode', 1555 + '-Wl,-nxcompat', 1556 + '-Wl,-dynamicbase', 1557 + '-Wl,-pic-executable,-e,mainCRTStartup', 1558 + ] 1559 + elif compiler.get_argument_syntax() == 'msvc' 1560 + common_main_link_args += [ 1561 + '/ENTRY:wmainCRTStartup', 1562 + 'invalidcontinue.obj', 1563 + ] 1564 + else 1565 + error('Unsupported compiler ' + compiler.get_id()) 1566 + endif 1567 + endif 1568 + common_main_library = static_library('common-main', 1569 + sources: common_main_sources, 1570 + c_args: libgit_c_args, 1571 + dependencies: libgit_dependencies, 1572 + include_directories: libgit_include_directories, 1573 + ) 1574 + common_main = declare_dependency( 1575 + link_with: common_main_library, 1576 + link_args: common_main_link_args, 1577 + ) 1578 + 1579 + bin_wrappers = [ ] 1580 + test_dependencies = [ ] 1581 + 1582 + git = executable('git', 1583 + sources: builtin_sources + 'git.c', 1584 + dependencies: [libgit, common_main], 1585 + install: true, 1586 + install_dir: get_option('libexecdir') / 'git-core', 1587 + ) 1588 + bin_wrappers += git 1589 + 1590 + test_dependencies += executable('git-daemon', 1591 + sources: 'daemon.c', 1592 + dependencies: [libgit, common_main], 1593 + install: true, 1594 + install_dir: get_option('libexecdir') / 'git-core', 1595 + ) 1596 + 1597 + test_dependencies += executable('git-sh-i18n--envsubst', 1598 + sources: 'sh-i18n--envsubst.c', 1599 + dependencies: [libgit, common_main], 1600 + install: true, 1601 + install_dir: get_option('libexecdir') / 'git-core', 1602 + ) 1603 + 1604 + bin_wrappers += executable('git-shell', 1605 + sources: 'shell.c', 1606 + dependencies: [libgit, common_main], 1607 + install: true, 1608 + install_dir: get_option('libexecdir') / 'git-core', 1609 + ) 1610 + 1611 + test_dependencies += executable('git-http-backend', 1612 + sources: 'http-backend.c', 1613 + dependencies: [libgit, common_main], 1614 + install: true, 1615 + install_dir: get_option('libexecdir') / 'git-core', 1616 + ) 1617 + 1618 + bin_wrappers += executable('scalar', 1619 + sources: 'scalar.c', 1620 + dependencies: [libgit, common_main], 1621 + install: true, 1622 + install_dir: get_option('libexecdir') / 'git-core', 1623 + ) 1624 + 1625 + if get_option('curl').enabled() 1626 + curl_sources = [ 1627 + 'http.c', 1628 + 'http-walker.c', 1629 + ] 1630 + 1631 + git_remote_http = executable('git-remote-http', 1632 + sources: curl_sources + 'remote-curl.c', 1633 + dependencies: [libgit, common_main], 1634 + install: true, 1635 + install_dir: get_option('libexecdir') / 'git-core', 1636 + ) 1637 + test_dependencies += git_remote_http 1638 + 1639 + test_dependencies += executable('git-http-fetch', 1640 + sources: curl_sources + 'http-fetch.c', 1641 + dependencies: [libgit, common_main], 1642 + install: true, 1643 + install_dir: get_option('libexecdir') / 'git-core', 1644 + ) 1645 + 1646 + if expat.found() 1647 + test_dependencies += executable('git-http-push', 1648 + sources: curl_sources + 'http-push.c', 1649 + dependencies: [libgit, common_main], 1650 + install: true, 1651 + install_dir: get_option('libexecdir') / 'git-core', 1652 + ) 1653 + endif 1654 + 1655 + foreach alias : [ 'git-remote-https', 'git-remote-ftp', 'git-remote-ftps' ] 1656 + test_dependencies += executable(alias, 1657 + objects: git_remote_http.extract_all_objects(recursive: false), 1658 + dependencies: [libgit, common_main], 1659 + ) 1660 + 1661 + install_symlink(alias + executable_suffix, 1662 + install_dir: get_option('libexecdir') / 'git-core', 1663 + pointing_to: 'git-remote-http', 1664 + ) 1665 + endforeach 1666 + endif 1667 + 1668 + imap_send_sources = ['imap-send.c'] 1669 + if use_curl_for_imap_send 1670 + imap_send_sources += curl_sources 1671 + endif 1672 + 1673 + test_dependencies += executable('git-imap-send', 1674 + sources: imap_send_sources, 1675 + dependencies: [libgit, common_main], 1676 + install: true, 1677 + install_dir: get_option('libexecdir') / 'git-core', 1678 + ) 1679 + 1680 + foreach alias : [ 'git-receive-pack', 'git-upload-archive', 'git-upload-pack' ] 1681 + bin_wrappers += executable(alias, 1682 + objects: git.extract_all_objects(recursive: false), 1683 + dependencies: [libgit, common_main], 1684 + ) 1685 + 1686 + install_symlink(alias + executable_suffix, 1687 + install_dir: get_option('libexecdir') / 'git-core', 1688 + pointing_to: 'git', 1689 + ) 1690 + endforeach 1691 + 1692 + foreach symlink : [ 1693 + 'git', 1694 + 'git-receive-pack', 1695 + 'git-shell', 1696 + 'git-upload-archive', 1697 + 'git-upload-pack', 1698 + 'scalar', 1699 + ] 1700 + if meson.version().version_compare('>=1.3.0') 1701 + pointing_to = fs.relative_to(get_option('libexecdir') / 'git-core' / symlink, get_option('bindir')) 1702 + else 1703 + pointing_to = '../libexec/git-core' / symlink 1704 + endif 1705 + 1706 + install_symlink(symlink, 1707 + install_dir: get_option('bindir'), 1708 + pointing_to: pointing_to, 1709 + ) 1710 + endforeach 1711 + 1712 + scripts_sh = [ 1713 + 'git-difftool--helper.sh', 1714 + 'git-filter-branch.sh', 1715 + 'git-merge-octopus.sh', 1716 + 'git-merge-one-file.sh', 1717 + 'git-merge-resolve.sh', 1718 + 'git-mergetool--lib.sh', 1719 + 'git-mergetool.sh', 1720 + 'git-quiltimport.sh', 1721 + 'git-request-pull.sh', 1722 + 'git-sh-i18n.sh', 1723 + 'git-sh-setup.sh', 1724 + 'git-submodule.sh', 1725 + 'git-web--browse.sh', 1726 + ] 1727 + if perl_features_enabled 1728 + scripts_sh += 'git-instaweb.sh' 1729 + endif 1730 + 1731 + foreach script : scripts_sh 1732 + test_dependencies += custom_target( 1733 + input: script, 1734 + output: fs.stem(script), 1735 + command: [ 1736 + shell, 1737 + meson.project_source_root() / 'generate-script.sh', 1738 + '@INPUT@', 1739 + '@OUTPUT@', 1740 + meson.project_build_root() / 'GIT-BUILD-OPTIONS', 1741 + ], 1742 + install: true, 1743 + install_dir: get_option('libexecdir') / 'git-core', 1744 + ) 1745 + endforeach 1746 + 1747 + if perl_features_enabled 1748 + scripts_perl = [ 1749 + 'git-archimport.perl', 1750 + 'git-cvsexportcommit.perl', 1751 + 'git-cvsimport.perl', 1752 + 'git-cvsserver.perl', 1753 + 'git-send-email.perl', 1754 + 'git-svn.perl', 1755 + ] 1756 + 1757 + pathsep = ':' 1758 + if host_machine.system() == 'windows' 1759 + pathsep = ';' 1760 + endif 1761 + 1762 + perl_header_template = 'perl/header_templates/fixed_prefix.template.pl' 1763 + if get_option('runtime_prefix') 1764 + perl_header_template = 'perl/header_templates/runtime_prefix.template.pl' 1765 + endif 1766 + 1767 + perl_header = configure_file( 1768 + input: perl_header_template, 1769 + output: 'GIT-PERL-HEADER', 1770 + configuration: { 1771 + 'GITEXECDIR_REL': get_option('libexecdir') / 'git-core', 1772 + 'PERLLIBDIR_REL': get_option('datadir') / 'perl5', 1773 + 'LOCALEDIR_REL': get_option('datadir') / 'locale', 1774 + 'INSTLIBDIR': get_option('datadir') / 'perl5', 1775 + 'PATHSEP': pathsep, 1776 + }, 1777 + ) 1778 + 1779 + generate_perl_command = [ 1780 + shell, 1781 + meson.project_source_root() / 'generate-perl.sh', 1782 + meson.project_build_root() / 'GIT-BUILD-OPTIONS', 1783 + git_version_file.full_path(), 1784 + perl_header, 1785 + '@INPUT@', 1786 + '@OUTPUT@', 1787 + ] 1788 + 1789 + foreach script : scripts_perl 1790 + generated_script = custom_target( 1791 + input: script, 1792 + output: fs.stem(script), 1793 + command: generate_perl_command, 1794 + install: true, 1795 + install_dir: get_option('libexecdir') / 'git-core', 1796 + depends: [git_version_file], 1797 + ) 1798 + test_dependencies += generated_script 1799 + 1800 + if script == 'git-cvsserver.perl' 1801 + bin_wrappers += generated_script 1802 + 1803 + if meson.version().version_compare('>=1.3.0') 1804 + pointing_to = fs.relative_to(get_option('libexecdir') / 'git-core' / fs.stem(script), get_option('bindir')) 1805 + else 1806 + pointing_to = '../libexec/git-core' / fs.stem(script) 1807 + endif 1808 + 1809 + install_symlink(fs.stem(script), 1810 + install_dir: get_option('bindir'), 1811 + pointing_to: pointing_to, 1812 + ) 1813 + endif 1814 + endforeach 1815 + 1816 + subdir('perl') 1817 + endif 1818 + 1819 + if python.found() 1820 + scripts_python = [ 1821 + 'git-p4.py' 1822 + ] 1823 + 1824 + foreach script : scripts_python 1825 + generated_python = custom_target( 1826 + input: script, 1827 + output: fs.stem(script), 1828 + command: [ 1829 + shell, 1830 + meson.project_source_root() / 'generate-python.sh', 1831 + meson.project_build_root() / 'GIT-BUILD-OPTIONS', 1832 + '@INPUT@', 1833 + '@OUTPUT@', 1834 + ], 1835 + install: true, 1836 + install_dir: get_option('libexecdir') / 'git-core', 1837 + ) 1838 + test_dependencies += generated_python 1839 + endforeach 1840 + endif 1841 + 1842 + mergetools = [ 1843 + 'mergetools/araxis', 1844 + 'mergetools/bc', 1845 + 'mergetools/codecompare', 1846 + 'mergetools/deltawalker', 1847 + 'mergetools/diffmerge', 1848 + 'mergetools/diffuse', 1849 + 'mergetools/ecmerge', 1850 + 'mergetools/emerge', 1851 + 'mergetools/examdiff', 1852 + 'mergetools/guiffy', 1853 + 'mergetools/gvimdiff', 1854 + 'mergetools/kdiff3', 1855 + 'mergetools/kompare', 1856 + 'mergetools/meld', 1857 + 'mergetools/nvimdiff', 1858 + 'mergetools/opendiff', 1859 + 'mergetools/p4merge', 1860 + 'mergetools/smerge', 1861 + 'mergetools/tkdiff', 1862 + 'mergetools/tortoisemerge', 1863 + 'mergetools/vimdiff', 1864 + 'mergetools/vscode', 1865 + 'mergetools/winmerge', 1866 + 'mergetools/xxdiff', 1867 + ] 1868 + 1869 + foreach mergetool : mergetools 1870 + install_data(mergetool, install_dir: get_option('libexecdir') / 'git-core' / 'mergetools') 1871 + endforeach 1872 + 1873 + if intl.found() 1874 + subdir('po') 1875 + endif 1876 + subdir('contrib') 1877 + subdir('gitweb') 1878 + subdir('templates') 1879 + 1880 + # Everything but the bin-wrappers need to come before this target such that we 1881 + # can properly set up test dependencies. The bin-wrappers themselves are set up 1882 + # at configuration time, so these are fine. 1883 + if get_option('tests') 1884 + subdir('t') 1885 + endif 1886 + 1887 + subdir('bin-wrappers') 1888 + if get_option('docs') != [] 1889 + subdir('Documentation') 1890 + endif 1891 + 1892 + summary({ 1893 + 'curl': curl.found(), 1894 + 'expat': expat.found(), 1895 + 'gettext': intl.found(), 1896 + 'https': https_backend, 1897 + 'iconv': iconv.found(), 1898 + 'pcre2': pcre2.found(), 1899 + 'perl': perl_features_enabled, 1900 + 'python': python.found(), 1901 + }, section: 'Auto-detected features')
+81
meson_options.txt
··· 1 + # Configuration for how Git behaves at runtime. 2 + option('default_pager', type: 'string', value: 'less', 3 + description: 'Fall-back pager.') 4 + option('default_editor', type: 'string', value: 'vi', 5 + description: 'Fall-back editor.') 6 + option('gitconfig', type: 'string', value: '/etc/gitconfig', 7 + description: 'Path to the global git configuration file.') 8 + option('gitattributes', type: 'string', value: '/etc/gitattributes', 9 + description: 'Path to the global git attributes file.') 10 + option('pager_environment', type: 'string', value: 'LESS=FRX LV=-c', 11 + description: 'Environment used when spawning the pager') 12 + option('perl_cpan_fallback', type: 'boolean', value: true, 13 + description: 'Install bundled copies of CPAN modules that serve as a fallback in case the modules are not available on the system.') 14 + option('runtime_prefix', type: 'boolean', value: false, 15 + description: 'Resolve ancillary tooling and support files relative to the location of the runtime binary instead of hard-coding them into the binary.') 16 + option('sane_tool_path', type: 'string', value: '', 17 + description: 'A colon-separated list of paths to prepend to PATH if your tools in /usr/bin are broken.') 18 + 19 + # Features supported by Git. 20 + option('curl', type: 'feature', value: 'enabled', 21 + description: 'Build helpers used to access remotes with the HTTP transport.') 22 + option('expat', type: 'feature', value: 'enabled', 23 + description: 'Build helpers used to push to remotes with the HTTP transport.') 24 + option('gettext', type: 'feature', value: 'auto', 25 + description: 'Build translation files.') 26 + option('iconv', type: 'feature', value: 'auto', 27 + description: 'Support reencoding strings with different encodings.') 28 + option('pcre2', type: 'feature', value: 'enabled', 29 + description: 'Support Perl-compatible regular expressions in e.g. git-grep(1).') 30 + option('perl', type: 'feature', value: 'auto', 31 + description: 'Build tools written in Perl.') 32 + option('python', type: 'feature', value: 'auto', 33 + description: 'Build tools written in Python.') 34 + option('regex', type: 'feature', value: 'auto', 35 + description: 'Use the system-provided regex library instead of the bundled one.') 36 + 37 + # Backends. 38 + option('https_backend', type: 'combo', value: 'auto', choices: ['auto', 'openssl', 'CommonCrypto', 'none'], 39 + description: 'The HTTPS backend to use when connecting to remotes.') 40 + option('sha1_backend', type: 'combo', choices: ['openssl', 'block', 'sha1dc', 'common-crypto'], value: 'sha1dc', 41 + description: 'The backend used for hashing objects with the SHA1 object format') 42 + option('sha256_backend', type: 'combo', choices: ['openssl', 'nettle', 'gcrypt', 'block'], value: 'block', 43 + description: 'The backend used for hashing objects with the SHA256 object format') 44 + 45 + # Build tweaks. 46 + option('macos_use_homebrew_gettext', type: 'boolean', value: true, 47 + description: 'Use gettext from Homebrew instead of the slightly-broken system-provided one.') 48 + 49 + # gitweb configuration. 50 + option('gitweb_config', type: 'string', value: 'gitweb_config.perl') 51 + option('gitweb_config_system', type: 'string', value: '/etc/gitweb.conf') 52 + option('gitweb_config_common', type: 'string', value: '/etc/gitweb-common.conf') 53 + option('gitweb_home_link_str', type: 'string', value: 'projects') 54 + option('gitweb_sitename', type: 'string', value: '') 55 + option('gitweb_projectroot', type: 'string', value: '/pub/git') 56 + option('gitweb_project_maxdepth', type: 'string', value: '2007') 57 + option('gitweb_export_ok', type: 'string', value: '') 58 + option('gitweb_strict_export', type: 'string', value: '') 59 + option('gitweb_base_url', type: 'string', value: '') 60 + option('gitweb_list', type: 'string', value: '') 61 + option('gitweb_hometext', type: 'string', value: 'indextext.html') 62 + option('gitweb_css', type: 'string', value: 'static/gitweb.css') 63 + option('gitweb_logo', type: 'string', value: 'static/git-logo.png') 64 + option('gitweb_favicon', type: 'string', value: 'static/git-favicon.png') 65 + option('gitweb_js', type: 'string', value: 'static/gitweb.js') 66 + option('gitweb_site_html_head_string', type: 'string', value: '') 67 + option('gitweb_site_header', type: 'string', value: '') 68 + option('gitweb_site_footer', type: 'string', value: '') 69 + option('highlight_bin', type: 'string', value: 'highlight') 70 + 71 + # Documentation. 72 + option('docs', type: 'array', choices: ['man', 'html'], value: [], 73 + description: 'Which documenattion formats to build and install.') 74 + option('default_help_format', type: 'combo', choices: ['man', 'html'], value: 'man', 75 + description: 'Default format used when executing git-help(1).') 76 + 77 + # Testing. 78 + option('tests', type: 'boolean', value: true, 79 + description: 'Enable building tests. This requires Perl, but is separate from the "perl" option such that you can build tests without Perl features enabled.') 80 + option('test_output_directory', type: 'string', 81 + description: 'Path to the directory used to store test outputs')
+7
perl/FromCPAN/Mail/meson.build
··· 1 + test_dependencies += custom_target( 2 + input: 'Address.pm', 3 + output: 'Address.pm', 4 + command: generate_perl_command, 5 + install: true, 6 + install_dir: get_option('datadir') / 'perl5/FromCPAN/Mail', 7 + )
+9
perl/FromCPAN/meson.build
··· 1 + test_dependencies += custom_target( 2 + input: 'Error.pm', 3 + output: 'Error.pm', 4 + command: generate_perl_command, 5 + install: true, 6 + install_dir: get_option('datadir') / 'perl5/FromCPAN', 7 + ) 8 + 9 + subdir('Mail')
+3 -3
perl/Git/I18N.pm
··· 20 20 # this "'@@' [...] '@@'" pattern. 21 21 use constant NO_GETTEXT_STR => '@@' . 'NO_GETTEXT' . '@@'; 22 22 use constant NO_GETTEXT => ( 23 - q[@@NO_GETTEXT@@] ne '' 23 + q[@NO_GETTEXT@] ne '' 24 24 and 25 - q[@@NO_GETTEXT@@] ne NO_GETTEXT_STR 25 + q[@NO_GETTEXT@] ne NO_GETTEXT_STR 26 26 ); 27 27 28 28 sub __bootstrap_locale_messages { 29 29 our $TEXTDOMAIN = 'git'; 30 - our $TEXTDOMAINDIR ||= $ENV{GIT_TEXTDOMAINDIR} || '@@LOCALEDIR@@'; 30 + our $TEXTDOMAINDIR ||= $ENV{GIT_TEXTDOMAINDIR} || '@LOCALEDIR@'; 31 31 die "NO_GETTEXT=" . NO_GETTEXT_STR if NO_GETTEXT; 32 32 33 33 require POSIX;
+3 -3
perl/Git/LoadCPAN.pm
··· 31 31 # Makefile, and allows for detecting whether the module is loaded from 32 32 # perl/Git as opposed to perl/build/Git, which is useful for one-off 33 33 # testing without having Error.pm et al installed. 34 - use constant NO_PERL_CPAN_FALLBACKS_STR => '@@' . 'NO_PERL_CPAN_FALLBACKS' . '@@'; 34 + use constant NO_PERL_CPAN_FALLBACKS_STR => '@' . 'NO_PERL_CPAN_FALLBACKS' . '@'; 35 35 use constant NO_PERL_CPAN_FALLBACKS => ( 36 - q[@@NO_PERL_CPAN_FALLBACKS@@] ne '' 36 + q[@NO_PERL_CPAN_FALLBACKS@] ne '' 37 37 and 38 - q[@@NO_PERL_CPAN_FALLBACKS@@] ne NO_PERL_CPAN_FALLBACKS_STR 38 + q[@NO_PERL_CPAN_FALLBACKS@] ne NO_PERL_CPAN_FALLBACKS_STR 39 39 ); 40 40 41 41 sub import {
+7
perl/Git/LoadCPAN/Mail/meson.build
··· 1 + test_dependencies += custom_target( 2 + input: 'Address.pm', 3 + output: 'Address.pm', 4 + command: generate_perl_command, 5 + install: true, 6 + install_dir: get_option('datadir') / 'perl5/Git/LoadCPAN/Mail', 7 + )
+9
perl/Git/LoadCPAN/meson.build
··· 1 + test_dependencies += custom_target( 2 + input: 'Error.pm', 3 + output: 'Error.pm', 4 + command: generate_perl_command, 5 + install: true, 6 + install_dir: get_option('datadir') / 'perl5/Git/LoadCPAN', 7 + ) 8 + 9 + subdir('Mail')
+7
perl/Git/SVN/Memoize/meson.build
··· 1 + test_dependencies += custom_target( 2 + input: 'YAML.pm', 3 + output: 'YAML.pm', 4 + command: generate_perl_command, 5 + install: true, 6 + install_dir: get_option('datadir') / 'perl5/Git/SVN', 7 + )
+20
perl/Git/SVN/meson.build
··· 1 + foreach source : [ 2 + 'Editor.pm', 3 + 'Fetcher.pm', 4 + 'GlobSpec.pm', 5 + 'Log.pm', 6 + 'Migration.pm', 7 + 'Prompt.pm', 8 + 'Ra.pm', 9 + 'Utils.pm', 10 + ] 11 + test_dependencies += custom_target( 12 + input: source, 13 + output: source, 14 + command: generate_perl_command, 15 + install: true, 16 + install_dir: get_option('datadir') / 'perl5/Git/SVN', 17 + ) 18 + endforeach 19 + 20 + subdir('Memoize')
+18
perl/Git/meson.build
··· 1 + foreach source : [ 2 + 'I18N.pm', 3 + 'IndexInfo.pm', 4 + 'LoadCPAN.pm', 5 + 'Packet.pm', 6 + 'SVN.pm', 7 + ] 8 + test_dependencies += custom_target( 9 + input: source, 10 + output: source, 11 + command: generate_perl_command, 12 + install: true, 13 + install_dir: get_option('datadir') / 'perl5/Git', 14 + ) 15 + endforeach 16 + 17 + subdir('LoadCPAN') 18 + subdir('SVN')
+1 -1
perl/header_templates/fixed_prefix.template.pl
··· 1 - use lib (split(/@@PATHSEP@@/, $ENV{GITPERLLIB} || '@@INSTLIBDIR@@')); 1 + use lib (split(/@PATHSEP@/, $ENV{GITPERLLIB} || '@INSTLIBDIR@'));
+4 -4
perl/header_templates/runtime_prefix.template.pl
··· 3 3 # This finds our Git::* libraries relative to the script's runtime path. 4 4 sub __git_system_path { 5 5 my ($relpath) = @_; 6 - my $gitexecdir_relative = '@@GITEXECDIR_REL@@'; 6 + my $gitexecdir_relative = '@GITEXECDIR_REL@'; 7 7 8 8 # GIT_EXEC_PATH is supplied by `git` or the test suite. 9 9 my $exec_path; ··· 24 24 } 25 25 26 26 BEGIN { 27 - use lib split /@@PATHSEP@@/, 27 + use lib split /@PATHSEP@/, 28 28 ( 29 29 $ENV{GITPERLLIB} || 30 30 do { 31 - my $perllibdir = __git_system_path('@@PERLLIBDIR_REL@@'); 31 + my $perllibdir = __git_system_path('@PERLLIBDIR_REL@'); 32 32 (-e $perllibdir) || die("Invalid system path ($relpath): $path"); 33 33 $perllibdir; 34 34 } ··· 36 36 37 37 # Export the system locale directory to the I18N module. The locale directory 38 38 # is only installed if NO_GETTEXT is set. 39 - $Git::I18N::TEXTDOMAINDIR = __git_system_path('@@LOCALEDIR_REL@@'); 39 + $Git::I18N::TEXTDOMAINDIR = __git_system_path('@LOCALEDIR_REL@'); 40 40 } 41 41 42 42 # END RUNTIME_PREFIX generated code.
+12
perl/meson.build
··· 1 + test_dependencies += custom_target( 2 + input: 'Git.pm', 3 + output: 'Git.pm', 4 + command: generate_perl_command, 5 + install: true, 6 + install_dir: get_option('datadir') / 'perl5', 7 + ) 8 + 9 + subdir('Git') 10 + if get_option('perl_cpan_fallback') 11 + subdir('FromCPAN') 12 + endif
+27
po/meson.build
··· 1 + i18n = import('i18n') 2 + 3 + translations = i18n.gettext('git', 4 + languages: [ 5 + 'bg', 6 + 'ca', 7 + 'de', 8 + 'el', 9 + 'es', 10 + 'fr', 11 + 'id', 12 + 'is', 13 + 'it', 14 + 'ko', 15 + 'pl', 16 + 'pt_PT', 17 + 'ru', 18 + 'sv', 19 + 'tr', 20 + 'uk', 21 + 'vi', 22 + 'zh_CN', 23 + 'zh_TW', 24 + ], 25 + install: true, 26 + ) 27 + test_dependencies += translations[0]
+1
subprojects/.gitignore
··· 1 + /*/
+13
subprojects/curl.wrap
··· 1 + [wrap-file] 2 + directory = curl-8.10.1 3 + source_url = https://github.com/curl/curl/releases/download/curl-8_10_1/curl-8.10.1.tar.xz 4 + source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/curl_8.10.1-1/curl-8.10.1.tar.xz 5 + source_filename = curl-8.10.1.tar.xz 6 + source_hash = 73a4b0e99596a09fa5924a4fb7e4b995a85fda0d18a2c02ab9cf134bebce04ee 7 + patch_filename = curl_8.10.1-1_patch.zip 8 + patch_url = https://wrapdb.mesonbuild.com/v2/curl_8.10.1-1/get_patch 9 + patch_hash = 707c28f35fc9b0e8d68c0c2800712007612f922a31da9637ce706a2159f3ddd8 10 + wrapdb_version = 8.10.1-1 11 + 12 + [provide] 13 + dependency_names = libcurl
+13
subprojects/expat.wrap
··· 1 + [wrap-file] 2 + directory = expat-2.6.3 3 + source_url = https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz 4 + source_filename = expat-2.6.3.tar.bz2 5 + source_hash = 274db254a6979bde5aad404763a704956940e465843f2a9bd9ed7af22e2c0efc 6 + patch_filename = expat_2.6.3-1_patch.zip 7 + patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.6.3-1/get_patch 8 + patch_hash = cf017fbe105e31428b2768360bd9be39094df4e948a1e8d1c54b6f7c76460cb1 9 + source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.6.3-1/expat-2.6.3.tar.bz2 10 + wrapdb_version = 2.6.3-1 11 + 12 + [provide] 13 + expat = expat_dep
+15
subprojects/openssl.wrap
··· 1 + [wrap-file] 2 + directory = openssl-3.0.8 3 + source_url = https://www.openssl.org/source/openssl-3.0.8.tar.gz 4 + source_filename = openssl-3.0.8.tar.gz 5 + source_hash = 6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e 6 + patch_filename = openssl_3.0.8-3_patch.zip 7 + patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.8-3/get_patch 8 + patch_hash = 300da189e106942347d61a4a4295aa2edbcf06184f8d13b4cee0bed9fb936963 9 + source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.8-3/openssl-3.0.8.tar.gz 10 + wrapdb_version = 3.0.8-3 11 + 12 + [provide] 13 + libcrypto = libcrypto_dep 14 + libssl = libssl_dep 15 + openssl = openssl_dep
+16
subprojects/pcre2.wrap
··· 1 + [wrap-file] 2 + directory = pcre2-10.44 3 + source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.tar.bz2 4 + source_filename = pcre2-10.44.tar.bz2 5 + source_hash = d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96 6 + patch_filename = pcre2_10.44-2_patch.zip 7 + patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.44-2/get_patch 8 + patch_hash = 4336d422ee9043847e5e10dbbbd01940d4c9e5027f31ccdc33a7898a1ca94009 9 + source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.44-2/pcre2-10.44.tar.bz2 10 + wrapdb_version = 10.44-2 11 + 12 + [provide] 13 + libpcre2-8 = libpcre2_8 14 + libpcre2-16 = libpcre2_16 15 + libpcre2-32 = libpcre2_32 16 + libpcre2-posix = libpcre2_posix
+13
subprojects/zlib.wrap
··· 1 + [wrap-file] 2 + directory = zlib-1.3.1 3 + source_url = http://zlib.net/fossils/zlib-1.3.1.tar.gz 4 + source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.3.1-1/zlib-1.3.1.tar.gz 5 + source_filename = zlib-1.3.1.tar.gz 6 + source_hash = 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 7 + patch_filename = zlib_1.3.1-1_patch.zip 8 + patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.1-1/get_patch 9 + patch_hash = e79b98eb24a75392009cec6f99ca5cdca9881ff20bfa174e8b8926d5c7a47095 10 + wrapdb_version = 1.3.1-1 11 + 12 + [provide] 13 + zlib = zlib_dep
+91
t/helper/meson.build
··· 1 + test_tool_sources = [ 2 + '../unit-tests/test-lib.c', 3 + 'test-advise.c', 4 + 'test-bitmap.c', 5 + 'test-bloom.c', 6 + 'test-bundle-uri.c', 7 + 'test-cache-tree.c', 8 + 'test-chmtime.c', 9 + 'test-config.c', 10 + 'test-crontab.c', 11 + 'test-csprng.c', 12 + 'test-date.c', 13 + 'test-delete-gpgsig.c', 14 + 'test-delta.c', 15 + 'test-dir-iterator.c', 16 + 'test-drop-caches.c', 17 + 'test-dump-cache-tree.c', 18 + 'test-dump-fsmonitor.c', 19 + 'test-dump-split-index.c', 20 + 'test-dump-untracked-cache.c', 21 + 'test-env-helper.c', 22 + 'test-example-tap.c', 23 + 'test-find-pack.c', 24 + 'test-fsmonitor-client.c', 25 + 'test-genrandom.c', 26 + 'test-genzeros.c', 27 + 'test-getcwd.c', 28 + 'test-hash-speed.c', 29 + 'test-hash.c', 30 + 'test-hashmap.c', 31 + 'test-hexdump.c', 32 + 'test-json-writer.c', 33 + 'test-lazy-init-name-hash.c', 34 + 'test-match-trees.c', 35 + 'test-mergesort.c', 36 + 'test-mktemp.c', 37 + 'test-online-cpus.c', 38 + 'test-pack-mtimes.c', 39 + 'test-parse-options.c', 40 + 'test-parse-pathspec-file.c', 41 + 'test-partial-clone.c', 42 + 'test-path-utils.c', 43 + 'test-pcre2-config.c', 44 + 'test-pkt-line.c', 45 + 'test-proc-receive.c', 46 + 'test-progress.c', 47 + 'test-reach.c', 48 + 'test-read-cache.c', 49 + 'test-read-graph.c', 50 + 'test-read-midx.c', 51 + 'test-ref-store.c', 52 + 'test-reftable.c', 53 + 'test-regex.c', 54 + 'test-repository.c', 55 + 'test-revision-walking.c', 56 + 'test-rot13-filter.c', 57 + 'test-run-command.c', 58 + 'test-scrap-cache-tree.c', 59 + 'test-serve-v2.c', 60 + 'test-sha1.c', 61 + 'test-sha256.c', 62 + 'test-sigchain.c', 63 + 'test-simple-ipc.c', 64 + 'test-string-list.c', 65 + 'test-submodule-config.c', 66 + 'test-submodule-nested-repo-config.c', 67 + 'test-submodule.c', 68 + 'test-subprocess.c', 69 + 'test-tool.c', 70 + 'test-trace2.c', 71 + 'test-truncate.c', 72 + 'test-userdiff.c', 73 + 'test-wildmatch.c', 74 + 'test-windows-named-pipe.c', 75 + 'test-write-cache.c', 76 + 'test-xml-encode.c', 77 + ] 78 + 79 + test_tool = executable('test-tool', 80 + sources: test_tool_sources, 81 + dependencies: [libgit, common_main], 82 + ) 83 + bin_wrappers += test_tool 84 + test_dependencies += test_tool 85 + 86 + test_fake_ssh = executable('test-fake-ssh', 87 + sources: 'test-fake-ssh.c', 88 + dependencies: [libgit, common_main], 89 + ) 90 + bin_wrappers += test_fake_ssh 91 + test_dependencies += test_fake_ssh
+2 -2
t/lib-gettext.sh
··· 6 6 7 7 . ./test-lib.sh 8 8 9 - GIT_TEXTDOMAINDIR="$GIT_BUILD_DIR/po/build/locale" 10 - GIT_PO_PATH="$GIT_BUILD_DIR/po" 9 + GIT_TEXTDOMAINDIR="$GIT_TEST_TEXTDOMAINDIR" 10 + GIT_PO_PATH="$GIT_TEST_POPATH" 11 11 export GIT_TEXTDOMAINDIR GIT_PO_PATH 12 12 13 13 if test -n "$GIT_TEST_INSTALLED"
+1114
t/meson.build
··· 1 + clar_test_suites = [ 2 + 'unit-tests/ctype.c', 3 + 'unit-tests/strvec.c', 4 + ] 5 + 6 + clar_sources = [ 7 + 'unit-tests/clar/clar.c', 8 + 'unit-tests/unit-test.c', 9 + ] 10 + 11 + clar_decls_h = custom_target( 12 + input: clar_test_suites, 13 + output: 'clar-decls.h', 14 + command : [ 15 + shell, 16 + meson.current_source_dir() + '/unit-tests/generate-clar-decls.sh', 17 + '@OUTPUT@', 18 + '@INPUT@', 19 + ], 20 + env: script_environment, 21 + ) 22 + clar_sources += clar_decls_h 23 + 24 + clar_sources += custom_target( 25 + input: clar_decls_h, 26 + output: 'clar.suite', 27 + command : [ 28 + shell, 29 + meson.current_source_dir() + '/unit-tests/generate-clar-suites.sh', 30 + '@INPUT@', 31 + '@OUTPUT@', 32 + ], 33 + env: script_environment, 34 + ) 35 + 36 + clar_unit_tests = executable('unit-tests', 37 + sources: clar_sources + clar_test_suites, 38 + dependencies: [libgit, common_main], 39 + ) 40 + test('unit-tests', clar_unit_tests) 41 + 42 + unit_test_programs = [ 43 + 'unit-tests/t-example-decorate.c', 44 + 'unit-tests/t-hash.c', 45 + 'unit-tests/t-hashmap.c', 46 + 'unit-tests/t-mem-pool.c', 47 + 'unit-tests/t-oid-array.c', 48 + 'unit-tests/t-oidmap.c', 49 + 'unit-tests/t-oidtree.c', 50 + 'unit-tests/t-prio-queue.c', 51 + 'unit-tests/t-reftable-basics.c', 52 + 'unit-tests/t-reftable-block.c', 53 + 'unit-tests/t-reftable-merged.c', 54 + 'unit-tests/t-reftable-pq.c', 55 + 'unit-tests/t-reftable-reader.c', 56 + 'unit-tests/t-reftable-readwrite.c', 57 + 'unit-tests/t-reftable-record.c', 58 + 'unit-tests/t-reftable-stack.c', 59 + 'unit-tests/t-reftable-tree.c', 60 + 'unit-tests/t-strbuf.c', 61 + 'unit-tests/t-strcmp-offset.c', 62 + 'unit-tests/t-trailer.c', 63 + 'unit-tests/t-urlmatch-normalization.c', 64 + ] 65 + 66 + foreach unit_test_program : unit_test_programs 67 + unit_test_name = fs.stem(unit_test_program) 68 + unit_test = executable(unit_test_name, 69 + sources: [ 70 + 'unit-tests/test-lib.c', 71 + 'unit-tests/lib-oid.c', 72 + 'unit-tests/lib-reftable.c', 73 + unit_test_program, 74 + ], 75 + dependencies: [libgit, common_main], 76 + ) 77 + test(unit_test_name, unit_test, 78 + workdir: meson.current_source_dir(), 79 + timeout: 0, 80 + ) 81 + endforeach 82 + 83 + subdir('helper') 84 + 85 + integration_tests = [ 86 + 't0000-basic.sh', 87 + 't0001-init.sh', 88 + 't0002-gitfile.sh', 89 + 't0003-attributes.sh', 90 + 't0004-unwritable.sh', 91 + 't0005-signals.sh', 92 + 't0006-date.sh', 93 + 't0007-git-var.sh', 94 + 't0008-ignores.sh', 95 + 't0010-racy-git.sh', 96 + 't0012-help.sh', 97 + 't0013-sha1dc.sh', 98 + 't0014-alias.sh', 99 + 't0017-env-helper.sh', 100 + 't0018-advice.sh', 101 + 't0019-json-writer.sh', 102 + 't0020-crlf.sh', 103 + 't0021-conversion.sh', 104 + 't0022-crlf-rename.sh', 105 + 't0023-crlf-am.sh', 106 + 't0024-crlf-archive.sh', 107 + 't0025-crlf-renormalize.sh', 108 + 't0026-eol-config.sh', 109 + 't0027-auto-crlf.sh', 110 + 't0028-working-tree-encoding.sh', 111 + 't0029-core-unsetenvvars.sh', 112 + 't0030-stripspace.sh', 113 + 't0033-safe-directory.sh', 114 + 't0034-root-safe-directory.sh', 115 + 't0035-safe-bare-repository.sh', 116 + 't0040-parse-options.sh', 117 + 't0041-usage.sh', 118 + 't0050-filesystem.sh', 119 + 't0051-windows-named-pipe.sh', 120 + 't0052-simple-ipc.sh', 121 + 't0055-beyond-symlinks.sh', 122 + 't0056-git-C.sh', 123 + 't0060-path-utils.sh', 124 + 't0061-run-command.sh', 125 + 't0062-revision-walking.sh', 126 + 't0063-string-list.sh', 127 + 't0066-dir-iterator.sh', 128 + 't0067-parse_pathspec_file.sh', 129 + 't0068-for-each-repo.sh', 130 + 't0070-fundamental.sh', 131 + 't0071-sort.sh', 132 + 't0080-unit-test-output.sh', 133 + 't0081-find-pack.sh', 134 + 't0090-cache-tree.sh', 135 + 't0091-bugreport.sh', 136 + 't0092-diagnose.sh', 137 + 't0095-bloom.sh', 138 + 't0100-previous.sh', 139 + 't0101-at-syntax.sh', 140 + 't0200-gettext-basic.sh', 141 + 't0201-gettext-fallbacks.sh', 142 + 't0202-gettext-perl.sh', 143 + 't0203-gettext-setlocale-sanity.sh', 144 + 't0204-gettext-reencode-sanity.sh', 145 + 't0210-trace2-normal.sh', 146 + 't0211-trace2-perf.sh', 147 + 't0212-trace2-event.sh', 148 + 't0300-credentials.sh', 149 + 't0301-credential-cache.sh', 150 + 't0302-credential-store.sh', 151 + 't0303-credential-external.sh', 152 + 't0410-partial-clone.sh', 153 + 't0411-clone-from-partial.sh', 154 + 't0450-txt-doc-vs-help.sh', 155 + 't0500-progress-display.sh', 156 + 't0600-reffiles-backend.sh', 157 + 't0601-reffiles-pack-refs.sh', 158 + 't0602-reffiles-fsck.sh', 159 + 't0610-reftable-basics.sh', 160 + 't0611-reftable-httpd.sh', 161 + 't0612-reftable-jgit-compatibility.sh', 162 + 't0613-reftable-write-options.sh', 163 + 't1000-read-tree-m-3way.sh', 164 + 't1001-read-tree-m-2way.sh', 165 + 't1002-read-tree-m-u-2way.sh', 166 + 't1003-read-tree-prefix.sh', 167 + 't1004-read-tree-m-u-wf.sh', 168 + 't1005-read-tree-reset.sh', 169 + 't1006-cat-file.sh', 170 + 't1007-hash-object.sh', 171 + 't1008-read-tree-overlay.sh', 172 + 't1009-read-tree-new-index.sh', 173 + 't1010-mktree.sh', 174 + 't1011-read-tree-sparse-checkout.sh', 175 + 't1012-read-tree-df.sh', 176 + 't1013-read-tree-submodule.sh', 177 + 't1014-read-tree-confusing.sh', 178 + 't1015-read-index-unmerged.sh', 179 + 't1016-compatObjectFormat.sh', 180 + 't1020-subdirectory.sh', 181 + 't1021-rerere-in-workdir.sh', 182 + 't1022-read-tree-partial-clone.sh', 183 + 't1050-large.sh', 184 + 't1051-large-conversion.sh', 185 + 't1060-object-corruption.sh', 186 + 't1090-sparse-checkout-scope.sh', 187 + 't1091-sparse-checkout-builtin.sh', 188 + 't1092-sparse-checkout-compatibility.sh', 189 + 't1100-commit-tree-options.sh', 190 + 't1300-config.sh', 191 + 't1301-shared-repo.sh', 192 + 't1302-repo-version.sh', 193 + 't1303-wacky-config.sh', 194 + 't1304-default-acl.sh', 195 + 't1305-config-include.sh', 196 + 't1306-xdg-files.sh', 197 + 't1307-config-blob.sh', 198 + 't1308-config-set.sh', 199 + 't1309-early-config.sh', 200 + 't1310-config-default.sh', 201 + 't1350-config-hooks-path.sh', 202 + 't1400-update-ref.sh', 203 + 't1401-symbolic-ref.sh', 204 + 't1402-check-ref-format.sh', 205 + 't1403-show-ref.sh', 206 + 't1404-update-ref-errors.sh', 207 + 't1405-main-ref-store.sh', 208 + 't1406-submodule-ref-store.sh', 209 + 't1407-worktree-ref-store.sh', 210 + 't1408-packed-refs.sh', 211 + 't1409-avoid-packing-refs.sh', 212 + 't1410-reflog.sh', 213 + 't1411-reflog-show.sh', 214 + 't1412-reflog-loop.sh', 215 + 't1413-reflog-detach.sh', 216 + 't1414-reflog-walk.sh', 217 + 't1415-worktree-refs.sh', 218 + 't1416-ref-transaction-hooks.sh', 219 + 't1417-reflog-updateref.sh', 220 + 't1418-reflog-exists.sh', 221 + 't1419-exclude-refs.sh', 222 + 't1420-lost-found.sh', 223 + 't1430-bad-ref-name.sh', 224 + 't1450-fsck.sh', 225 + 't1451-fsck-buffer.sh', 226 + 't1460-refs-migrate.sh', 227 + 't1500-rev-parse.sh', 228 + 't1501-work-tree.sh', 229 + 't1502-rev-parse-parseopt.sh', 230 + 't1503-rev-parse-verify.sh', 231 + 't1504-ceiling-dirs.sh', 232 + 't1505-rev-parse-last.sh', 233 + 't1506-rev-parse-diagnosis.sh', 234 + 't1507-rev-parse-upstream.sh', 235 + 't1508-at-combinations.sh', 236 + 't1509-root-work-tree.sh', 237 + 't1510-repo-setup.sh', 238 + 't1511-rev-parse-caret.sh', 239 + 't1512-rev-parse-disambiguation.sh', 240 + 't1513-rev-parse-prefix.sh', 241 + 't1514-rev-parse-push.sh', 242 + 't1515-rev-parse-outside-repo.sh', 243 + 't1517-outside-repo.sh', 244 + 't1600-index.sh', 245 + 't1601-index-bogus.sh', 246 + 't1700-split-index.sh', 247 + 't1701-racy-split-index.sh', 248 + 't1800-hook.sh', 249 + 't2000-conflict-when-checking-files-out.sh', 250 + 't2002-checkout-cache-u.sh', 251 + 't2003-checkout-cache-mkdir.sh', 252 + 't2004-checkout-cache-temp.sh', 253 + 't2005-checkout-index-symlinks.sh', 254 + 't2006-checkout-index-basic.sh', 255 + 't2007-checkout-symlink.sh', 256 + 't2008-checkout-subdir.sh', 257 + 't2009-checkout-statinfo.sh', 258 + 't2010-checkout-ambiguous.sh', 259 + 't2011-checkout-invalid-head.sh', 260 + 't2012-checkout-last.sh', 261 + 't2013-checkout-submodule.sh', 262 + 't2014-checkout-switch.sh', 263 + 't2015-checkout-unborn.sh', 264 + 't2016-checkout-patch.sh', 265 + 't2017-checkout-orphan.sh', 266 + 't2018-checkout-branch.sh', 267 + 't2019-checkout-ambiguous-ref.sh', 268 + 't2020-checkout-detach.sh', 269 + 't2021-checkout-overwrite.sh', 270 + 't2022-checkout-paths.sh', 271 + 't2023-checkout-m.sh', 272 + 't2024-checkout-dwim.sh', 273 + 't2025-checkout-no-overlay.sh', 274 + 't2026-checkout-pathspec-file.sh', 275 + 't2027-checkout-track.sh', 276 + 't2030-unresolve-info.sh', 277 + 't2050-git-dir-relative.sh', 278 + 't2060-switch.sh', 279 + 't2070-restore.sh', 280 + 't2071-restore-patch.sh', 281 + 't2072-restore-pathspec-file.sh', 282 + 't2080-parallel-checkout-basics.sh', 283 + 't2081-parallel-checkout-collisions.sh', 284 + 't2082-parallel-checkout-attributes.sh', 285 + 't2100-update-cache-badpath.sh', 286 + 't2101-update-index-reupdate.sh', 287 + 't2102-update-index-symlinks.sh', 288 + 't2103-update-index-ignore-missing.sh', 289 + 't2104-update-index-skip-worktree.sh', 290 + 't2105-update-index-gitfile.sh', 291 + 't2106-update-index-assume-unchanged.sh', 292 + 't2107-update-index-basic.sh', 293 + 't2108-update-index-refresh-racy.sh', 294 + 't2200-add-update.sh', 295 + 't2201-add-update-typechange.sh', 296 + 't2202-add-addremove.sh', 297 + 't2203-add-intent.sh', 298 + 't2204-add-ignored.sh', 299 + 't2205-add-worktree-config.sh', 300 + 't2300-cd-to-toplevel.sh', 301 + 't2400-worktree-add.sh', 302 + 't2401-worktree-prune.sh', 303 + 't2402-worktree-list.sh', 304 + 't2403-worktree-move.sh', 305 + 't2404-worktree-config.sh', 306 + 't2405-worktree-submodule.sh', 307 + 't2406-worktree-repair.sh', 308 + 't2407-worktree-heads.sh', 309 + 't2500-untracked-overwriting.sh', 310 + 't2501-cwd-empty.sh', 311 + 't3000-ls-files-others.sh', 312 + 't3001-ls-files-others-exclude.sh', 313 + 't3002-ls-files-dashpath.sh', 314 + 't3003-ls-files-exclude.sh', 315 + 't3004-ls-files-basic.sh', 316 + 't3005-ls-files-relative.sh', 317 + 't3006-ls-files-long.sh', 318 + 't3007-ls-files-recurse-submodules.sh', 319 + 't3008-ls-files-lazy-init-name-hash.sh', 320 + 't3009-ls-files-others-nonsubmodule.sh', 321 + 't3010-ls-files-killed-modified.sh', 322 + 't3011-common-prefixes-and-directory-traversal.sh', 323 + 't3012-ls-files-dedup.sh', 324 + 't3013-ls-files-format.sh', 325 + 't3020-ls-files-error-unmatch.sh', 326 + 't3040-subprojects-basic.sh', 327 + 't3050-subprojects-fetch.sh', 328 + 't3060-ls-files-with-tree.sh', 329 + 't3070-wildmatch.sh', 330 + 't3100-ls-tree-restrict.sh', 331 + 't3101-ls-tree-dirname.sh', 332 + 't3102-ls-tree-wildcards.sh', 333 + 't3103-ls-tree-misc.sh', 334 + 't3104-ls-tree-format.sh', 335 + 't3105-ls-tree-output.sh', 336 + 't3200-branch.sh', 337 + 't3201-branch-contains.sh', 338 + 't3202-show-branch.sh', 339 + 't3203-branch-output.sh', 340 + 't3204-branch-name-interpretation.sh', 341 + 't3205-branch-color.sh', 342 + 't3206-range-diff.sh', 343 + 't3207-branch-submodule.sh', 344 + 't3211-peel-ref.sh', 345 + 't3300-funny-names.sh', 346 + 't3301-notes.sh', 347 + 't3302-notes-index-expensive.sh', 348 + 't3303-notes-subtrees.sh', 349 + 't3304-notes-mixed.sh', 350 + 't3305-notes-fanout.sh', 351 + 't3306-notes-prune.sh', 352 + 't3307-notes-man.sh', 353 + 't3308-notes-merge.sh', 354 + 't3309-notes-merge-auto-resolve.sh', 355 + 't3310-notes-merge-manual-resolve.sh', 356 + 't3311-notes-merge-fanout.sh', 357 + 't3320-notes-merge-worktrees.sh', 358 + 't3321-notes-stripspace.sh', 359 + 't3400-rebase.sh', 360 + 't3401-rebase-and-am-rename.sh', 361 + 't3402-rebase-merge.sh', 362 + 't3403-rebase-skip.sh', 363 + 't3404-rebase-interactive.sh', 364 + 't3405-rebase-malformed.sh', 365 + 't3406-rebase-message.sh', 366 + 't3407-rebase-abort.sh', 367 + 't3408-rebase-multi-line.sh', 368 + 't3409-rebase-environ.sh', 369 + 't3412-rebase-root.sh', 370 + 't3413-rebase-hook.sh', 371 + 't3415-rebase-autosquash.sh', 372 + 't3416-rebase-onto-threedots.sh', 373 + 't3417-rebase-whitespace-fix.sh', 374 + 't3418-rebase-continue.sh', 375 + 't3419-rebase-patch-id.sh', 376 + 't3420-rebase-autostash.sh', 377 + 't3421-rebase-topology-linear.sh', 378 + 't3422-rebase-incompatible-options.sh', 379 + 't3423-rebase-reword.sh', 380 + 't3424-rebase-empty.sh', 381 + 't3425-rebase-topology-merges.sh', 382 + 't3426-rebase-submodule.sh', 383 + 't3427-rebase-subtree.sh', 384 + 't3428-rebase-signoff.sh', 385 + 't3429-rebase-edit-todo.sh', 386 + 't3430-rebase-merges.sh', 387 + 't3431-rebase-fork-point.sh', 388 + 't3432-rebase-fast-forward.sh', 389 + 't3433-rebase-across-mode-change.sh', 390 + 't3434-rebase-i18n.sh', 391 + 't3435-rebase-gpg-sign.sh', 392 + 't3436-rebase-more-options.sh', 393 + 't3437-rebase-fixup-options.sh', 394 + 't3438-rebase-broken-files.sh', 395 + 't3500-cherry.sh', 396 + 't3501-revert-cherry-pick.sh', 397 + 't3502-cherry-pick-merge.sh', 398 + 't3503-cherry-pick-root.sh', 399 + 't3504-cherry-pick-rerere.sh', 400 + 't3505-cherry-pick-empty.sh', 401 + 't3506-cherry-pick-ff.sh', 402 + 't3507-cherry-pick-conflict.sh', 403 + 't3508-cherry-pick-many-commits.sh', 404 + 't3509-cherry-pick-merge-df.sh', 405 + 't3510-cherry-pick-sequence.sh', 406 + 't3511-cherry-pick-x.sh', 407 + 't3512-cherry-pick-submodule.sh', 408 + 't3513-revert-submodule.sh', 409 + 't3514-cherry-pick-revert-gpg.sh', 410 + 't3600-rm.sh', 411 + 't3601-rm-pathspec-file.sh', 412 + 't3602-rm-sparse-checkout.sh', 413 + 't3650-replay-basics.sh', 414 + 't3700-add.sh', 415 + 't3701-add-interactive.sh', 416 + 't3702-add-edit.sh', 417 + 't3703-add-magic-pathspec.sh', 418 + 't3704-add-pathspec-file.sh', 419 + 't3705-add-sparse-checkout.sh', 420 + 't3800-mktag.sh', 421 + 't3900-i18n-commit.sh', 422 + 't3901-i18n-patch.sh', 423 + 't3902-quoted.sh', 424 + 't3903-stash.sh', 425 + 't3904-stash-patch.sh', 426 + 't3905-stash-include-untracked.sh', 427 + 't3906-stash-submodule.sh', 428 + 't3907-stash-show-config.sh', 429 + 't3908-stash-in-worktree.sh', 430 + 't3909-stash-pathspec-file.sh', 431 + 't3910-mac-os-precompose.sh', 432 + 't3920-crlf-messages.sh', 433 + 't4000-diff-format.sh', 434 + 't4001-diff-rename.sh', 435 + 't4002-diff-basic.sh', 436 + 't4003-diff-rename-1.sh', 437 + 't4004-diff-rename-symlink.sh', 438 + 't4005-diff-rename-2.sh', 439 + 't4006-diff-mode.sh', 440 + 't4007-rename-3.sh', 441 + 't4008-diff-break-rewrite.sh', 442 + 't4009-diff-rename-4.sh', 443 + 't4010-diff-pathspec.sh', 444 + 't4011-diff-symlink.sh', 445 + 't4012-diff-binary.sh', 446 + 't4013-diff-various.sh', 447 + 't4014-format-patch.sh', 448 + 't4015-diff-whitespace.sh', 449 + 't4016-diff-quote.sh', 450 + 't4017-diff-retval.sh', 451 + 't4018-diff-funcname.sh', 452 + 't4019-diff-wserror.sh', 453 + 't4020-diff-external.sh', 454 + 't4021-format-patch-numbered.sh', 455 + 't4022-diff-rewrite.sh', 456 + 't4023-diff-rename-typechange.sh', 457 + 't4024-diff-optimize-common.sh', 458 + 't4025-hunk-header.sh', 459 + 't4026-color.sh', 460 + 't4027-diff-submodule.sh', 461 + 't4028-format-patch-mime-headers.sh', 462 + 't4029-diff-trailing-space.sh', 463 + 't4030-diff-textconv.sh', 464 + 't4031-diff-rewrite-binary.sh', 465 + 't4032-diff-inter-hunk-context.sh', 466 + 't4033-diff-patience.sh', 467 + 't4034-diff-words.sh', 468 + 't4035-diff-quiet.sh', 469 + 't4036-format-patch-signer-mime.sh', 470 + 't4037-diff-r-t-dirs.sh', 471 + 't4038-diff-combined.sh', 472 + 't4039-diff-assume-unchanged.sh', 473 + 't4040-whitespace-status.sh', 474 + 't4041-diff-submodule-option.sh', 475 + 't4042-diff-textconv-caching.sh', 476 + 't4043-diff-rename-binary.sh', 477 + 't4044-diff-index-unique-abbrev.sh', 478 + 't4045-diff-relative.sh', 479 + 't4046-diff-unmerged.sh', 480 + 't4047-diff-dirstat.sh', 481 + 't4048-diff-combined-binary.sh', 482 + 't4049-diff-stat-count.sh', 483 + 't4050-diff-histogram.sh', 484 + 't4051-diff-function-context.sh', 485 + 't4052-stat-output.sh', 486 + 't4053-diff-no-index.sh', 487 + 't4054-diff-bogus-tree.sh', 488 + 't4055-diff-context.sh', 489 + 't4056-diff-order.sh', 490 + 't4057-diff-combined-paths.sh', 491 + 't4058-diff-duplicates.sh', 492 + 't4059-diff-submodule-not-initialized.sh', 493 + 't4060-diff-submodule-option-diff-format.sh', 494 + 't4061-diff-indent.sh', 495 + 't4062-diff-pickaxe.sh', 496 + 't4063-diff-blobs.sh', 497 + 't4064-diff-oidfind.sh', 498 + 't4065-diff-anchored.sh', 499 + 't4066-diff-emit-delay.sh', 500 + 't4067-diff-partial-clone.sh', 501 + 't4068-diff-symmetric-merge-base.sh', 502 + 't4069-remerge-diff.sh', 503 + 't4100-apply-stat.sh', 504 + 't4101-apply-nonl.sh', 505 + 't4102-apply-rename.sh', 506 + 't4103-apply-binary.sh', 507 + 't4104-apply-boundary.sh', 508 + 't4105-apply-fuzz.sh', 509 + 't4106-apply-stdin.sh', 510 + 't4107-apply-ignore-whitespace.sh', 511 + 't4108-apply-threeway.sh', 512 + 't4109-apply-multifrag.sh', 513 + 't4110-apply-scan.sh', 514 + 't4111-apply-subdir.sh', 515 + 't4112-apply-renames.sh', 516 + 't4113-apply-ending.sh', 517 + 't4114-apply-typechange.sh', 518 + 't4115-apply-symlink.sh', 519 + 't4116-apply-reverse.sh', 520 + 't4117-apply-reject.sh', 521 + 't4118-apply-empty-context.sh', 522 + 't4119-apply-config.sh', 523 + 't4120-apply-popt.sh', 524 + 't4121-apply-diffs.sh', 525 + 't4122-apply-symlink-inside.sh', 526 + 't4123-apply-shrink.sh', 527 + 't4124-apply-ws-rule.sh', 528 + 't4125-apply-ws-fuzz.sh', 529 + 't4126-apply-empty.sh', 530 + 't4127-apply-same-fn.sh', 531 + 't4128-apply-root.sh', 532 + 't4129-apply-samemode.sh', 533 + 't4130-apply-criss-cross-rename.sh', 534 + 't4131-apply-fake-ancestor.sh', 535 + 't4132-apply-removal.sh', 536 + 't4133-apply-filenames.sh', 537 + 't4134-apply-submodule.sh', 538 + 't4135-apply-weird-filenames.sh', 539 + 't4136-apply-check.sh', 540 + 't4137-apply-submodule.sh', 541 + 't4138-apply-ws-expansion.sh', 542 + 't4139-apply-escape.sh', 543 + 't4140-apply-ita.sh', 544 + 't4141-apply-too-large.sh', 545 + 't4150-am.sh', 546 + 't4151-am-abort.sh', 547 + 't4152-am-subjects.sh', 548 + 't4153-am-resume-override-opts.sh', 549 + 't4200-rerere.sh', 550 + 't4201-shortlog.sh', 551 + 't4202-log.sh', 552 + 't4203-mailmap.sh', 553 + 't4204-patch-id.sh', 554 + 't4205-log-pretty-formats.sh', 555 + 't4206-log-follow-harder-copies.sh', 556 + 't4207-log-decoration-colors.sh', 557 + 't4208-log-magic-pathspec.sh', 558 + 't4209-log-pickaxe.sh', 559 + 't4210-log-i18n.sh', 560 + 't4211-line-log.sh', 561 + 't4212-log-corrupt.sh', 562 + 't4213-log-tabexpand.sh', 563 + 't4214-log-graph-octopus.sh', 564 + 't4215-log-skewed-merges.sh', 565 + 't4216-log-bloom.sh', 566 + 't4217-log-limit.sh', 567 + 't4252-am-options.sh', 568 + 't4253-am-keep-cr-dos.sh', 569 + 't4254-am-corrupt.sh', 570 + 't4255-am-submodule.sh', 571 + 't4256-am-format-flowed.sh', 572 + 't4257-am-interactive.sh', 573 + 't4258-am-quoted-cr.sh', 574 + 't4300-merge-tree.sh', 575 + 't4301-merge-tree-write-tree.sh', 576 + 't5000-tar-tree.sh', 577 + 't5001-archive-attr.sh', 578 + 't5002-archive-attr-pattern.sh', 579 + 't5003-archive-zip.sh', 580 + 't5004-archive-corner-cases.sh', 581 + 't5100-mailinfo.sh', 582 + 't5150-request-pull.sh', 583 + 't5200-update-server-info.sh', 584 + 't5300-pack-object.sh', 585 + 't5301-sliding-window.sh', 586 + 't5302-pack-index.sh', 587 + 't5303-pack-corruption-resilience.sh', 588 + 't5304-prune.sh', 589 + 't5305-include-tag.sh', 590 + 't5306-pack-nobase.sh', 591 + 't5307-pack-missing-commit.sh', 592 + 't5308-pack-detect-duplicates.sh', 593 + 't5309-pack-delta-cycles.sh', 594 + 't5310-pack-bitmaps.sh', 595 + 't5311-pack-bitmaps-shallow.sh', 596 + 't5312-prune-corruption.sh', 597 + 't5313-pack-bounds-checks.sh', 598 + 't5314-pack-cycle-detection.sh', 599 + 't5315-pack-objects-compression.sh', 600 + 't5316-pack-delta-depth.sh', 601 + 't5317-pack-objects-filter-objects.sh', 602 + 't5318-commit-graph.sh', 603 + 't5319-multi-pack-index.sh', 604 + 't5320-delta-islands.sh', 605 + 't5321-pack-large-objects.sh', 606 + 't5322-pack-objects-sparse.sh', 607 + 't5323-pack-redundant.sh', 608 + 't5324-split-commit-graph.sh', 609 + 't5325-reverse-index.sh', 610 + 't5326-multi-pack-bitmaps.sh', 611 + 't5327-multi-pack-bitmaps-rev.sh', 612 + 't5328-commit-graph-64bit-time.sh', 613 + 't5329-pack-objects-cruft.sh', 614 + 't5330-no-lazy-fetch-with-commit-graph.sh', 615 + 't5331-pack-objects-stdin.sh', 616 + 't5332-multi-pack-reuse.sh', 617 + 't5333-pseudo-merge-bitmaps.sh', 618 + 't5334-incremental-multi-pack-index.sh', 619 + 't5351-unpack-large-objects.sh', 620 + 't5400-send-pack.sh', 621 + 't5401-update-hooks.sh', 622 + 't5402-post-merge-hook.sh', 623 + 't5403-post-checkout-hook.sh', 624 + 't5404-tracking-branches.sh', 625 + 't5405-send-pack-rewind.sh', 626 + 't5406-remote-rejects.sh', 627 + 't5407-post-rewrite-hook.sh', 628 + 't5408-send-pack-stdin.sh', 629 + 't5409-colorize-remote-messages.sh', 630 + 't5410-receive-pack-alternates.sh', 631 + 't5411-proc-receive-hook.sh', 632 + 't5500-fetch-pack.sh', 633 + 't5501-fetch-push-alternates.sh', 634 + 't5502-quickfetch.sh', 635 + 't5503-tagfollow.sh', 636 + 't5504-fetch-receive-strict.sh', 637 + 't5505-remote.sh', 638 + 't5506-remote-groups.sh', 639 + 't5507-remote-environment.sh', 640 + 't5509-fetch-push-namespaces.sh', 641 + 't5510-fetch.sh', 642 + 't5511-refspec.sh', 643 + 't5512-ls-remote.sh', 644 + 't5513-fetch-track.sh', 645 + 't5514-fetch-multiple.sh', 646 + 't5515-fetch-merge-logic.sh', 647 + 't5516-fetch-push.sh', 648 + 't5517-push-mirror.sh', 649 + 't5518-fetch-exit-status.sh', 650 + 't5519-push-alternates.sh', 651 + 't5520-pull.sh', 652 + 't5521-pull-options.sh', 653 + 't5522-pull-symlink.sh', 654 + 't5523-push-upstream.sh', 655 + 't5524-pull-msg.sh', 656 + 't5525-fetch-tagopt.sh', 657 + 't5526-fetch-submodules.sh', 658 + 't5527-fetch-odd-refs.sh', 659 + 't5528-push-default.sh', 660 + 't5529-push-errors.sh', 661 + 't5530-upload-pack-error.sh', 662 + 't5531-deep-submodule-push.sh', 663 + 't5532-fetch-proxy.sh', 664 + 't5533-push-cas.sh', 665 + 't5534-push-signed.sh', 666 + 't5535-fetch-push-symref.sh', 667 + 't5536-fetch-conflicts.sh', 668 + 't5537-fetch-shallow.sh', 669 + 't5538-push-shallow.sh', 670 + 't5539-fetch-http-shallow.sh', 671 + 't5540-http-push-webdav.sh', 672 + 't5541-http-push-smart.sh', 673 + 't5542-push-http-shallow.sh', 674 + 't5543-atomic-push.sh', 675 + 't5544-pack-objects-hook.sh', 676 + 't5545-push-options.sh', 677 + 't5546-receive-limits.sh', 678 + 't5547-push-quarantine.sh', 679 + 't5548-push-porcelain.sh', 680 + 't5549-fetch-push-http.sh', 681 + 't5550-http-fetch-dumb.sh', 682 + 't5551-http-fetch-smart.sh', 683 + 't5552-skipping-fetch-negotiator.sh', 684 + 't5553-set-upstream.sh', 685 + 't5554-noop-fetch-negotiator.sh', 686 + 't5555-http-smart-common.sh', 687 + 't5557-http-get.sh', 688 + 't5558-clone-bundle-uri.sh', 689 + 't5559-http-fetch-smart-http2.sh', 690 + 't5560-http-backend-noserver.sh', 691 + 't5561-http-backend.sh', 692 + 't5562-http-backend-content-length.sh', 693 + 't5563-simple-http-auth.sh', 694 + 't5564-http-proxy.sh', 695 + 't5570-git-daemon.sh', 696 + 't5571-pre-push-hook.sh', 697 + 't5572-pull-submodule.sh', 698 + 't5573-pull-verify-signatures.sh', 699 + 't5574-fetch-output.sh', 700 + 't5580-unc-paths.sh', 701 + 't5581-http-curl-verbose.sh', 702 + 't5582-fetch-negative-refspec.sh', 703 + 't5583-push-branches.sh', 704 + 't5600-clone-fail-cleanup.sh', 705 + 't5601-clone.sh', 706 + 't5602-clone-remote-exec.sh', 707 + 't5603-clone-dirname.sh', 708 + 't5604-clone-reference.sh', 709 + 't5605-clone-local.sh', 710 + 't5606-clone-options.sh', 711 + 't5607-clone-bundle.sh', 712 + 't5608-clone-2gb.sh', 713 + 't5609-clone-branch.sh', 714 + 't5610-clone-detached.sh', 715 + 't5611-clone-config.sh', 716 + 't5612-clone-refspec.sh', 717 + 't5613-info-alternate.sh', 718 + 't5614-clone-submodules-shallow.sh', 719 + 't5615-alternate-env.sh', 720 + 't5616-partial-clone.sh', 721 + 't5617-clone-submodules-remote.sh', 722 + 't5618-alternate-refs.sh', 723 + 't5619-clone-local-ambiguous-transport.sh', 724 + 't5700-protocol-v1.sh', 725 + 't5701-git-serve.sh', 726 + 't5702-protocol-v2.sh', 727 + 't5703-upload-pack-ref-in-want.sh', 728 + 't5704-protocol-violations.sh', 729 + 't5705-session-id-in-capabilities.sh', 730 + 't5730-protocol-v2-bundle-uri-file.sh', 731 + 't5731-protocol-v2-bundle-uri-git.sh', 732 + 't5732-protocol-v2-bundle-uri-http.sh', 733 + 't5750-bundle-uri-parse.sh', 734 + 't5801-remote-helpers.sh', 735 + 't5802-connect-helper.sh', 736 + 't5810-proto-disable-local.sh', 737 + 't5811-proto-disable-git.sh', 738 + 't5812-proto-disable-http.sh', 739 + 't5813-proto-disable-ssh.sh', 740 + 't5814-proto-disable-ext.sh', 741 + 't5815-submodule-protos.sh', 742 + 't5900-repo-selection.sh', 743 + 't6000-rev-list-misc.sh', 744 + 't6001-rev-list-graft.sh', 745 + 't6002-rev-list-bisect.sh', 746 + 't6003-rev-list-topo-order.sh', 747 + 't6004-rev-list-path-optim.sh', 748 + 't6005-rev-list-count.sh', 749 + 't6006-rev-list-format.sh', 750 + 't6007-rev-list-cherry-pick-file.sh', 751 + 't6008-rev-list-submodule.sh', 752 + 't6009-rev-list-parent.sh', 753 + 't6010-merge-base.sh', 754 + 't6011-rev-list-with-bad-commit.sh', 755 + 't6012-rev-list-simplify.sh', 756 + 't6013-rev-list-reverse-parents.sh', 757 + 't6014-rev-list-all.sh', 758 + 't6016-rev-list-graph-simplify-history.sh', 759 + 't6017-rev-list-stdin.sh', 760 + 't6018-rev-list-glob.sh', 761 + 't6019-rev-list-ancestry-path.sh', 762 + 't6020-bundle-misc.sh', 763 + 't6021-rev-list-exclude-hidden.sh', 764 + 't6022-rev-list-missing.sh', 765 + 't6030-bisect-porcelain.sh', 766 + 't6040-tracking-info.sh', 767 + 't6041-bisect-submodule.sh', 768 + 't6050-replace.sh', 769 + 't6060-merge-index.sh', 770 + 't6100-rev-list-in-order.sh', 771 + 't6101-rev-parse-parents.sh', 772 + 't6102-rev-list-unexpected-objects.sh', 773 + 't6110-rev-list-sparse.sh', 774 + 't6111-rev-list-treesame.sh', 775 + 't6112-rev-list-filters-objects.sh', 776 + 't6113-rev-list-bitmap-filters.sh', 777 + 't6114-keep-packs.sh', 778 + 't6115-rev-list-du.sh', 779 + 't6120-describe.sh', 780 + 't6130-pathspec-noglob.sh', 781 + 't6131-pathspec-icase.sh', 782 + 't6132-pathspec-exclude.sh', 783 + 't6133-pathspec-rev-dwim.sh', 784 + 't6134-pathspec-in-submodule.sh', 785 + 't6135-pathspec-with-attrs.sh', 786 + 't6136-pathspec-in-bare.sh', 787 + 't6200-fmt-merge-msg.sh', 788 + 't6300-for-each-ref.sh', 789 + 't6301-for-each-ref-errors.sh', 790 + 't6302-for-each-ref-filter.sh', 791 + 't6400-merge-df.sh', 792 + 't6401-merge-criss-cross.sh', 793 + 't6402-merge-rename.sh', 794 + 't6403-merge-file.sh', 795 + 't6404-recursive-merge.sh', 796 + 't6405-merge-symlinks.sh', 797 + 't6406-merge-attr.sh', 798 + 't6407-merge-binary.sh', 799 + 't6408-merge-up-to-date.sh', 800 + 't6409-merge-subtree.sh', 801 + 't6411-merge-filemode.sh', 802 + 't6412-merge-large-rename.sh', 803 + 't6413-merge-crlf.sh', 804 + 't6414-merge-rename-nocruft.sh', 805 + 't6415-merge-dir-to-symlink.sh', 806 + 't6416-recursive-corner-cases.sh', 807 + 't6417-merge-ours-theirs.sh', 808 + 't6418-merge-text-auto.sh', 809 + 't6419-merge-ignorecase.sh', 810 + 't6421-merge-partial-clone.sh', 811 + 't6422-merge-rename-corner-cases.sh', 812 + 't6423-merge-rename-directories.sh', 813 + 't6424-merge-unrelated-index-changes.sh', 814 + 't6425-merge-rename-delete.sh', 815 + 't6426-merge-skip-unneeded-updates.sh', 816 + 't6427-diff3-conflict-markers.sh', 817 + 't6428-merge-conflicts-sparse.sh', 818 + 't6429-merge-sequence-rename-caching.sh', 819 + 't6430-merge-recursive.sh', 820 + 't6431-merge-criscross.sh', 821 + 't6432-merge-recursive-space-options.sh', 822 + 't6433-merge-toplevel.sh', 823 + 't6434-merge-recursive-rename-options.sh', 824 + 't6435-merge-sparse.sh', 825 + 't6436-merge-overwrite.sh', 826 + 't6437-submodule-merge.sh', 827 + 't6438-submodule-directory-file-conflicts.sh', 828 + 't6439-merge-co-error-msgs.sh', 829 + 't6500-gc.sh', 830 + 't6501-freshen-objects.sh', 831 + 't6600-test-reach.sh', 832 + 't6700-tree-depth.sh', 833 + 't7001-mv.sh', 834 + 't7002-mv-sparse-checkout.sh', 835 + 't7003-filter-branch.sh', 836 + 't7004-tag.sh', 837 + 't7005-editor.sh', 838 + 't7006-pager.sh', 839 + 't7007-show.sh', 840 + 't7008-filter-branch-null-sha1.sh', 841 + 't7010-setup.sh', 842 + 't7011-skip-worktree-reading.sh', 843 + 't7012-skip-worktree-writing.sh', 844 + 't7030-verify-tag.sh', 845 + 't7031-verify-tag-signed-ssh.sh', 846 + 't7060-wtstatus.sh', 847 + 't7061-wtstatus-ignore.sh', 848 + 't7062-wtstatus-ignorecase.sh', 849 + 't7063-status-untracked-cache.sh', 850 + 't7064-wtstatus-pv2.sh', 851 + 't7101-reset-empty-subdirs.sh', 852 + 't7102-reset.sh', 853 + 't7103-reset-bare.sh', 854 + 't7104-reset-hard.sh', 855 + 't7105-reset-patch.sh', 856 + 't7106-reset-unborn-branch.sh', 857 + 't7107-reset-pathspec-file.sh', 858 + 't7110-reset-merge.sh', 859 + 't7111-reset-table.sh', 860 + 't7112-reset-submodule.sh', 861 + 't7113-post-index-change-hook.sh', 862 + 't7201-co.sh', 863 + 't7300-clean.sh', 864 + 't7301-clean-interactive.sh', 865 + 't7400-submodule-basic.sh', 866 + 't7401-submodule-summary.sh', 867 + 't7402-submodule-rebase.sh', 868 + 't7403-submodule-sync.sh', 869 + 't7406-submodule-update.sh', 870 + 't7407-submodule-foreach.sh', 871 + 't7408-submodule-reference.sh', 872 + 't7409-submodule-detached-work-tree.sh', 873 + 't7411-submodule-config.sh', 874 + 't7412-submodule-absorbgitdirs.sh', 875 + 't7413-submodule-is-active.sh', 876 + 't7414-submodule-mistakes.sh', 877 + 't7416-submodule-dash-url.sh', 878 + 't7417-submodule-path-url.sh', 879 + 't7418-submodule-sparse-gitmodules.sh', 880 + 't7419-submodule-set-branch.sh', 881 + 't7420-submodule-set-url.sh', 882 + 't7421-submodule-summary-add.sh', 883 + 't7422-submodule-output.sh', 884 + 't7423-submodule-symlinks.sh', 885 + 't7424-submodule-mixed-ref-formats.sh', 886 + 't7450-bad-git-dotfiles.sh', 887 + 't7500-commit-template-squash-signoff.sh', 888 + 't7501-commit-basic-functionality.sh', 889 + 't7502-commit-porcelain.sh', 890 + 't7503-pre-commit-and-pre-merge-commit-hooks.sh', 891 + 't7504-commit-msg-hook.sh', 892 + 't7505-prepare-commit-msg-hook.sh', 893 + 't7506-status-submodule.sh', 894 + 't7507-commit-verbose.sh', 895 + 't7508-status.sh', 896 + 't7509-commit-authorship.sh', 897 + 't7510-signed-commit.sh', 898 + 't7511-status-index.sh', 899 + 't7512-status-help.sh', 900 + 't7513-interpret-trailers.sh', 901 + 't7514-commit-patch.sh', 902 + 't7515-status-symlinks.sh', 903 + 't7516-commit-races.sh', 904 + 't7517-per-repo-email.sh', 905 + 't7518-ident-corner-cases.sh', 906 + 't7519-status-fsmonitor.sh', 907 + 't7520-ignored-hook-warning.sh', 908 + 't7521-ignored-mode.sh', 909 + 't7524-commit-summary.sh', 910 + 't7525-status-rename.sh', 911 + 't7526-commit-pathspec-file.sh', 912 + 't7527-builtin-fsmonitor.sh', 913 + 't7528-signed-commit-ssh.sh', 914 + 't7600-merge.sh', 915 + 't7601-merge-pull-config.sh', 916 + 't7602-merge-octopus-many.sh', 917 + 't7603-merge-reduce-heads.sh', 918 + 't7604-merge-custom-message.sh', 919 + 't7605-merge-resolve.sh', 920 + 't7606-merge-custom.sh', 921 + 't7607-merge-state.sh', 922 + 't7608-merge-messages.sh', 923 + 't7609-mergetool--lib.sh', 924 + 't7610-mergetool.sh', 925 + 't7611-merge-abort.sh', 926 + 't7612-merge-verify-signatures.sh', 927 + 't7614-merge-signoff.sh', 928 + 't7615-diff-algo-with-mergy-operations.sh', 929 + 't7700-repack.sh', 930 + 't7701-repack-unpack-unreachable.sh', 931 + 't7702-repack-cyclic-alternate.sh', 932 + 't7703-repack-geometric.sh', 933 + 't7704-repack-cruft.sh', 934 + 't7800-difftool.sh', 935 + 't7810-grep.sh', 936 + 't7811-grep-open.sh', 937 + 't7812-grep-icase-non-ascii.sh', 938 + 't7813-grep-icase-iso.sh', 939 + 't7814-grep-recurse-submodules.sh', 940 + 't7815-grep-binary.sh', 941 + 't7816-grep-binary-pattern.sh', 942 + 't7817-grep-sparse-checkout.sh', 943 + 't7900-maintenance.sh', 944 + 't8001-annotate.sh', 945 + 't8002-blame.sh', 946 + 't8003-blame-corner-cases.sh', 947 + 't8004-blame-with-conflicts.sh', 948 + 't8005-blame-i18n.sh', 949 + 't8006-blame-textconv.sh', 950 + 't8007-cat-file-textconv.sh', 951 + 't8008-blame-formats.sh', 952 + 't8009-blame-vs-topicbranches.sh', 953 + 't8010-cat-file-filters.sh', 954 + 't8011-blame-split-file.sh', 955 + 't8012-blame-colors.sh', 956 + 't8013-blame-ignore-revs.sh', 957 + 't8014-blame-ignore-fuzzy.sh', 958 + 't9001-send-email.sh', 959 + 't9002-column.sh', 960 + 't9003-help-autocorrect.sh', 961 + 't9100-git-svn-basic.sh', 962 + 't9101-git-svn-props.sh', 963 + 't9102-git-svn-deep-rmdir.sh', 964 + 't9103-git-svn-tracked-directory-removed.sh', 965 + 't9104-git-svn-follow-parent.sh', 966 + 't9105-git-svn-commit-diff.sh', 967 + 't9106-git-svn-commit-diff-clobber.sh', 968 + 't9107-git-svn-migrate.sh', 969 + 't9108-git-svn-glob.sh', 970 + 't9109-git-svn-multi-glob.sh', 971 + 't9110-git-svn-use-svm-props.sh', 972 + 't9111-git-svn-use-svnsync-props.sh', 973 + 't9112-git-svn-md5less-file.sh', 974 + 't9113-git-svn-dcommit-new-file.sh', 975 + 't9114-git-svn-dcommit-merge.sh', 976 + 't9115-git-svn-dcommit-funky-renames.sh', 977 + 't9116-git-svn-log.sh', 978 + 't9117-git-svn-init-clone.sh', 979 + 't9118-git-svn-funky-branch-names.sh', 980 + 't9119-git-svn-info.sh', 981 + 't9120-git-svn-clone-with-percent-escapes.sh', 982 + 't9121-git-svn-fetch-renamed-dir.sh', 983 + 't9122-git-svn-author.sh', 984 + 't9123-git-svn-rebuild-with-rewriteroot.sh', 985 + 't9124-git-svn-dcommit-auto-props.sh', 986 + 't9125-git-svn-multi-glob-branch-names.sh', 987 + 't9126-git-svn-follow-deleted-readded-directory.sh', 988 + 't9127-git-svn-partial-rebuild.sh', 989 + 't9128-git-svn-cmd-branch.sh', 990 + 't9129-git-svn-i18n-commitencoding.sh', 991 + 't9130-git-svn-authors-file.sh', 992 + 't9131-git-svn-empty-symlink.sh', 993 + 't9132-git-svn-broken-symlink.sh', 994 + 't9133-git-svn-nested-git-repo.sh', 995 + 't9134-git-svn-ignore-paths.sh', 996 + 't9135-git-svn-moved-branch-empty-file.sh', 997 + 't9136-git-svn-recreated-branch-empty-file.sh', 998 + 't9137-git-svn-dcommit-clobber-series.sh', 999 + 't9138-git-svn-authors-prog.sh', 1000 + 't9139-git-svn-non-utf8-commitencoding.sh', 1001 + 't9140-git-svn-reset.sh', 1002 + 't9141-git-svn-multiple-branches.sh', 1003 + 't9142-git-svn-shallow-clone.sh', 1004 + 't9143-git-svn-gc.sh', 1005 + 't9144-git-svn-old-rev_map.sh', 1006 + 't9145-git-svn-master-branch.sh', 1007 + 't9146-git-svn-empty-dirs.sh', 1008 + 't9147-git-svn-include-paths.sh', 1009 + 't9148-git-svn-propset.sh', 1010 + 't9150-svk-mergetickets.sh', 1011 + 't9151-svn-mergeinfo.sh', 1012 + 't9152-svn-empty-dirs-after-gc.sh', 1013 + 't9153-git-svn-rewrite-uuid.sh', 1014 + 't9154-git-svn-fancy-glob.sh', 1015 + 't9155-git-svn-fetch-deleted-tag.sh', 1016 + 't9156-git-svn-fetch-deleted-tag-2.sh', 1017 + 't9157-git-svn-fetch-merge.sh', 1018 + 't9158-git-svn-mergeinfo.sh', 1019 + 't9159-git-svn-no-parent-mergeinfo.sh', 1020 + 't9160-git-svn-preserve-empty-dirs.sh', 1021 + 't9161-git-svn-mergeinfo-push.sh', 1022 + 't9162-git-svn-dcommit-interactive.sh', 1023 + 't9163-git-svn-reset-clears-caches.sh', 1024 + 't9164-git-svn-dcommit-concurrent.sh', 1025 + 't9165-git-svn-fetch-merge-branch-of-branch.sh', 1026 + 't9166-git-svn-fetch-merge-branch-of-branch2.sh', 1027 + 't9167-git-svn-cmd-branch-subproject.sh', 1028 + 't9168-git-svn-partially-globbed-names.sh', 1029 + 't9169-git-svn-dcommit-crlf.sh', 1030 + 't9200-git-cvsexportcommit.sh', 1031 + 't9210-scalar.sh', 1032 + 't9211-scalar-clone.sh', 1033 + 't9300-fast-import.sh', 1034 + 't9301-fast-import-notes.sh', 1035 + 't9302-fast-import-unpack-limit.sh', 1036 + 't9303-fast-import-compression.sh', 1037 + 't9304-fast-import-marks.sh', 1038 + 't9350-fast-export.sh', 1039 + 't9351-fast-export-anonymize.sh', 1040 + 't9400-git-cvsserver-server.sh', 1041 + 't9401-git-cvsserver-crlf.sh', 1042 + 't9402-git-cvsserver-refs.sh', 1043 + 't9500-gitweb-standalone-no-errors.sh', 1044 + 't9501-gitweb-standalone-http-status.sh', 1045 + 't9502-gitweb-standalone-parse-output.sh', 1046 + 't9600-cvsimport.sh', 1047 + 't9601-cvsimport-vendor-branch.sh', 1048 + 't9602-cvsimport-branches-tags.sh', 1049 + 't9603-cvsimport-patchsets.sh', 1050 + 't9604-cvsimport-timestamps.sh', 1051 + 't9700-perl-git.sh', 1052 + 't9800-git-p4-basic.sh', 1053 + 't9801-git-p4-branch.sh', 1054 + 't9802-git-p4-filetype.sh', 1055 + 't9803-git-p4-shell-metachars.sh', 1056 + 't9804-git-p4-label.sh', 1057 + 't9805-git-p4-skip-submit-edit.sh', 1058 + 't9806-git-p4-options.sh', 1059 + 't9807-git-p4-submit.sh', 1060 + 't9808-git-p4-chdir.sh', 1061 + 't9809-git-p4-client-view.sh', 1062 + 't9810-git-p4-rcs.sh', 1063 + 't9811-git-p4-label-import.sh', 1064 + 't9812-git-p4-wildcards.sh', 1065 + 't9813-git-p4-preserve-users.sh', 1066 + 't9814-git-p4-rename.sh', 1067 + 't9815-git-p4-submit-fail.sh', 1068 + 't9816-git-p4-locked.sh', 1069 + 't9817-git-p4-exclude.sh', 1070 + 't9818-git-p4-block.sh', 1071 + 't9819-git-p4-case-folding.sh', 1072 + 't9820-git-p4-editor-handling.sh', 1073 + 't9821-git-p4-path-variations.sh', 1074 + 't9822-git-p4-path-encoding.sh', 1075 + 't9823-git-p4-mock-lfs.sh', 1076 + 't9824-git-p4-git-lfs.sh', 1077 + 't9825-git-p4-handle-utf16-without-bom.sh', 1078 + 't9826-git-p4-keep-empty-commits.sh', 1079 + 't9827-git-p4-change-filetype.sh', 1080 + 't9828-git-p4-map-user.sh', 1081 + 't9829-git-p4-jobs.sh', 1082 + 't9830-git-p4-symlink-dir.sh', 1083 + 't9831-git-p4-triggers.sh', 1084 + 't9832-unshelve.sh', 1085 + 't9833-errors.sh', 1086 + 't9834-git-p4-file-dir-bug.sh', 1087 + 't9835-git-p4-metadata-encoding-python2.sh', 1088 + 't9836-git-p4-metadata-encoding-python3.sh', 1089 + 't9850-shell.sh', 1090 + 't9901-git-web--browse.sh', 1091 + 't9902-completion.sh', 1092 + 't9903-bash-prompt.sh', 1093 + ] 1094 + 1095 + # GIT_BUILD_DIR needs to be Unix-style without drive prefixes as it get added 1096 + # to the PATH variable. And given that drive prefixes contain a colon we'd 1097 + # otherwise end up with a broken PATH if we didn't convert it. 1098 + git_build_dir = meson.project_build_root() 1099 + if cygpath.found() 1100 + git_build_dir = run_command(cygpath, git_build_dir, check: true).stdout().strip() 1101 + endif 1102 + 1103 + test_environment = script_environment 1104 + test_environment.set('GIT_BUILD_DIR', git_build_dir) 1105 + 1106 + foreach integration_test : integration_tests 1107 + test(fs.stem(integration_test), shell, 1108 + args: [ integration_test ], 1109 + workdir: meson.current_source_dir(), 1110 + env: test_environment, 1111 + depends: test_dependencies + bin_wrappers, 1112 + timeout: 0, 1113 + ) 1114 + endforeach
+1 -1
t/t7609-mergetool--lib.sh
··· 7 7 . ./test-lib.sh 8 8 9 9 test_expect_success 'mergetool --tool=vimdiff creates the expected layout' ' 10 - . "$GIT_BUILD_DIR"/mergetools/vimdiff && 10 + . "$GIT_TEST_MERGE_TOOLS_DIR"/vimdiff && 11 11 run_unit_tests 12 12 ' 13 13
+21 -10
t/test-lib.sh
··· 35 35 # needing to exist. 36 36 TEST_DIRECTORY=$(cd "$TEST_DIRECTORY" && pwd) || exit 1 37 37 fi 38 - if test -z "$TEST_OUTPUT_DIRECTORY" 39 - then 40 - # Similarly, override this to store the test-results subdir 41 - # elsewhere 42 - TEST_OUTPUT_DIRECTORY=$TEST_DIRECTORY 43 - fi 44 - GIT_BUILD_DIR="${TEST_DIRECTORY%/t}" 38 + GIT_BUILD_DIR="${GIT_BUILD_DIR:-${TEST_DIRECTORY%/t}}" 45 39 if test "$TEST_DIRECTORY" = "$GIT_BUILD_DIR" 46 40 then 47 41 echo "PANIC: Running in a $TEST_DIRECTORY that doesn't end in '/t'?" >&2 ··· 92 86 prepend_var UBSAN_OPTIONS : $GIT_SAN_OPTIONS 93 87 export UBSAN_OPTIONS 94 88 89 + # The TEST_OUTPUT_DIRECTORY will be overwritten via GIT-BUILD-OPTIONS. So in 90 + # case the caller has manually set up this variable via the environment we must 91 + # make sure to not overwrite that value, and thus we save it into 92 + # TEST_OUTPUT_DIRECTORY_OVERRIDE here. 93 + if test -n "$TEST_OUTPUT_DIRECTORY" && test -z "$TEST_OUTPUT_DIRECTORY_OVERRIDE" 94 + then 95 + TEST_OUTPUT_DIRECTORY_OVERRIDE=$TEST_OUTPUT_DIRECTORY 96 + fi 97 + 95 98 if test ! -f "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS 96 99 then 97 100 echo >&2 'error: GIT-BUILD-OPTIONS missing (has Git been built?).' ··· 99 102 fi 100 103 . "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS 101 104 export PERL_PATH SHELL_PATH 105 + 106 + if test -z "$TEST_OUTPUT_DIRECTORY" 107 + then 108 + # Similarly, override this to store the test-results subdir 109 + # elsewhere 110 + TEST_OUTPUT_DIRECTORY=$TEST_DIRECTORY 111 + fi 102 112 103 113 # In t0000, we need to override test directories of nested testcases. In case 104 114 # the developer has TEST_OUTPUT_DIRECTORY part of his build options, then we'd ··· 512 522 PERF_ 513 523 CURL_VERBOSE 514 524 TRACE_CURL 525 + BUILD_DIR 515 526 )); 516 527 my @vars = grep(/^GIT_/ && !/^GIT_($ok)/o, @env); 517 528 print join("\n", @vars); ··· 1409 1420 PATH="$GIT_BUILD_DIR:$GIT_BUILD_DIR/t/helper:$PATH" 1410 1421 fi 1411 1422 fi 1412 - GIT_TEMPLATE_DIR="$GIT_BUILD_DIR"/templates/blt 1423 + GIT_TEMPLATE_DIR="$GIT_TEST_TEMPLATE_DIR" 1413 1424 GIT_CONFIG_NOSYSTEM=1 1414 1425 GIT_ATTR_NOSYSTEM=1 1415 1426 GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY/.." ··· 1475 1486 fi 1476 1487 fi 1477 1488 1478 - GITPERLLIB="$GIT_BUILD_DIR"/perl/build/lib 1489 + GITPERLLIB="$GIT_TEST_GITPERLLIB" 1479 1490 export GITPERLLIB 1480 - test -d "$GIT_BUILD_DIR"/templates/blt || { 1491 + test -d "$GIT_TEMPLATE_DIR" || { 1481 1492 BAIL_OUT "You haven't built things yet, have you?" 1482 1493 } 1483 1494
+25 -14
templates/Makefile
··· 29 29 # in a file direc--tory--file in the source. They will be 30 30 # just copied to the destination. 31 31 32 - bpsrc = $(filter-out %~,$(wildcard *--*)) 33 - boilerplates.made : $(bpsrc) 34 - $(QUIET)umask 022 && ls *--* 2>/dev/null | \ 35 - while read boilerplate; \ 32 + TEMPLATES = 33 + TEMPLATES += description 34 + TEMPLATES += hooks/applypatch-msg.sample 35 + TEMPLATES += hooks/commit-msg.sample 36 + TEMPLATES += hooks/fsmonitor-watchman.sample 37 + TEMPLATES += hooks/post-update.sample 38 + TEMPLATES += hooks/pre-applypatch.sample 39 + TEMPLATES += hooks/pre-commit.sample 40 + TEMPLATES += hooks/pre-merge-commit.sample 41 + TEMPLATES += hooks/prepare-commit-msg.sample 42 + TEMPLATES += hooks/pre-push.sample 43 + TEMPLATES += hooks/pre-rebase.sample 44 + TEMPLATES += hooks/pre-receive.sample 45 + TEMPLATES += hooks/push-to-checkout.sample 46 + TEMPLATES += hooks/sendemail-validate.sample 47 + TEMPLATES += hooks/update.sample 48 + TEMPLATES += info/exclude 49 + 50 + boilerplates.made: $(TEMPLATES) 51 + $(QUIET)umask 022 && for template in $(TEMPLATES); \ 36 52 do \ 37 - case "$$boilerplate" in *~) continue ;; esac && \ 38 - dst=`echo "$$boilerplate" | sed -e 's|^this|.|;s|--|/|g'` && \ 39 - dir=`expr "$$dst" : '\(.*\)/'` && \ 53 + dir=$$(dirname "$$template") && \ 40 54 mkdir -p blt/$$dir && \ 41 - case "$$boilerplate" in \ 42 - *--) continue;; \ 43 - esac && \ 44 55 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ 45 56 -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \ 46 - -e 's|@PERL_PATH@|$(PERL_PATH_SQ)|g' $$boilerplate > \ 47 - blt/$$dst && \ 48 - if test -x "$$boilerplate"; then rx=rx; else rx=r; fi && \ 49 - chmod a+$$rx "blt/$$dst" || exit; \ 57 + -e 's|@PERL_PATH@|$(PERL_PATH_SQ)|g' $$template > \ 58 + blt/$$template && \ 59 + if test -x "$$template"; then rx=rx; else rx=r; fi && \ 60 + chmod a+$$rx "blt/$$template" || exit; \ 50 61 done && \ 51 62 date >$@ 52 63
-1
templates/branches--
··· 1 - : this is just to ensure the directory exists.
templates/hooks--applypatch-msg.sample templates/hooks/applypatch-msg.sample
templates/hooks--commit-msg.sample templates/hooks/commit-msg.sample
templates/hooks--fsmonitor-watchman.sample templates/hooks/fsmonitor-watchman.sample
templates/hooks--post-update.sample templates/hooks/post-update.sample
templates/hooks--pre-applypatch.sample templates/hooks/pre-applypatch.sample
templates/hooks--pre-commit.sample templates/hooks/pre-commit.sample
templates/hooks--pre-merge-commit.sample templates/hooks/pre-merge-commit.sample
templates/hooks--pre-push.sample templates/hooks/pre-push.sample
templates/hooks--pre-rebase.sample templates/hooks/pre-rebase.sample
templates/hooks--pre-receive.sample templates/hooks/pre-receive.sample
templates/hooks--prepare-commit-msg.sample templates/hooks/prepare-commit-msg.sample
templates/hooks--push-to-checkout.sample templates/hooks/push-to-checkout.sample
templates/hooks--sendemail-validate.sample templates/hooks/sendemail-validate.sample
templates/hooks--update.sample templates/hooks/update.sample
+26
templates/hooks/meson.build
··· 1 + hooks = [ 2 + 'applypatch-msg.sample', 3 + 'commit-msg.sample', 4 + 'fsmonitor-watchman.sample', 5 + 'post-update.sample', 6 + 'pre-applypatch.sample', 7 + 'pre-commit.sample', 8 + 'pre-merge-commit.sample', 9 + 'prepare-commit-msg.sample', 10 + 'pre-push.sample', 11 + 'pre-rebase.sample', 12 + 'pre-receive.sample', 13 + 'push-to-checkout.sample', 14 + 'sendemail-validate.sample', 15 + 'update.sample', 16 + ] 17 + 18 + foreach hook : hooks 19 + configure_file( 20 + input: hook, 21 + output: hook, 22 + configuration: template_config, 23 + install: true, 24 + install_dir: get_option('datadir') / 'git-core/templates/hooks', 25 + ) 26 + endforeach
templates/info--exclude templates/info/exclude
+7
templates/info/meson.build
··· 1 + configure_file( 2 + input: 'exclude', 3 + output: 'exclude', 4 + configuration: template_config, 5 + install: true, 6 + install_dir: get_option('datadir') / 'git-core/templates/info', 7 + )
+15
templates/meson.build
··· 1 + template_config = configuration_data() 2 + template_config.set('PERL_PATH', perl.found() ? fs.as_posix(perl.full_path()) : '') 3 + template_config.set('SHELL_PATH', fs.as_posix(shell.full_path())) 4 + template_config.set('GITWEBDIR', fs.as_posix(get_option('prefix') / get_option('datadir') / 'gitweb')) 5 + 6 + configure_file( 7 + input: 'description', 8 + output: 'description', 9 + configuration: template_config, 10 + install: true, 11 + install_dir: get_option('datadir') / 'git-core/templates', 12 + ) 13 + 14 + subdir('hooks') 15 + subdir('info')
templates/this--description templates/description
+1 -1
unimplemented.sh
··· 1 1 #!/bin/sh 2 2 3 - echo >&2 "fatal: git was built without support for $(basename $0) (@@REASON@@)." 3 + echo >&2 "fatal: git was built without support for $(basename $0) (@REASON@)." 4 4 exit 128
+8
version-def.h.in
··· 1 + #ifndef VERSION_DEF_H 2 + #define VERSION_DEF_H 3 + 4 + #define GIT_VERSION "@GIT_VERSION@" 5 + #define GIT_BUILT_FROM_COMMIT "@GIT_BUILT_FROM_COMMIT@" 6 + #define GIT_USER_AGENT "@GIT_USER_AGENT@" 7 + 8 + #endif /* VERSION_DEF_H */
+1
version.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "version.h" 3 + #include "version-def.h" 3 4 #include "strbuf.h" 4 5 5 6 const char git_version_string[] = GIT_VERSION;
-36
wrap-for-bin.sh
··· 1 - #!/bin/sh 2 - 3 - # wrap-for-bin.sh: Template for git executable wrapper scripts 4 - # to run test suite against sandbox, but with only bindir-installed 5 - # executables in PATH. The Makefile copies this into various 6 - # files in bin-wrappers, substituting 7 - # @@BUILD_DIR@@ and @@PROG@@. 8 - 9 - GIT_EXEC_PATH='@@BUILD_DIR@@' 10 - if test -n "$NO_SET_GIT_TEMPLATE_DIR" 11 - then 12 - unset GIT_TEMPLATE_DIR 13 - else 14 - GIT_TEMPLATE_DIR='@@BUILD_DIR@@/templates/blt' 15 - export GIT_TEMPLATE_DIR 16 - fi 17 - GITPERLLIB='@@BUILD_DIR@@/perl/build/lib'"${GITPERLLIB:+:$GITPERLLIB}" 18 - GIT_TEXTDOMAINDIR='@@BUILD_DIR@@/po/build/locale' 19 - PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH" 20 - 21 - export GIT_EXEC_PATH GITPERLLIB PATH GIT_TEXTDOMAINDIR 22 - 23 - case "$GIT_DEBUGGER" in 24 - '') 25 - exec "${GIT_EXEC_PATH}/@@PROG@@" "$@" 26 - ;; 27 - 1) 28 - unset GIT_DEBUGGER 29 - exec gdb --args "${GIT_EXEC_PATH}/@@PROG@@" "$@" 30 - ;; 31 - *) 32 - GIT_DEBUGGER_ARGS="$GIT_DEBUGGER" 33 - unset GIT_DEBUGGER 34 - exec ${GIT_DEBUGGER_ARGS} "${GIT_EXEC_PATH}/@@PROG@@" "$@" 35 - ;; 36 - esac