git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] contrib/svn-fe: fix Makefile
  2014-08-26 12:44 [PATCH] contrib/svn-fe: fix Makefile Maxim Bublis
@ 2014-08-26  9:31 ` Torsten Bögershausen
  2014-08-27 17:36   ` Maxim Bublis
  0 siblings, 1 reply; 3+ messages in thread
From: Torsten Bögershausen @ 2014-08-26  9:31 UTC (permalink / raw)
  To: Maxim Bublis, git

On 08/26/2014 02:44 PM, Maxim Bublis wrote:
> Fixes several problems:
>    * include config.mak.uname, config.mak.autogen and config.mak
>      in order to use settings for prefix and other such things;
>    * link xdiff/lib.a as it is a requirement for libgit.a;
>    * fix CFLAGS and EXTLIBS for Linux and Mac OS X.
> ---
>   contrib/svn-fe/Makefile | 47 ++++++++++++++++++++++++++++++++++++++---------
>   1 file changed, 38 insertions(+), 9 deletions(-)
>
> diff --git a/contrib/svn-fe/Makefile b/contrib/svn-fe/Makefile
> index 360d8da..8e1d622 100644
> --- a/contrib/svn-fe/Makefile
> +++ b/contrib/svn-fe/Makefile
> @@ -1,18 +1,45 @@
>   all:: svn-fe$X
>   
> -CC = gcc
> +CC = cc
>   RM = rm -f
>   MV = mv
>   
>   CFLAGS = -g -O2 -Wall
>   LDFLAGS =
> -ALL_CFLAGS = $(CFLAGS)
> -ALL_LDFLAGS = $(LDFLAGS)
> -EXTLIBS =
> +EXTLIBS = -lz
> +
> +include ../../config.mak.uname
> +-include ../../config.mak.autogen
> +-include ../../config.mak
> +
> +ifeq ($(uname_S),Darwin)
> +	CFLAGS += -I/opt/local/include
> +	LDFLAGS += -L/opt/local/lib
> +endif
> +
Should it be possible to disable this by using NO_DARWIN_PORTS
like we do in the main Makefile ?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] contrib/svn-fe: fix Makefile
@ 2014-08-26 12:44 Maxim Bublis
  2014-08-26  9:31 ` Torsten Bögershausen
  0 siblings, 1 reply; 3+ messages in thread
From: Maxim Bublis @ 2014-08-26 12:44 UTC (permalink / raw)
  To: git; +Cc: Maxim Bublis

Fixes several problems:
  * include config.mak.uname, config.mak.autogen and config.mak
    in order to use settings for prefix and other such things;
  * link xdiff/lib.a as it is a requirement for libgit.a;
  * fix CFLAGS and EXTLIBS for Linux and Mac OS X.
---
 contrib/svn-fe/Makefile | 47 ++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 38 insertions(+), 9 deletions(-)

diff --git a/contrib/svn-fe/Makefile b/contrib/svn-fe/Makefile
index 360d8da..8e1d622 100644
--- a/contrib/svn-fe/Makefile
+++ b/contrib/svn-fe/Makefile
@@ -1,18 +1,45 @@
 all:: svn-fe$X
 
-CC = gcc
+CC = cc
 RM = rm -f
 MV = mv
 
 CFLAGS = -g -O2 -Wall
 LDFLAGS =
-ALL_CFLAGS = $(CFLAGS)
-ALL_LDFLAGS = $(LDFLAGS)
-EXTLIBS =
+EXTLIBS = -lz
+
+include ../../config.mak.uname
+-include ../../config.mak.autogen
+-include ../../config.mak
+
+ifeq ($(uname_S),Darwin)
+	CFLAGS += -I/opt/local/include
+	LDFLAGS += -L/opt/local/lib
+endif
+
+ifndef NO_OPENSSL
+	EXTLIBS += -lssl -lcrypto
+endif
+
+ifndef NO_PTHREADS
+	CFLAGS += $(PTHREADS_CFLAGS)
+	EXTLIBS += $(PTHREAD_LIBS)
+endif
+
+ifdef HAVE_CLOCK_GETTIME
+	CFLAGS += -DHAVE_CLOCK_GETTIME
+	EXTLIBS += -lrt
+endif
+
+ifdef NEEDS_LIBICONV
+	EXTLIBS += -liconv
+endif
 
 GIT_LIB = ../../libgit.a
 VCSSVN_LIB = ../../vcs-svn/lib.a
-LIBS = $(VCSSVN_LIB) $(GIT_LIB) $(EXTLIBS)
+XDIFF_LIB = ../../xdiff/lib.a
+
+LIBS = $(VCSSVN_LIB) $(GIT_LIB) $(XDIFF_LIB)
 
 QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir
 QUIET_SUBDIR1 =
@@ -33,12 +60,11 @@ ifndef V
 endif
 endif
 
-svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(GIT_LIB)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ svn-fe.o \
-		$(ALL_LDFLAGS) $(LIBS)
+svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(XDIFF_LIB) $(GIT_LIB)
+	$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(EXTLIBS) -o $@ svn-fe.o $(LIBS)
 
 svn-fe.o: svn-fe.c ../../vcs-svn/svndump.h
-	$(QUIET_CC)$(CC) -I../../vcs-svn -o $*.o -c $(ALL_CFLAGS) $<
+	$(QUIET_CC)$(CC) $(CFLAGS) -I../../vcs-svn -o $*.o -c $<
 
 svn-fe.html: svn-fe.txt
 	$(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \
@@ -54,6 +80,9 @@ svn-fe.1: svn-fe.txt
 ../../vcs-svn/lib.a: FORCE
 	$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) vcs-svn/lib.a
 
+../../xdiff/lib.a: FORCE
+	$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) xdiff/lib.a
+
 ../../libgit.a: FORCE
 	$(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) libgit.a
 
-- 
1.8.5.2 (Apple Git-48)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] contrib/svn-fe: fix Makefile
  2014-08-26  9:31 ` Torsten Bögershausen
@ 2014-08-27 17:36   ` Maxim Bublis
  0 siblings, 0 replies; 3+ messages in thread
From: Maxim Bublis @ 2014-08-27 17:36 UTC (permalink / raw)
  To: Torsten Bögershausen; +Cc: git


On 26 авг. 2014 г., at 13:31, Torsten Bögershausen <tboegi@web.de> wrote:

> On 08/26/2014 02:44 PM, Maxim Bublis wrote:
>> 
>> +
>> +ifeq ($(uname_S),Darwin)
>> +	CFLAGS += -I/opt/local/include
>> +	LDFLAGS += -L/opt/local/lib
>> +endif
>> +
> Should it be possible to disable this by using NO_DARWIN_PORTS
> like we do in the main Makefile ?

I think so, thanks for pointing me on that. Though I hope it wouldn’t be too much "copy-paste”
from main Makefile to support all options in both Makefiles.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-27 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-26 12:44 [PATCH] contrib/svn-fe: fix Makefile Maxim Bublis
2014-08-26  9:31 ` Torsten Bögershausen
2014-08-27 17:36   ` Maxim Bublis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).