~ubuntu-branches/ubuntu/trusty/haproxy/trusty

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2009-10-19 22:31:45 UTC
  • mfrom: (1.1.7 upstream) (2.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20091019223145-259fs24dejjixo1f
New upstream bugfix release

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
# Use TARGET=<target_name> to optimize for a specifc target OS among the
71
71
# following list (use the default "generic" if uncertain) :
72
72
#    generic, linux22, linux24, linux24e, linux26, solaris,
73
 
#    freebsd, openbsd, custom
 
73
#    freebsd, openbsd, cygwin, custom
74
74
TARGET =
75
75
 
76
76
#### TARGET CPU
109
109
#### Debug settings
110
110
# You can enable debugging on specific code parts by setting DEBUG=-DDEBUG_xxx.
111
111
# Currently defined DEBUG macros include DEBUG_FULL, DEBUG_MEMORY, DEBUG_FSM,
112
 
# DEBUG_HASH and DEBUG_PARSE_NO_SPEEDUP. Please consult sources for exact
113
 
# meaning or do not use at all.
 
112
# and DEBUG_HASH. Please check sources for exact meaning or do not use at all.
114
113
DEBUG =
115
114
 
116
115
#### Additional include and library dirs
217
216
  USE_POLL       = implicit
218
217
  USE_KQUEUE     = implicit
219
218
  USE_TPROXY     = implicit
 
219
else
 
220
ifeq ($(TARGET),cygwin)
 
221
  # This is for Cygwin
 
222
  # Cygwin adds IPv6 support only in version 1.7 (in beta right now). 
 
223
  USE_POLL   = implicit
 
224
  USE_TPROXY = implicit
 
225
  TARGET_CFLAGS  = $(if $(filter 1.5.%, $(shell uname -r)), -DUSE_IPV6 -DAF_INET6=23 -DINET6_ADDRSTRLEN=46, )
 
226
endif # cygwin
220
227
endif # openbsd
221
228
endif # freebsd
222
229
endif # solaris
258
265
# holding the same names in the current directory.
259
266
 
260
267
ifeq ($(IGNOREGIT),)
261
 
VERSION := $(shell [ -d .git/. ] && ref=`(git-describe --tags) 2>/dev/null` && ref=$${ref%-g*} && echo "$${ref\#v}")
 
268
VERSION := $(shell [ -d .git/. ] && ref=`(git describe --tags) 2>/dev/null` && ref=$${ref%-g*} && echo "$${ref\#v}")
262
269
ifneq ($(VERSION),)
263
270
# OK git is there and works.
264
 
SUBVERS := $(shell comms=`git-log --no-merges v$(VERSION).. 2>/dev/null |grep -c ^commit `; [ $$comms -gt 0 ] && echo "-$$comms" )
265
 
VERDATE := $(shell date +%Y/%m/%d -d "`git-log HEAD^.. 2>/dev/null | sed -ne '/^Date:/{s/\(^[^ ]*:\)\|\( [-+].*\)//gp;q}'`" )
 
271
SUBVERS := $(shell comms=`git log --no-merges v$(VERSION).. 2>/dev/null |grep -c ^commit `; [ $$comms -gt 0 ] && echo "-$$comms" )
 
272
VERDATE := $(shell date +%Y/%m/%d -d "`git log --pretty=fuller HEAD^.. 2>/dev/null | sed -ne '/^CommitDate:/{s/\(^[^ ]*:\)\|\( [-+].*\)//gp;q}'`" )
266
273
endif
267
274
endif
268
275
 
440
447
        @echo "Please choose the target among the following supported list :"
441
448
        @echo
442
449
        @echo "   linux26, linux24, linux24e, linux22, solaris"
443
 
        @echo "   freebsd, openbsd, custom, generic"
 
450
        @echo "   freebsd, openbsd, cygwin, custom, generic"
444
451
        @echo
445
452
        @echo "Use \"generic\" if you don't want any optimization, \"custom\" if you"
446
453
        @echo "want to precisely tweak every option, or choose the target which"
506
513
        rm -f haproxy-$(VERSION).tar.gz haproxy-$(VERSION)$(SUBVERS).tar.gz
507
514
        rm -f haproxy-$(VERSION) nohup.out gmon.out
508
515
 
 
516
tags:
 
517
        find src include -name '*.c' -o -name '*.h' -print0 | \
 
518
           xargs -0 etags --declarations --members
 
519
 
509
520
tar:    clean
510
521
        ln -s . haproxy-$(VERSION)
511
522
        tar --exclude=haproxy-$(VERSION)/.git \
515
526
        rm -f haproxy-$(VERSION)
516
527
 
517
528
git-tar: clean
518
 
        git-tar-tree HEAD haproxy-$(VERSION) | gzip -9 > haproxy-$(VERSION)$(SUBVERS).tar.gz
 
529
        git archive --format=tar --prefix="haproxy-$(VERSION)/" HEAD | gzip -9 > haproxy-$(VERSION)$(SUBVERS).tar.gz
519
530
 
520
531
version:
521
532
        @echo "VERSION: $(VERSION)"