• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libnfc/0001-build-systems-make-example-build-optional.patch
Peter KorsgaardPeter Korsgaard committed 298cd8eaa2103 Feb 2015
Raw file
Source viewDiff to previous
 
1
From 40a4871b171293d98acb40cf54be9ee9b78a3244 Mon Sep 17 00:00:00 2001
2
From: Samuel Martin <s.martin49@gmail.com>
3
Date: Wed, 6 Jun 2012 00:49:25 +0200
4
Subject: [PATCH 1/1] build systems: make example build optional
5
​
6
This patch makes example build optional for both cmake and autotools build
7
systems.
8
​
9
In order to keep the former behavior, example build is enabled by default.
10
​
11
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
12
​
13
diff -Nurp a/CMakeLists.txt b/CMakeLists.txt
14
--- a/CMakeLists.txt    2013-12-08 18:51:01.000000000 +0000
15
+++ b/CMakeLists.txt    2014-01-08 12:51:42.435096403 +0000
16
@@ -39,6 +39,7 @@ IF(LIBNFC_ENVVARS)
17
   ADD_DEFINITIONS(-DENVVARS)
18
 ENDIF(LIBNFC_ENVVARS)
19
 
20
+SET(BUILD_EXAMPLES ON CACHE BOOL "Build examples")
21
 SET(LIBNFC_DEBUG_MODE OFF CACHE BOOL "Debug mode")
22
 IF(LIBNFC_DEBUG_MODE)
23
   ADD_DEFINITIONS(-DDEBUG)
24
@@ -155,7 +156,10 @@ ENDIF(WIN32)
25
 ADD_SUBDIRECTORY(libnfc)
26
 ADD_SUBDIRECTORY(include)
27
 ADD_SUBDIRECTORY(utils)
28
-ADD_SUBDIRECTORY(examples)
29
+
30
+IF(BUILD_EXAMPLES)
31
+  ADD_SUBDIRECTORY(examples)
32
+ENDIF(BUILD_EXAMPLES)
33
 
34
 # Binary Package
35
 IF(WIN32)
36
diff -Nurp a/Makefile.am b/Makefile.am
37
--- a/Makefile.am   2013-12-08 18:51:01.000000000 +0000
38
+++ b/Makefile.am   2014-01-08 12:52:12.807018593 +0000
39
@@ -2,7 +2,13 @@ ACLOCAL_AMFLAGS = -I m4
40
 
41
 AM_CFLAGS = $(LIBNFC_CFLAGS)
42
 
43
-SUBDIRS = libnfc utils examples include contrib cmake test
44
+SUBDIRS = libnfc utils
45
+
46
+if EXAMPLE_ENABLED
47
+SUBDIRS += examples
48
+endif
49
+
50
+SUBDIRS += include contrib cmake test
51
 
52
 pkgconfigdir = $(libdir)/pkgconfig
53
 pkgconfig_DATA = libnfc.pc
54
diff -Nurp a/configure.ac b/configure.ac
55
--- a/configure.ac  2013-12-08 18:51:01.000000000 +0000
56
+++ b/configure.ac  2014-01-08 12:53:02.054872564 +0000
57
@@ -142,6 +142,14 @@ then
58
 fi
59
 AM_CONDITIONAL(DOC_ENABLED, [test x"$enable_doc" = xyes])
60
 
61
+# Example build (default: yes)
62
+AC_ARG_ENABLE([example],AS_HELP_STRING([--enable-example],[Enable example build.]),[enable_example=$enableval],[enable_example="yes"])
63
+
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.