contrib / svn-fe / Makefileon commit Sync with maint (247b4d5)
   1all:: svn-fe$X
   2
   3CC = gcc
   4RM = rm -f
   5MV = mv
   6
   7CFLAGS = -g -O2 -Wall
   8LDFLAGS =
   9ALL_CFLAGS = $(CFLAGS)
  10ALL_LDFLAGS = $(LDFLAGS)
  11EXTLIBS =
  12
  13GIT_LIB = ../../libgit.a
  14VCSSVN_LIB = ../../vcs-svn/lib.a
  15LIBS = $(VCSSVN_LIB) $(GIT_LIB) $(EXTLIBS)
  16
  17QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir
  18QUIET_SUBDIR1 =
  19
  20ifneq ($(findstring $(MAKEFLAGS),w),w)
  21PRINT_DIR = --no-print-directory
  22else # "make -w"
  23NO_SUBDIR = :
  24endif
  25
  26ifneq ($(findstring $(MAKEFLAGS),s),s)
  27ifndef V
  28        QUIET_CC      = @echo '   ' CC $@;
  29        QUIET_LINK    = @echo '   ' LINK $@;
  30        QUIET_SUBDIR0 = +@subdir=
  31        QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo '   ' SUBDIR $$subdir; \
  32                        $(MAKE) $(PRINT_DIR) -C $$subdir
  33endif
  34endif
  35
  36svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(GIT_LIB)
  37        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ svn-fe.o \
  38                $(ALL_LDFLAGS) $(LIBS)
  39
  40svn-fe.o: svn-fe.c ../../vcs-svn/svndump.h
  41        $(QUIET_CC)$(CC) -I../../vcs-svn -o $*.o -c $(ALL_CFLAGS) $<
  42
  43svn-fe.html: svn-fe.txt
  44        $(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \
  45                MAN_TXT=../contrib/svn-fe/svn-fe.txt \
  46                ../contrib/svn-fe/$@
  47
  48svn-fe.1: svn-fe.txt
  49        $(QUIET_SUBDIR0)../../Documentation $(QUIET_SUBDIR1) \
  50                MAN_TXT=../contrib/svn-fe/svn-fe.txt \
  51                ../contrib/svn-fe/$@
  52        $(MV) ../../Documentation/svn-fe.1 .
  53
  54../../vcs-svn/lib.a: FORCE
  55        $(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) vcs-svn/lib.a
  56
  57../../libgit.a: FORCE
  58        $(QUIET_SUBDIR0)../.. $(QUIET_SUBDIR1) libgit.a
  59
  60clean:
  61        $(RM) svn-fe$X svn-fe.o svn-fe.html svn-fe.xml svn-fe.1
  62
  63.PHONY: all clean FORCE