From 324c76a6963182bfada86f1747a00cf03a85bd32 Mon Sep 17 00:00:00 2001 From: Rutger Hofman Date: Sat, 23 May 2009 18:14:19 +0000 Subject: [PATCH] Add an option to skip building the main programs (--disable-apps) git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1622 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 5 +++++ urjtag/Makefile.am | 8 ++++++-- urjtag/configure.ac | 12 ++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index a3ac7582..03441f00 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,3 +1,8 @@ +2009-05-23 Rutger Hofman + + * configure.ac, Makefile.am: add an option (--disable-apps) to build only + the library, not the application main programs + 2009-05-23 Arnim Laeuger * src/bsdl2jtag, configure.ac, Makefile.am, src/Makefile.am, diff --git a/urjtag/Makefile.am b/urjtag/Makefile.am index 6b15964b..79633116 100644 --- a/urjtag/Makefile.am +++ b/urjtag/Makefile.am @@ -28,10 +28,14 @@ SUBDIRS = \ include/urjtag \ data \ src \ - src/apps/jtag \ - src/apps/bsdl2jtag \ po +if ENABLE_APPS +SUBDIRS += \ + src/apps/jtag \ + src/apps/bsdl2jtag +endif + DIST_SUBDIRS = \ $(SUBDIRS) diff --git a/urjtag/configure.ac b/urjtag/configure.ac index bcba770e..6f4125cc 100644 --- a/urjtag/configure.ac +++ b/urjtag/configure.ac @@ -295,6 +295,18 @@ AC_SUBST(WARNINGCFLAGS) CPPFLAGS="-I\$(top_srcdir) -I\$(top_srcdir)/include $CPPFLAGS" +AC_ARG_ENABLE([apps], + [AS_HELP_STRING([--disable-apps], + [disable building the jtag and bsdl2jtag main programs])],, + [enable_apps=yes]) + +AS_IF([test "x$enable_apps" = xyes], [ + AM_CONDITIONAL(ENABLE_APPS, true) + AC_DEFINE(ENABLE_APPS, 1, [define if you want to build the jtag and bsdl2jtag main programs]) +],[ + AM_CONDITIONAL(ENABLE_APPS, false) +]) + # check for lex/flex AC_PROG_LEX