OSDN Git Service

Make pkg-config test if CROSS_COMPILE applies...
authorPeter Jones <pjones@redhat.com>
Mon, 13 Feb 2017 22:16:28 +0000 (17:16 -0500)
committerPeter Jones <pjones@redhat.com>
Mon, 25 Sep 2017 20:30:19 +0000 (16:30 -0400)
Signed-off-by: Peter Jones <pjones@redhat.com>
.travis.yml
Make.defaults

index 8c19195..7703dd1 100644 (file)
@@ -1,7 +1,7 @@
 sudo: required
 language: c
 install: true
-script: make mkvars all
+script: make all
 
 matrix:
   include:
@@ -9,27 +9,57 @@ matrix:
       env:
         - COMPILER=gcc-4.9
         - CROSS_COMPILE=x86_64-linux-gnu-
+      dist: xenial
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+          packages:
+            - gcc-4.9
+            - binutils
       before_install:
         - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
         - sudo apt-get update -qq
-        - sudo apt-get install gcc-4.9 binutils
+        - sudo apt-get install gcc-4.9 binutils libpopt-dev pkg-config
+        - test -n $CC && unset CC
     - compiler: gcc
       env:
         - COMPILER=gcc-5
         - CROSS_COMPILE=x86_64-linux-gnu-
+      dist: xenial
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+          packages:
+            - gcc-5
+            - binutils
       before_install:
         - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
         - sudo apt-get update -qq
-        - sudo apt-get install gcc-5 binutils
+        - sudo apt-get install gcc-5 binutils libpopt-dev pkg-config
+        - test -n $CC && unset CC
     - compiler: gcc
-      before_install:
-        - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
-        - sudo apt-get update -qq
-        - sudo apt-get install gcc-6 binutils
       env:
         - COMPILER=gcc-6
         - CROSS_COMPILE=x86_64-linux-gnu-
+      dist: xenial
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+          packages:
+            - gcc-6
+            - binutils
+      before_install:
+        - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
+        - sudo apt-get update -qq
+        - sudo apt-get install gcc-6 binutils libpopt-dev pkg-config
+        - test -n $CC && unset CC
 #    - compiler: gcc
+#      env:
+#        - COMPILER=gcc-7
+#        - CROSS_COMPILE=x86_64-linux-gnu-
 #      dist: zesty
 #      addons:
 #        apt:
@@ -38,45 +68,43 @@ matrix:
 #          packages:
 #            - gcc-7
 #            - binutils
-#      env:
-#        - COMPILER=gcc-7
-#        - CROSS_COMPILE=x86_64-linux-gnu-
 #      before_install:
 #        - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
 #        - sudo apt-get update -qq
-#        - sudo apt-get install gcc-7 binutils
+#        - sudo apt-get install gcc-7 binutils libpopt-dev pkg-config
+#        - test -n $CC && unset CC
 #    - compiler: clang
 #      env: COMPILER=clang-3.6
 #      before_install:
 #        - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
 #        - sudo add-apt-repository ppa:jonathonf/llvm -y
 #        - sudo apt-get update -qq
-#        - sudo apt-get install clang-3.6 binutils
+#        - sudo apt-get install clang-3.6 binutils libpopt-dev pkg-config
 #    - compiler: clang
 #      env: COMPILER=clang-3.7
 #      before_install:
 #        - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
 #        - sudo add-apt-repository ppa:jonathonf/llvm -y
 #        - sudo apt-get update -qq
-#        - sudo apt-get install clang-3.7 binutils
+#        - sudo apt-get install clang-3.7 binutils libpopt-dev pkg-config
 #    - compiler: clang
 #      env: COMPILER=clang-3.8
 #      before_install:
 #        - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
 #        - sudo add-apt-repository ppa:jonathonf/llvm -y
 #        - sudo apt-get update -qq
-#        - sudo apt-get install clang-3.8 binutils
+#        - sudo apt-get install clang-3.8 binutils libpopt-dev pkg-config
 #    - compiler: clang
 #      env: COMPILER=clang-3.9
 #      before_install:
 #        - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
 #        - sudo add-apt-repository ppa:jonathonf/llvm -y
 #        - sudo apt-get update -qq
-#        - sudo apt-get install clang-3.9 binutils
+#        - sudo apt-get install clang-3.9 binutils libpopt-dev pkg-config
 #    - compiler: clang
 #      env: COMPILER=clang-4.0
 #      before_install:
 #        - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
 #        - sudo add-apt-repository ppa:jonathonf/llvm -y
 #        - sudo apt-get update -qq
-#        - sudo apt-get install clang-4.0 binutils
+#        - sudo apt-get install clang-4.0 binutils libpopt-dev pkg-config
index 08e2426..7dae118 100644 (file)
@@ -10,7 +10,7 @@ DESTDIR       ?=
 INSTALL ?= install
 CROSS_COMPILE  ?=
 COMPILER ?= gcc
-PKG_CONFIG = $(CROSS_COMPILE)pkg-config
+PKG_CONFIG = $(shell if [ -e "$$(env $(CROSS_COMPILE)pkg-config 2>&1)" ]; then echo $(CROSS_COMPILE)pkg-config ; else echo pkg-config ; fi)
 CC     := $(if $(filter default,$(origin CC)),$(CROSS_COMPILE)$(COMPILER),$(CC))
 CCLD   := $(if $(filter undefined,$(origin CCLD)),$(CC),$(CCLD))
 OPTIMIZE ?= -O2 -flto