[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r3386 - in gnuradio/branches/developers/jcorgan/ticket
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r3386 - in gnuradio/branches/developers/jcorgan/ticket-28: . config |
Date: |
Wed, 23 Aug 2006 20:44:23 -0600 (MDT) |
Author: jcorgan
Date: 2006-08-23 20:44:22 -0600 (Wed, 23 Aug 2006)
New Revision: 3386
Added:
gnuradio/branches/developers/jcorgan/ticket-28/config/grc_build.m4
Modified:
gnuradio/branches/developers/jcorgan/ticket-28/config/grc_gnuradio_core.m4
gnuradio/branches/developers/jcorgan/ticket-28/config/grc_gnuradio_examples.m4
gnuradio/branches/developers/jcorgan/ticket-28/config/grc_usrp.m4
gnuradio/branches/developers/jcorgan/ticket-28/configure.ac
Log:
Work in progress for ticket:28
Added: gnuradio/branches/developers/jcorgan/ticket-28/config/grc_build.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/ticket-28/config/grc_build.m4
(rev 0)
+++ gnuradio/branches/developers/jcorgan/ticket-28/config/grc_build.m4
2006-08-24 02:44:22 UTC (rev 3386)
@@ -0,0 +1,44 @@
+dnl 2006 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU Radio
+dnl
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2, or (at your option)
+dnl any later version.
+dnl
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING. If not, write to
+dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+dnl Boston, MA 02111-1307, USA.
+
+# Create --enable-foo argument for named component, create variables as needed
+# $1 is component name
+AC_DEFUN([GRC_ENABLE],[
+ AC_ARG_ENABLE([$1],[ --enable-$1 Fail build if $1 fails
configuration],[],
+ [[enable_]m4_bpatsubst($1,-,_)=$enable_all_components])
+])
+
+# Conditionally build named component.
+# $1 is component name
+# $2 is executed if configuration passes and build is desired
+# Use $passed=no to indicate configuration failure
+# Any other value of $passed, including blank, assumes success
+AC_DEFUN([GRC_BUILD_CONDITIONAL],[
+ if test x$passed = xno; then
+ skipped_dirs="$skipped_dirs $1"
+ if test x$enable_$1 = xyes; then
+ AC_MSG_ERROR([Component $1 has errors, stopping.])
+ fi
+ else
+ if test x$enable_$1 != xno; then
+ $2
+ build_dirs="$build_dirs $1"
+ fi
+ fi
+])
Property changes on:
gnuradio/branches/developers/jcorgan/ticket-28/config/grc_build.m4
___________________________________________________________________
Name: svn:eol-style
+ native
Modified:
gnuradio/branches/developers/jcorgan/ticket-28/config/grc_gnuradio_core.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/ticket-28/config/grc_gnuradio_core.m4
2006-08-23 21:25:59 UTC (rev 3385)
+++ gnuradio/branches/developers/jcorgan/ticket-28/config/grc_gnuradio_core.m4
2006-08-24 02:44:22 UTC (rev 3386)
@@ -18,13 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GNURADIO_CORE],[
- AC_ARG_ENABLE([gnuradio-core],
- [ --enable-gnuradio-core help string],
- [case $enableval in
- yes|no) ;;
- *) AC_MSG_ERROR([Invalid value passed to
--enable-gnuradio-core]) ;;
- esac],
- [enable_gnuradio_core=$enable_all_components])
+ GRC_ENABLE([gnuradio-core])
AC_CONFIG_FILES([ \
gnuradio-core/Makefile
@@ -57,18 +51,13 @@
gnuradio-core/src/python/gnuradio/gruimpl/Makefile \
gnuradio-core/src/tests/Makefile \
gnuradio-core/src/utils/Makefile \
- ])
-
- if test x$enable_gnuradio_core != xno; then
+ ])
+
+ GRC_BUILD_CONDITIONAL([gnuradio-core],[
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests_core], [chmod +x
gnuradio-core/src/python/gnuradio/gr/run_tests])
dnl kludge up initial swig dependency file
AC_CONFIG_COMMANDS([swig_deps], [touch
gnuradio-core/src/lib/swig/gnuradio_swig_python.d])
-
- build_dirs="$build_dirs gnuradio-core"
- else
- skipped_dirs="$skipped_dirs gnuradio-core"
- fi
- dnl N.B. there are no failures we check for, so there is no code to
manipulate $failed_dirs
+ ])
])
Modified:
gnuradio/branches/developers/jcorgan/ticket-28/config/grc_gnuradio_examples.m4
===================================================================
---
gnuradio/branches/developers/jcorgan/ticket-28/config/grc_gnuradio_examples.m4
2006-08-23 21:25:59 UTC (rev 3385)
+++
gnuradio/branches/developers/jcorgan/ticket-28/config/grc_gnuradio_examples.m4
2006-08-24 02:44:22 UTC (rev 3386)
@@ -18,15 +18,9 @@
# Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GNURADIO_EXAMPLES],[
- AC_ARG_ENABLE([gnuradio-examples],
- [ --enable-gnuradio-examples help string],
- [case $enableval in
- yes|no) ;;
- *) AC_MSG_ERROR([Invalid value passed to
--enable-gnuradio-examples]) ;;
- esac],
- [enable_gnuradio_examples=$enable_all_components])
+ GRC_ENABLE([gnuradio-examples])
- AC_CONFIG_FILES([\
+ AC_CONFIG_FILES([ \
gnuradio-examples/Makefile \
gnuradio-examples/python/Makefile \
gnuradio-examples/python/audio/Makefile \
@@ -36,12 +30,7 @@
gnuradio-examples/python/mc4020/Makefile \
gnuradio-examples/python/usrp/Makefile \
gnuradio-examples/python/multi_usrp/Makefile \
- ])
+ ])
- if test x$enable_gnuradio_examples != xno; then
- build_dirs="$build_dirs gnuradio-examples"
- else
- skipped_dirs="$skipped_dirs gnuradio-examples"
- fi
- dnl N.B. there are no failures we check for, so there is no code to
manipulate $failed_dirs
+ GRC_BUILD_CONDITIONAL([gnuradio-examples])
])
Modified: gnuradio/branches/developers/jcorgan/ticket-28/config/grc_usrp.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/ticket-28/config/grc_usrp.m4
2006-08-23 21:25:59 UTC (rev 3385)
+++ gnuradio/branches/developers/jcorgan/ticket-28/config/grc_usrp.m4
2006-08-24 02:44:22 UTC (rev 3386)
@@ -18,57 +18,46 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_USRP],[
- AC_CONFIG_SRCDIR([usrp/host/lib/usrp_prims.h])
+ GRC_ENABLE([usrp])
AC_CONFIG_FILES([ \
- usrp/Makefile \
- usrp/usrp.pc \
- usrp/usrp.iss \
- usrp/doc/Doxyfile \
- usrp/doc/Makefile \
- usrp/doc/other/Makefile \
- usrp/host/Makefile \
- usrp/host/misc/Makefile \
- usrp/host/lib/Makefile \
- usrp/host/lib/std_paths.h \
- usrp/host/swig/Makefile \
- usrp/host/apps/Makefile \
- usrp/firmware/Makefile \
- usrp/firmware/include/Makefile \
- usrp/firmware/lib/Makefile \
- usrp/firmware/src/Makefile \
- usrp/firmware/src/common/Makefile \
- usrp/firmware/src/usrp2/Makefile \
- usrp/fpga/Makefile \
- usrp/fpga/rbf/Makefile \
+ usrp/Makefile \
+ usrp/usrp.pc \
+ usrp/usrp.iss \
+ usrp/doc/Doxyfile \
+ usrp/doc/Makefile \
+ usrp/doc/other/Makefile \
+ usrp/host/Makefile \
+ usrp/host/misc/Makefile \
+ usrp/host/lib/Makefile \
+ usrp/host/lib/std_paths.h \
+ usrp/host/swig/Makefile \
+ usrp/host/apps/Makefile \
+ usrp/firmware/Makefile \
+ usrp/firmware/include/Makefile \
+ usrp/firmware/lib/Makefile \
+ usrp/firmware/src/Makefile \
+ usrp/firmware/src/common/Makefile \
+ usrp/firmware/src/usrp2/Makefile \
+ usrp/fpga/Makefile \
+ usrp/fpga/rbf/Makefile \
])
- AC_CHECK_PROG([XMLTO],[xmlto],[yes],[])
- AM_CONDITIONAL(HAS_XMLTO, test x$XMLTO = xyes)
-
# gnulib.
# FIXME: this needs to fail gracefully and continue, not implemented yet
UTILS_FUNC_MKSTEMP
- succeeded=yes
- dnl Checks for library functions.
- USRP_LIBUSB([],[succeeded=no])
- USRP_SET_FUSB_TECHNIQUE([],[succeeded=no])
-
- dnl check for firmware cross compilation tools
- dnl check for SDCC 2.4.0
- USRP_SDCC([2.4.0],[],[succeeded=no])
-
+ # These checks don't fail
+ AC_CHECK_PROG([XMLTO],[xmlto],[yes],[])
+ AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes])
+ AC_C_BIGENDIAN
+ AC_CHECK_HEADERS([byteswap.h])
AC_CHECK_FUNCS([getrusage sched_setscheduler])
AC_CHECK_FUNCS([sigaction snprintf])
- dnl we use these to handle possible byteswapping to and from the USRP.
- AC_CHECK_HEADERS([byteswap.h])
- AC_C_BIGENDIAN
+ USRP_LIBUSB([],[passed=no;AC_MSG_RESULT([Unable to configure USB
dependency.])])
+ USRP_SET_FUSB_TECHNIQUE([],[passed=no;AC_MSG_RESULT([Unable to set fast
USB technique.])])
+ USRP_SDCC([2.4.0],[],[passed=no;AC_MSG_RESULT([Unable to find firmware
compiler.])])
- if test $succeeded = yes; then
- subdirs="$subdirs usrp"
- else
- failed="$failed usrp"
- fi
+ GRC_BUILD_CONDITIONAL([usrp])
])
Modified: gnuradio/branches/developers/jcorgan/ticket-28/configure.ac
===================================================================
--- gnuradio/branches/developers/jcorgan/ticket-28/configure.ac 2006-08-23
21:25:59 UTC (rev 3385)
+++ gnuradio/branches/developers/jcorgan/ticket-28/configure.ac 2006-08-24
02:44:22 UTC (rev 3386)
@@ -150,19 +150,15 @@
dnl Component specific configuration
dnl The order of the GR_ macros determines the order of compilation
-AC_ARG_ENABLE([all-components],
- [ --enable-all-components Build all components or stop on
failed dependencies],
- [
- case $enableval in
- yes|no) ;;
- *) AC_MSG_ERROR([Invalid value passed to
--enable-all-components]) ;;
- esac
- ])
+AC_ARG_ENABLE(
+ [all-components],
+ [ --enable-all-components Build all components or stop on failed
dependencies]
+)
build_dirs="config"
GRC_GNURADIO_CORE
GRC_GNURADIO_EXAMPLES
-#GRC_USRP
+GRC_USRP
#GRC_GR_USRP dnl this must come after GRC_USRP
#GRC_GR_AUDIO_ALSA
#GRC_GR_AUDIO_JACK
@@ -187,7 +183,6 @@
# Each component is now either to be built, was skipped, or failed dependencies
AC_SUBST([build_dirs], [$build_dirs])
AC_SUBST([skipped_dirs], [$skipped_dirs])
-AC_SUBST([failed_dirs], [$failed_dirs])
AC_CONFIG_FILES([\
Makefile \
@@ -220,16 +215,3 @@
echo These components will not be built.
echo
fi
-if test "$failed_dirs" != ""; then
- echo
"**ERROR*ERROR*ERROR*ERROR*ERROR*ERROR*ERROR*ERROR*ERROR*ERROR*ERROR**"
- echo
- echo The following components failed their configuration checks\, and you
- echo specifically asked them to be built:
- echo
- for dir in $failed_dirs
- do
- echo $dir
- done
- echo
- exit 1
-fi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r3386 - in gnuradio/branches/developers/jcorgan/ticket-28: . config,
jcorgan <=