{"thread":{"id":"37416","subject":"[PATCH] contrib/svn-fe: fix Makefile","startedAt":"2014-08-26T09:31:48Z","lastAt":"2014-08-27T17:36:15Z","messageCount":3,"participants":["Maxim Bublis","Torsten Bögershausen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"248343","messageId":"53FC5404.7050403@web.de","threadId":"37416","inReplyTo":"1409057062-72857-1-git-send-email-satori@yandex-team.ru","subject":"Re: [PATCH] contrib/svn-fe: fix Makefile","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2014-08-26T09:31:48Z","receivedAt":"2014-08-26T09:31:48Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 08/26/2014 02:44 PM, Maxim Bublis wrote:\n> Fixes several problems:\n>    * include config.mak.uname, config.mak.autogen and config.mak\n>      in order to use settings for prefix and other such things;\n>    * link xdiff/lib.a as it is a requirement for libgit.a;\n>    * fix CFLAGS and EXTLIBS for Linux and Mac OS X.\n> ---\n>   contrib/svn-fe/Makefile | 47 ++++++++++++++++++++++++++++++++++++++---------\n>   1 file changed, 38 insertions(+), 9 deletions(-)\n>\n> diff --git a/contrib/svn-fe/Makefile b/contrib/svn-fe/Makefile\n> index 360d8da..8e1d622 100644\n> --- a/contrib/svn-fe/Makefile\n> +++ b/contrib/svn-fe/Makefile\n> @@ -1,18 +1,45 @@\n>   all:: svn-fe$X\n>   \n> -CC = gcc\n> +CC = cc\n>   RM = rm -f\n>   MV = mv\n>   \n>   CFLAGS = -g -O2 -Wall\n>   LDFLAGS =\n> -ALL_CFLAGS = $(CFLAGS)\n> -ALL_LDFLAGS = $(LDFLAGS)\n> -EXTLIBS =\n> +EXTLIBS = -lz\n> +\n> +include ../../config.mak.uname\n> +-include ../../config.mak.autogen\n> +-include ../../config.mak\n> +\n> +ifeq ($(uname_S),Darwin)\n> +\tCFLAGS += -I/opt/local/include\n> +\tLDFLAGS += -L/opt/local/lib\n> +endif\n> +\nShould it be possible to disable this by using NO_DARWIN_PORTS\nlike we do in the main Makefile ?\n"},{"id":"248307","messageId":"1409057062-72857-1-git-send-email-satori@yandex-team.ru","threadId":"37416","inReplyTo":null,"subject":"[PATCH] contrib/svn-fe: fix Makefile","fromName":"Maxim Bublis","fromEmail":"satori@yandex-team.ru","sentAt":"2014-08-26T12:44:22Z","receivedAt":"2014-08-26T12:44:22Z","isPatch":true,"sender":{"key":"satori@yandex-team.ru","avatar":null},"body":"Fixes several problems:\n  * include config.mak.uname, config.mak.autogen and config.mak\n    in order to use settings for prefix and other such things;\n  * link xdiff/lib.a as it is a requirement for libgit.a;\n  * fix CFLAGS and EXTLIBS for Linux and Mac OS X.\n---\n contrib/svn-fe/Makefile | 47 ++++++++++++++++++++++++++++++++++++++---------\n 1 file changed, 38 insertions(+), 9 deletions(-)\n\ndiff --git a/contrib/svn-fe/Makefile b/contrib/svn-fe/Makefile\nindex 360d8da..8e1d622 100644\n--- a/contrib/svn-fe/Makefile\n+++ b/contrib/svn-fe/Makefile\n@@ -1,18 +1,45 @@\n all:: svn-fe$X\n \n-CC = gcc\n+CC = cc\n RM = rm -f\n MV = mv\n \n CFLAGS = -g -O2 -Wall\n LDFLAGS =\n-ALL_CFLAGS = $(CFLAGS)\n-ALL_LDFLAGS = $(LDFLAGS)\n-EXTLIBS =\n+EXTLIBS = -lz\n+\n+include ../../config.mak.uname\n+-include ../../config.mak.autogen\n+-include ../../config.mak\n+\n+ifeq ($(uname_S),Darwin)\n+\tCFLAGS += -I/opt/local/include\n+\tLDFLAGS += -L/opt/local/lib\n+endif\n+\n+ifndef NO_OPENSSL\n+\tEXTLIBS += -lssl -lcrypto\n+endif\n+\n+ifndef NO_PTHREADS\n+\tCFLAGS += $(PTHREADS_CFLAGS)\n+\tEXTLIBS += $(PTHREAD_LIBS)\n+endif\n+\n+ifdef HAVE_CLOCK_GETTIME\n+\tCFLAGS += -DHAVE_CLOCK_GETTIME\n+\tEXTLIBS += -lrt\n+endif\n+\n+ifdef NEEDS_LIBICONV\n+\tEXTLIBS += -liconv\n+endif\n \n GIT_LIB = ../../libgit.a\n VCSSVN_LIB = ../../vcs-svn/lib.a\n-LIBS = $(VCSSVN_LIB) $(GIT_LIB) $(EXTLIBS)\n+XDIFF_LIB = ../../xdiff/lib.a\n+\n+LIBS = $(VCSSVN_LIB) $(GIT_LIB) $(XDIFF_LIB)\n \n QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir\n QUIET_SUBDIR1 =\n@@ -33,12 +60,11 @@ ifndef V\n endif\n endif\n \n-svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(GIT_LIB)\n-\t$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ svn-fe.o \\\n-\t\t$(ALL_LDFLAGS) $(LIBS)\n+svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(XDIFF_LIB) $(GIT_LIB)\n+\t$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(EXTLIBS) -o $@ svn-fe.o $(LIBS)\n \n svn-fe.o: svn-fe.c ../../vcs-svn/svndump.h\n-\t$(QUIET_CC)$(CC) -I../../vcs-svn -o $*.o -c $(ALL_CFLAGS) $<\n+\t$(QUIET_CC)$(CC) $(CFLAGS) -I../../vcs-svn -o $*.o -c $<\n \n svn-fe.html: svn-fe.txt\n \t$(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \\\n@@ -54,6 +80,9 @@ svn-fe.1: svn-fe.txt\n ../../vcs-svn/lib.a: FORCE\n \t$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) vcs-svn/lib.a\n \n+../../xdiff/lib.a: FORCE\n+\t$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) xdiff/lib.a\n+\n ../../libgit.a: FORCE\n \t$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) libgit.a\n \n-- \n1.8.5.2 (Apple Git-48)\n"},{"id":"248418","messageId":"6CB16507-1C40-45CE-9D12-227A0171C183@yandex-team.ru","threadId":"37416","inReplyTo":"53FC5404.7050403@web.de","subject":"Re: [PATCH] contrib/svn-fe: fix Makefile","fromName":"Maxim Bublis","fromEmail":"satori@yandex-team.ru","sentAt":"2014-08-27T17:36:15Z","receivedAt":"2014-08-27T17:36:15Z","isPatch":true,"sender":{"key":"satori@yandex-team.ru","avatar":null},"body":"\nOn 26 авг. 2014 г., at 13:31, Torsten Bögershausen <tboegi@web.de> wrote:\n\n> On 08/26/2014 02:44 PM, Maxim Bublis wrote:\n>> \n>> +\n>> +ifeq ($(uname_S),Darwin)\n>> +\tCFLAGS += -I/opt/local/include\n>> +\tLDFLAGS += -L/opt/local/lib\n>> +endif\n>> +\n> Should it be possible to disable this by using NO_DARWIN_PORTS\n> like we do in the main Makefile ?\n\nI think so, thanks for pointing me on that. Though I hope it wouldn’t be too much \"copy-paste”\nfrom main Makefile to support all options in both Makefiles."}]}