X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=Makefile;h=133808c82fe37a5dc086b7cdaf436bc3ce0027a6;hb=d53174dbae060153176279f8b4797e3a35421c95;hp=8b152dd5584f774aecc9bdf675cac14a55a98925;hpb=300b4801b75a59961e66ad9fa96941e46fd76be5;p=git.git diff --git a/Makefile b/Makefile index 8b152dd5..133808c8 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ # DEFINES += -DUSE_STDEV -GIT_VERSION = 0.99.7.GIT +GIT_VERSION = 0.99.8.GIT CFLAGS = -g -O2 -Wall ALL_CFLAGS = $(CFLAGS) $(PLATFORM_DEFINES) $(DEFINES) @@ -98,29 +98,33 @@ SCRIPT_PYTHON = \ # The ones that do not have to link with lcrypto nor lz. SIMPLE_PROGRAMS = \ - git-get-tar-commit-id$(X) git-mailinfo$(X) git-mailsplit$(X) \ - git-stripspace$(X) git-var$(X) git-daemon$(X) + git-get-tar-commit-id$X git-mailinfo$X git-mailsplit$X \ + git-stripspace$X git-var$X git-daemon$X # ... and all the rest PROGRAMS = \ - git-apply$(X) git-cat-file$(X) git-checkout-index$(X) \ - git-clone-pack$(X) git-commit-tree$(X) git-convert-objects$(X) \ - git-diff-files$(X) git-diff-index$(X) git-diff-stages$(X) \ - git-diff-tree$(X) git-fetch-pack$(X) git-fsck-objects$(X) \ - git-hash-object$(X) git-init-db$(X) git-local-fetch$(X) \ - git-ls-files$(X) git-ls-tree$(X) git-merge-base$(X) \ - git-merge-index$(X) git-mktag$(X) git-pack-objects$(X) \ - git-patch-id$(X) git-peek-remote$(X) git-prune-packed$(X) \ - git-read-tree$(X) git-receive-pack$(X) git-rev-list$(X) \ - git-rev-parse$(X) git-send-pack$(X) git-show-branch$(X) \ - git-show-index$(X) git-ssh-fetch$(X) git-ssh-upload$(X) \ - git-tar-tree$(X) git-unpack-file$(X) git-unpack-objects$(X) \ - git-update-index$(X) git-update-server-info$(X) \ - git-upload-pack$(X) git-verify-pack$(X) git-write-tree$(X) \ - git-update-ref$(X) $(SIMPLE_PROGRAMS) + git-apply$X git-cat-file$X \ + git-checkout-index$X git-clone-pack$X git-commit-tree$X \ + git-convert-objects$X git-diff-files$X \ + git-diff-index$X git-diff-stages$X \ + git-diff-tree$X git-fetch-pack$X git-fsck-objects$X \ + git-hash-object$X git-init-db$X \ + git-local-fetch$X git-ls-files$X git-ls-tree$X git-merge-base$X \ + git-merge-index$X git-mktag$X git-pack-objects$X git-patch-id$X \ + git-peek-remote$X git-prune-packed$X git-read-tree$X \ + git-receive-pack$X git-rev-list$X git-rev-parse$X \ + git-send-pack$X git-show-branch$X \ + git-show-index$X git-ssh-fetch$X \ + git-ssh-upload$X git-tar-tree$X git-unpack-file$X \ + git-unpack-objects$X git-update-index$X git-update-server-info$X \ + git-upload-pack$X git-verify-pack$X git-write-tree$X \ + git-update-ref$X git-symbolic-ref$X \ + $(SIMPLE_PROGRAMS) # Backward compatibility -- to be removed after 1.0 -PROGRAMS += git-ssh-pull$(X) git-ssh-push$(X) +PROGRAMS += git-ssh-pull$X git-ssh-push$X + +GIT_LIST_TWEAK = PYMODULES = \ gitMergeCommon.py @@ -131,6 +135,8 @@ endif ifdef WITH_SEND_EMAIL SCRIPT_PERL += git-send-email.perl +else + GIT_LIST_TWEAK += -e '/^send-email$$/d' endif LIB_FILE=libgit.a @@ -181,6 +187,10 @@ endif ifneq (,$(findstring arm,$(shell uname -m))) ARM_SHA1 = YesPlease endif +ifeq ($(shell uname -s),OpenBSD) + NEEDS_LIBICONV = YesPlease + PLATFORM_DEFINES += -I/usr/local/include -L/usr/local/lib +endif ifndef NO_CURL ifdef CURLDIR @@ -190,7 +200,7 @@ ifndef NO_CURL else CURL_LIBCURL = -lcurl endif - PROGRAMS += git-http-fetch$(X) + PROGRAMS += git-http-fetch$X endif ifndef SHELL_PATH @@ -206,18 +216,32 @@ endif ifndef NO_OPENSSL LIB_OBJS += epoch.o OPENSSL_LIBSSL = -lssl + ifdef OPENSSLDIR + # Again this may be problematic -- gcc does not always want -R. + CFLAGS += -I$(OPENSSLDIR)/include + OPENSSL_LINK = -L$(OPENSSLDIR)/lib -R$(OPENSSLDIR)/lib + else + OPENSSL_LINK = + endif else DEFINES += '-DNO_OPENSSL' MOZILLA_SHA1 = 1 OPENSSL_LIBSSL = endif ifdef NEEDS_SSL_WITH_CRYPTO - LIB_4_CRYPTO = -lcrypto -lssl + LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto -lssl else - LIB_4_CRYPTO = -lcrypto + LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto endif ifdef NEEDS_LIBICONV - LIB_4_ICONV = -liconv + ifdef ICONVDIR + # Again this may be problematic -- gcc does not always want -R. + CFLAGS += -I$(ICONVDIR)/include + ICONV_LINK = -L$(ICONVDIR)/lib -R$(ICONVDIR)/lib + else + ICONV_LINK = + endif + LIB_4_ICONV = $(ICONV_LINK) -liconv else LIB_4_ICONV = endif @@ -273,7 +297,9 @@ all: git: git.sh Makefile rm -f $@+ $@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \ - -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' <$@.sh >$@+ + -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + -e 's/@@X@@/$(X)/g' \ + $(GIT_LIST_TWEAK) <$@.sh >$@+ chmod +x $@+ mv $@+ $@ @@ -299,30 +325,30 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py %.o: %.S $(CC) -o $*.o -c $(ALL_CFLAGS) $< -git-%$(X): %.o $(LIB_FILE) +git-%$X: %.o $(LIB_FILE) $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -git-mailinfo$(X) : SIMPLE_LIB += $(LIB_4_ICONV) +git-mailinfo$X : SIMPLE_LIB += $(LIB_4_ICONV) $(SIMPLE_PROGRAMS) : $(LIB_FILE) -$(SIMPLE_PROGRAMS) : git-%$(X) : %.o +$(SIMPLE_PROGRAMS) : git-%$X : %.o $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIB_FILE) $(SIMPLE_LIB) -git-http-fetch$(X): fetch.o -git-local-fetch$(X): fetch.o -git-ssh-fetch$(X): rsh.o fetch.o -git-ssh-upload$(X): rsh.o -git-ssh-pull$(X): rsh.o fetch.o -git-ssh-push$(X): rsh.o +git-http-fetch$X: fetch.o +git-local-fetch$X: fetch.o +git-ssh-fetch$X: rsh.o fetch.o +git-ssh-upload$X: rsh.o +git-ssh-pull$X: rsh.o fetch.o +git-ssh-push$X: rsh.o -git-http-fetch$(X): LIBS += $(CURL_LIBCURL) -git-rev-list$(X): LIBS += $(OPENSSL_LIBSSL) +git-http-fetch$X: LIBS += $(CURL_LIBCURL) +git-rev-list$X: LIBS += $(OPENSSL_LIBSSL) init-db.o: init-db.c $(CC) -c $(ALL_CFLAGS) \ -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir)"' $*.c $(LIB_OBJS): $(LIB_H) -$(patsubst git-%$(X),%.o,$(PROGRAMS)): $(LIB_H) +$(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(DIFF_OBJS): diffcore.h $(LIB_FILE): $(LIB_OBJS) @@ -337,10 +363,10 @@ doc: test: all $(MAKE) -C t/ all -test-date$(X): test-date.c date.o +test-date$X: test-date.c date.o $(CC) $(ALL_CFLAGS) -o $@ test-date.c date.o -test-delta$(X): test-delta.c diff-delta.o patch-delta.o +test-delta$X: test-delta.c diff-delta.o patch-delta.o $(CC) $(ALL_CFLAGS) -o $@ $^ check: