Skip to content

Commit

Permalink
Travis tests: compile with verbose flag using both clang and gcc
Browse files Browse the repository at this point in the history
Use preconfigured make config to avoid warnings when autoconf is not
used. This also fixes error emitted by `git describe` because the tags
are not available in the cloned repository.
  • Loading branch information
jonas committed Mar 8, 2014
1 parent bfc8a3d commit ec152a5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .travis.yml
@@ -1,13 +1,18 @@
language: c

compiler:
- clang
- gcc

env:
- TEST=autoconf
- TEST=make
- TEST=autoconf VERBOSE=1
- TEST=make VERBOSE=@

before_install: sudo apt-get update -qq

install: sudo apt-get install -qq --no-install-recommends asciidoc xmlto docbook-utils

script:
- if [ x"$TEST" = xautoconf ]; then ./autogen.sh && ./configure; fi
- make && make doc test && sudo make install install-doc
- if [ "$TEST" = autoconf ]; then ./autogen.sh && ./configure; fi
- if [ "$TEST" = make ]; then cp contrib/config.make .; fi
- make V=$VERBOSE DESTDIR=/tmp all test install install-doc
5 changes: 3 additions & 2 deletions Makefile
Expand Up @@ -22,9 +22,10 @@ mandir ?= $(datarootdir)/man
# DESTDIR=

ifneq (,$(wildcard .git))
GITDESC = $(subst tig-,,$(shell git describe))
GITDESC = $(subst tig-,,$(shell git describe 2>/dev/null))
COMMIT := $(if $(GITDESC),$(GITDESC),$(VERSION)-g$(shell git describe --always))
WTDIRTY = $(if $(shell git diff-index HEAD 2>/dev/null),-dirty)
VERSION = $(GITDESC)$(WTDIRTY)
VERSION = $(COMMIT)$(WTDIRTY)
endif
ifdef DIST_VERSION
VERSION = $(DIST_VERSION)
Expand Down

0 comments on commit ec152a5

Please sign in to comment.