Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-09-02Merge branch 'fk/use-kwset-pickaxe-grep-f'Junio C Hamano
* fk/use-kwset-pickaxe-grep-f: obstack: Fix portability issues Use kwset in grep Use kwset in pickaxe Adapt the kwset code to Git Add string search routines from GNU grep Add obstack.[ch] from EGLIBC 2.10
2011-08-26Merge branch 'da/difftool-mergtool-refactor'Junio C Hamano
* da/difftool-mergtool-refactor: mergetools/meld: Use '--output' when available mergetool--lib: Refactor tools into separate files mergetool--lib: Make style consistent with git difftool--helper: Make style consistent with git
2011-08-26Merge branch 'di/parse-options-split'Junio C Hamano
* di/parse-options-split: Reduce parse-options.o dependencies parse-options: export opterr, optbug
2011-08-21Use kwset in pickaxeFredrik Kuivinen
Benchmarks in the hot cache case: before: $ perf stat --repeat=5 git log -Sqwerty Performance counter stats for 'git log -Sqwerty' (5 runs): 47,092,744 cache-misses # 2.825 M/sec ( +- 1.607% ) 123,368,389 cache-references # 7.400 M/sec ( +- 0.812% ) 330,040,998 branch-misses # 3.134 % ( +- 0.257% ) 10,530,896,750 branches # 631.663 M/sec ( +- 0.121% ) 62,037,201,030 instructions # 1.399 IPC ( +- 0.142% ) 44,331,294,321 cycles # 2659.073 M/sec ( +- 0.326% ) 96,794 page-faults # 0.006 M/sec ( +- 11.952% ) 25 CPU-migrations # 0.000 M/sec ( +- 25.266% ) 1,424 context-switches # 0.000 M/sec ( +- 0.540% ) 16671.708650 task-clock-msecs # 0.997 CPUs ( +- 0.343% ) 16.728692052 seconds time elapsed ( +- 0.344% ) after: $ perf stat --repeat=5 git log -Sqwerty Performance counter stats for 'git log -Sqwerty' (5 runs): 51,385,522 cache-misses # 4.619 M/sec ( +- 0.565% ) 129,177,880 cache-references # 11.611 M/sec ( +- 0.219% ) 319,222,775 branch-misses # 6.946 % ( +- 0.134% ) 4,595,913,233 branches # 413.086 M/sec ( +- 0.112% ) 31,395,042,533 instructions # 1.062 IPC ( +- 0.129% ) 29,558,348,598 cycles # 2656.740 M/sec ( +- 0.204% ) 93,224 page-faults # 0.008 M/sec ( +- 4.487% ) 19 CPU-migrations # 0.000 M/sec ( +- 10.425% ) 950 context-switches # 0.000 M/sec ( +- 0.360% ) 11125.796039 task-clock-msecs # 0.997 CPUs ( +- 0.239% ) 11.164216599 seconds time elapsed ( +- 0.240% ) So the kwset code is about 33% faster. Signed-off-by: Fredrik Kuivinen <frekui@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-21Add obstack.[ch] from EGLIBC 2.10Fredrik Kuivinen
Signed-off-by: Fredrik Kuivinen <frekui@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-19mergetool--lib: Refactor tools into separate filesDavid Aguilar
Individual merge tools are now defined in a mergetools/$tool file which is sourced at runtime. The individual files are installed into $(git --exec-path)/mergetools/. New tools can be added by creating a new file instead of editing the git-mergetool--lib.sh scriptlet. http://thread.gmane.org/gmane.comp.version-control.git/134906/focus=135006 Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-18Merge branch 'rc/histogram-diff'Junio C Hamano
* rc/histogram-diff: xdiff/xhistogram: drop need for additional variable xdiff/xhistogram: rely on xdl_trim_ends() xdiff/xhistogram: rework handling of recursed results xdiff: do away with xdl_mmfile_next() Make test number unique xdiff/xprepare: use a smaller sample size for histogram diff xdiff/xprepare: skip classification teach --histogram to diff t4033-diff-patience: factor out tests xdiff/xpatience: factor out fall-back-diff function xdiff/xprepare: refactor abort cleanups xdiff/xprepare: use memset()
2011-08-11Reduce parse-options.o dependenciesDmitry Ivankov
Currently parse-options.o pulls quite a big bunch of dependencies. his complicates it's usage in contrib/ because it pulls external dependencies and it also increases executables size. Split off less generic and more internal to git part of parse-options.c to parse-options-cb.c. Move prefix_filename function from setup.c to abspath.c. abspath.o and wrapper.o pull each other, so it's unlikely to increase the dependencies. It was a dependency of parse-options.o that pulled many others. Now parse-options.o pulls just abspath.o, ctype.o, strbuf.o, usage.o, wrapper.o, libc directly and strlcpy.o indirectly. Signed-off-by: Dmitry Ivankov <divanorama@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-11Merge branch 'rc/maint-http-wrong-free'Junio C Hamano
* rc/maint-http-wrong-free: Makefile: some changes for http-related flag documentation http.c: fix an invalid free() Conflicts: Makefile
2011-08-03Makefile: some changes for http-related flag documentationTay Ray Chuan
Rename git-http-pull to git-http-fetch. This was passed over in 215a7ad (Big tool rename, Wed Sep 7 17:26:23 2005 -0700). Also, distinguish between dumb and smart in flag docs, as the "warnings" in NO_CURL and NO_EXPACT are no longer accurate given the introduction of smart http(s). Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-20Makefile: add Minix configuration options.Thomas Cort
Add a $(uname_S) case for Minix with the correct options. Minix's linker needs all libraries specified explicitly. Add NEEDS_SSL_WITH_CURL to add -lssl when using -lcurl. Add NEEDS_IDN_WITH_CURL to add -lidn when using -lcurl. When NEEDS_SSL_WITH_CURL is defined and NEEDS_CRYPTO_WITH_SSL is defined, add -lcrypt to CURL_LIBCURL. Change OPENSSL_LINK to OPENSSL_LIBSSL in the NEEDS_CRYPTO_WITH_SSL conditional in the libopenssl section. Libraries go in OPENSSL_LIBSSL, OPENSSL_LINK is for linker flags. Signed-off-by: Thomas Cort <tcort@minix3.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-19Merge branch 'ak/gcc46-profile-feedback'Junio C Hamano
* ak/gcc46-profile-feedback: Add explanation of the profile feedback build to the README Add profile feedback build to git Add option to disable NORETURN
2011-07-14Merge branch 'fk/relink-upon-ldflags-update'Junio C Hamano
* fk/relink-upon-ldflags-update: Makefile: Track changes to LDFLAGS and relink when necessary
2011-07-14Merge branch 'md/interix-update'Junio C Hamano
* md/interix-update: Update the Interix default build configuration.
2011-07-12teach --histogram to diffTay Ray Chuan
Port JGit's HistogramDiff algorithm over to C. Rough numbers (TODO) show that it is faster than its --patience cousin, as well as the default Meyers algorithm. The implementation has been reworked to use structs and pointers, instead of bitmasks, thus doing away with JGit's 2^28 line limit. We also use xdiff's default hash table implementation (xdl_hash_bits() with XDL_HASHLONG()) for convenience. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-30Merge branch 'jc/streaming' into nextJunio C Hamano
* jc/streaming: sha1_file: use the correct type (ssize_t, not size_t) for read-style function streaming: read loose objects incrementally sha1_file.c: expose helpers to read loose objects streaming: read non-delta incrementally from a pack streaming_write_entry(): support files with holes convert: CRLF_INPUT is a no-op in the output codepath streaming_write_entry(): use streaming API in write_entry() streaming: a new API to read from the object store write_entry(): separate two helper functions out unpack_object_header(): make it public sha1_object_info_extended(): hint about objects in delta-base cache sha1_object_info_extended(): expose a bit more info packed_object_info_detail(): do not return a string
2011-06-22Makefile: Track changes to LDFLAGS and relink when necessaryFredrik Kuivinen
Some profiling tools (e.g., google-perftools and mutrace) work by linking in a new library into the executables. When using these tools it is convenient to only relink instead of doing a full make clean; make cycle. This change complements the auto-detection of changes to CFLAGS that we already have. Tracking of more variables that affect the build can be added when the need arise. Signed-off-by: Fredrik Kuivinen <frekui@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-21Add profile feedback build to gitAndi Kleen
Add a gcc profile feedback build option "profile-all" to the main Makefile. It simply runs the test suite to generate feedback data and the recompiles the main executables with that. The basic structure is similar to the existing gcov code. gcc is often able to generate better code with profile feedback data. The training load also doesn't need to be too similar to the actual load, it still gives benefits. The test suite run is unfortunately quite long. It would be good to find a suitable subset that runs faster and still gives reasonable feedback. For now the test suite runs single threaded (I had some trouble running the test suite with -jX) I tested it with git gc and git blame kernel/sched.c on a Linux kernel tree. For gc I get about 2.7% improvement in wall clock time by using the feedback build, for blame about 2.4%. That's not gigantic, but not shabby either for a very small patch. If anyone has any favourite CPU intensive git benchmarks feel free to try them too. I hope distributors will switch to use a feedback build in their packages. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-20Add option to disable NORETURNJunio C Hamano
Due to a bug in gcc 4.6+ it can crash when doing profile feedback with a noreturn function pointer (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49299) This adds a Makefile variable to disable noreturns. [Patch by Junio, description by Andi Kleen] Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-15Update the Interix default build configuration.Markus Duft
Currently, on Interix, libsuacomp is required for building (see [1]). Since suacomp provides poll() and inttypes.h for all interix versions, remove NO_*=YesPlease that are no longer necessary. Interix versions 3 and 5 miss struct sockaddr_storage, so make git avoid using it. Same for FNMATCH_CASEFOLD, which does not exist for Interix 3 and 5. [1] http://news.gmane.org/find-root.php?message_id=%3c4DDF4440.4040405%40gentoo.org%3e Signed-off-by: Markus Duft <mduft@gentoo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-30Merge branch 'mk/grep-pcre'Junio C Hamano
* mk/grep-pcre: git-grep: Fix problems with recently added tests git-grep: Update tests (mainly for -P) Makefile: Pass USE_LIBPCRE down in GIT-BUILD-OPTIONS git-grep: update tests now regexp type is "last one wins" git-grep: do not die upon -F/-P when grep.extendedRegexp is set. git-grep: Bail out when -P is used with -F or -E grep: Add basic tests configure: Check for libpcre git-grep: Learn PCRE grep: Extract compile_regexp_failed() from compile_regexp() grep: Fix a typo in a comment grep: Put calls to fixmatch() and regmatch() into patmatch() contrib/completion: --line-number to git grep Documentation: Add --line-number to git-grep synopsis
2011-05-30Merge branch 'jk/haves-from-alternate-odb'Junio C Hamano
* jk/haves-from-alternate-odb: receive-pack: eliminate duplicate .have refs bisect: refactor sha1_array into a generic sha1 list refactor refs_from_alternate_cb to allow passing extra data
2011-05-26Merge branch 'rg/no-gecos-in-pwent'Junio C Hamano
* rg/no-gecos-in-pwent: ident: add NO_GECOS_IN_PWENT for systems without pw_gecos in struct passwd Conflicts: Makefile
2011-05-26Merge branch 'kk/maint-prefix-in-config-mak' into maintJunio C Hamano
* kk/maint-prefix-in-config-mak: Honor $(prefix) set in config.mak* when defining ETC_GIT* Revert "Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir" Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir
2011-05-23Merge branch 'ab/i18n-scripts-basic'Junio C Hamano
* ab/i18n-scripts-basic: Makefile: add xgettext target for *.sh files git-sh-i18n.sh: add GIT_GETTEXT_POISON support git-sh-i18n.sh: add no-op gettext() and eval_gettext() wrappers git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext()
2011-05-21streaming: a new API to read from the object storeJunio C Hamano
Given an object name, use open_istream() to get a git_istream handle that you can read_istream() from as if you are using read(2) to read the contents of the object, and close it with close_istream() when you are done. Currently, we do not do anything fancy--it just calls read_sha1_file() and keeps the contents in memory as a whole, and carve it out as you request with read_istream(). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-20bisect: refactor sha1_array into a generic sha1 listJeff King
This is a generally useful abstraction, so let's let others make use of it. The refactoring is more or less a straight copy; however, functions and struct members have had their names changed to match string_list, which is the most similar data structure. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-20Makefile: sort TEST_PROGRAMS listJeff King
We usually keep these lists in sorted order, but the last few entries were just tacked on the end. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-20ident: add NO_GECOS_IN_PWENT for systems without pw_gecos in struct passwdRafael Gieschke
Allow NO_GECOS_IN_PWENT to be defined in the Makefile for platforms that lack the pw_gecos field in their "struct passwd", in which case the uppercased user name is used instead via the standard '&' replacement mechanism. Signed-off-by: Rafael Gieschke <rafael@gieschke.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-17Merge branch 'kk/maint-prefix-in-config-mak'Junio C Hamano
* kk/maint-prefix-in-config-mak: Honor $(prefix) set in config.mak* when defining ETC_GIT* Revert "Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir" Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir
2011-05-16Makefile: Pass USE_LIBPCRE down in GIT-BUILD-OPTIONSJunio C Hamano
Otherwise we would fail to rebuild correctly when this option was changed between $(MAKE) invocations, and more importantly, $(MAKE) test would not pass it down and t/test-lib.sh would not set the LIBPCRE prerequisite. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-15Makefile: add xgettext target for *.sh filesÆvar Arnfjörð Bjarmason
Change the "pot" target to also extract strings from our $(SCRIPT_SH) files with xgettext(1). Note that due to Jonathan Nieder's trick of doing "mv $@+ $@" at the end of the target the "pot" target will now warn: $ make pot XGETTEXT po/git.pot po/git.pot+: warning: Charset "CHARSET" is not a portable encoding name. Message conversion to user's charset might not work. This warnings is emitted because xgettext is writing into a non-*.pot file, it's harmless however. The content that's written out is equivalent to what it would be if we were writing directly into an existing POT file with --join-existing. As part of this change I've eliminated the && chain between xgettext calls, this is incompatible with $(QUIET_XGETTEXT), if the && is left in it'll emit: /bin/sh: @echo: not found Since it's redundant (the Makefile will stop if there's an error) I've removed it altogether. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-15git-sh-i18n.sh: add no-op gettext() and eval_gettext() wrappersÆvar Arnfjörð Bjarmason
Add a no-op wrapper library for Git's shell scripts. To split up the gettext series I'm first submitting patches to gettextize the source tree before I add any of the Makefile and Shell library changes needed to actually use them. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-15git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext()Ævar Arnfjörð Bjarmason
Add a git-sh-i18n--envsubst program which is a stripped-down version of the GNU envsubst(1) program that comes with GNU gettext for use in the eval_gettext() fallback. We need a C helper program because implementing eval_gettext() purely in shell turned out to be unworkable. Digging through the Git mailing list archives will reveal two shell implementations of eval_gettext that are almost good enough, but fail on an edge case which is tested for in the tests which are part of this patch. These are the modifications I made to envsubst.c as I turned it into sh-i18n--envsubst.c: * Added our git-compat-util.h header for xrealloc() and friends. * Removed inclusion of gettext-specific headers. * Removed most of main() and replaced it with my own. The modified version only does option parsing for --variables. That's all it needs. * Modified error() invocations to use our error() instead of error(3). * Replaced the gettext XNMALLOC(n, size) macro with just xmalloc(n). Since XNMALLOC() only allocated char's. * Removed the string_list_destroy function. It's redundant (also in the upstream code). * Replaced the use of stdbool.h (a C99 header) by doing the following replacements on the code: * s/bool/unsigned short int/g * s/true/1/g * s/false/0/g Reported-by: Johannes Sixt <j.sixt@viscovery.net> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-11Merge branch 'jn/gitweb-dependency'Junio C Hamano
* jn/gitweb-dependency: Remove gitweb/gitweb.cgi and other legacy targets from main Makefile git-instaweb: Simplify build dependency on gitweb
2011-05-10git-grep: Learn PCREMichał Kiedrowicz
This patch teaches git-grep the --perl-regexp/-P options (naming borrowed from GNU grep) in order to allow specifying PCRE regexes on the command line. PCRE has a number of features which make them more handy to use than POSIX regexes, like consistent escaping rules, extended character classes, ungreedy matching etc. git isn't build with PCRE support automatically. USE_LIBPCRE environment variable must be enabled (like `make USE_LIBPCRE=YesPlease`). Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-10Honor $(prefix) set in config.mak* when defining ETC_GIT*Johannes Sixt
Notice that the prefix specified for the build influenced the definitions of ETC_GITCONFIG and ETC_GITATTRIBUTES only when it was exactly '/usr'. Kacper Kornet noticed that this was furthermore only the case when the build was triggered using 'make prefix=/usr', i.e., the prefix was given on the command line; it did not work when the prefix was specified in config.mak because this file is included much later in the Makefile. To fix this, move the conditional after the inclusion of config.mak. Additionally, it is desirable to specify the etc directory for a build (for example, a build with prefix /usr/local may still want to have the system configuration in /etc/gitconfig). For this purpose, promote the variable 'sysconfdir' from a helper variable to a configuration variable. The prefix check that was moved must now be wrapped so that it does not override sysconfdir setting given in config.mak. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-10Revert "Honor $(prefix) set in config.mak* when defining ETC_GIT* and ↵Junio C Hamano
sysconfdir" This reverts commit 2910bf56a4ffc13c398fb04ba32910cb3b724091, as it does not really solve the issue of making $(sysconfigdir) any more useful than it currently is.
2011-05-08Remove gitweb/gitweb.cgi and other legacy targets from main MakefileJakub Narebski
Now that there is gitweb/Makefile, let's leave only "gitweb" and "install-gitweb" targets in main Makefile. Those targets just delegate to gitweb's Makefile. Requested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-08git-instaweb: Simplify build dependency on gitwebJakub Narebski
Since c0cb4ed (git-instaweb: Configure it to work with new gitweb structure, 2010-05-28) git-instaweb does not re-create gitweb.cgi etc., but makes use of installed gitweb. Therefore simplify git-instaweb dependency on gitweb subsystem in main Makefile from 'gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/static/gitweb.js' to simply 'gitweb'. This is preparation for splitting gitweb.perl script, and for splitting gitweb.js (to be reassembled / combined on build). This way we don't have to duplicate parts of gitweb/Makefile in main Makefile... it is also more correct description of git-instaweb dependency. Reported-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-06Merge branch 'js/info-man-path'Junio C Hamano
* js/info-man-path: Documentation: clarify meaning of --html-path, --man-path, and --info-path git: add --info-path and --man-path options Conflicts: Makefile
2011-05-02git: add --info-path and --man-path optionsJon Seymour
Similar to the way the --html-path option lets UI programs learn where git has its HTML documentation pages, expose the other two paths used to store the documentation pages of these two types. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-29Merge branch 'mz/rebase'Junio C Hamano
* mz/rebase: (34 commits) rebase: define options in OPTIONS_SPEC Makefile: do not install sourced rebase scripts rebase: use @{upstream} if no upstream specified rebase -i: remove unnecessary state rebase-root rebase -i: don't read unused variable preserve_merges git-rebase--am: remove unnecessary --3way option rebase -m: don't print exit code 2 when merge fails rebase -m: remember allow_rerere_autoupdate option rebase: remember strategy and strategy options rebase: remember verbose option rebase: extract code for writing basic state rebase: factor out sub command handling rebase: make -v a tiny bit more verbose rebase -i: align variable names rebase: show consistent conflict resolution hint rebase: extract am code to new source file rebase: extract merge code to new source file rebase: remove $branch as synonym for $orig_head rebase -i: support --stat rebase: factor out call to pre-rebase hook ...
2011-04-29Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdirKacper Kornet
Definitions of ETC_GITCONFIG, ETC_GITATTRIBUTES and sysconfdir depend on value of prefix. As prefix can be changed in config.mak.autogen, all if blocks with conditions based on prefix should be placed after the file is included in Makefile. Signed-off-by: Kacper Kornet <draenog@pld-linux.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-22sparse: Fix errors due to missing target-specific variablesRamsay Jones
In particular, sparse issues the following errors: attr.c:472:43: error: undefined identifier 'ETC_GITATTRIBUTES' config.c:821:43: error: undefined identifier 'ETC_GITCONFIG' exec_cmd.c:14:37: error: undefined identifier 'PREFIX' exec_cmd.c:83:28: error: undefined identifier 'GIT_EXEC_PATH' builtin/help.c:328:46: error: undefined identifier 'GIT_MAN_PATH' builtin/help.c:374:40: error: undefined identifier 'GIT_INFO_PATH' builtin/help.c:382:45: error: undefined identifier 'GIT_HTML_PATH' git.c:96:42: error: undefined identifier 'GIT_HTML_PATH' git.c:241:35: error: invalid initializer http.c:293:43: error: undefined identifier 'GIT_HTTP_USER_AGENT' which is caused by not passing the target-specific additions to the EXTRA_CPPFLAGS variable to cgcc. In order to fix the problem, we define a new sparse target which depends on a set of non-existent "sparse object" files (*.sp) which correspond to the set of C source files. In addition to the new target, we also provide a new pattern rule for "creating" the sparse object files from the source files by running cgcc. This allows us to add '*.sp' to the rules setting the target-specific EXTRA_CPPFLAGS variable, which is then included in the new pattern rule to run cgcc. Also, we change the 'check' target to re-direct the user to the new sparse target. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-11sparse: Fix an "symbol 'merge_file' not decared" warningRamsay Jones
In order to fix the warning, we add a new "merge-file.h" header containing the extern declaration of the merge_file() function, and include the header in the source files that require the declaration. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-11Makefile: Use cgcc rather than sparse in the check targetRamsay Jones
cgcc is the recommended way to run sparse, since it provides many -Defines suitable for the given gcc platform. Using an "cgcc -no-compile" command runs sparse, with all the platform specific definitions provided by cgcc, without also invoking gcc. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-11Makefile: extract Q_() source strings as ngettext()Ævar Arnfjörð Bjarmason
The Q_() wrapper added by 0c9ea33 (i18n: add stub Q_() wrapper for ngettext, 2011-03-09) needs to be noticed by xgettext. Add an appropriate --keyword option to the Makefile, so that "make pot" would notice the strings in the plural form marked with the wrapper. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-02Merge branch 'sb/sparse-more'Junio C Hamano
* sb/sparse-more: Makefile: Cover more files with make check
2011-03-24Merge branch 'jn/maint-c99-format'Junio C Hamano
* jn/maint-c99-format: unbreak and eliminate NO_C99_FORMAT mktag: avoid %td in format string