diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 14 |
1 files changed, 13 insertions, 1 deletions
| @@ -19,6 +19,18 @@ endif | |||
| 19 | CFLAGS += -Igit -DSHA1_HEADER='$(SHA1_HEADER)' | 19 | CFLAGS += -Igit -DSHA1_HEADER='$(SHA1_HEADER)' |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | # | ||
| 23 | # If make is run on a nongit platform, we need to get the git sources as a tarball. | ||
| 24 | # But there is currently no recent enough tarball available on kernel.org, so download | ||
| 25 | # a zipfile from hjemli.net instead | ||
| 26 | # | ||
| 27 | GITVER = $(shell git version 2>/dev/null || echo nogit) | ||
| 28 | ifeq ($(GITVER),nogit) | ||
| 29 | GITURL = http://hjemli.net/git/git/snapshot/?id=v1.5.2-rc2 | ||
| 30 | INITGIT = test -e git/git.c || (curl "$(GITURL)" > tmp.zip && unzip tmp.zip) | ||
| 31 | else | ||
| 32 | INITGIT = ./submodules.sh -i | ||
| 33 | endif | ||
| 22 | 34 | ||
| 23 | 35 | ||
| 24 | # | 36 | # |
| @@ -33,7 +45,7 @@ cgit: cgit.c cgit.h $(OBJECTS) | |||
| 33 | $(OBJECTS): cgit.h git/libgit.a | 45 | $(OBJECTS): cgit.h git/libgit.a |
| 34 | 46 | ||
| 35 | git/libgit.a: | 47 | git/libgit.a: |
| 36 | ./submodules.sh -i | 48 | $(INITGIT) |
| 37 | $(MAKE) -C git | 49 | $(MAKE) -C git |
| 38 | 50 | ||
| 39 | # | 51 | # |
