Skip to content
Snippets Groups Projects
Commit 0dcb3578 authored by Christian Engwer's avatar Christian Engwer
Browse files

allow multiple usage of --module=

[[Imported from SVN: r5038]]
parent 33186aff
No related branches found
No related tags found
No related merge requests found
......@@ -377,8 +377,11 @@ while test $# -gt 0; do
echo > /dev/stderr
exit 1;
fi
export NAME_`fix_variable_name $arg`="$arg"
fix_and_assign MODULE "$arg"
for a in `echo $arg | tr ',' ' '`; do
export NAME_`fix_variable_name $arg`="$a"
fix_and_assign MODULE "$a"
export SEARCH_MODULES="$SEARCH_MODULES $MODULE"
done
;;
--only=*)
if test "x$arg" = "x"; then
......@@ -387,9 +390,12 @@ while test $# -gt 0; do
echo > /dev/stderr
exit 1;
fi
export NAME_`fix_variable_name $arg`="$arg"
fix_and_assign ONLY "$arg"
fix_and_assign MODULE "$arg"
for a in `echo $arg | tr ',' ' '`; do
export NAME_`fix_variable_name $arg`="$a"
fix_and_assign MODULE "$a"
export SEARCH_MODULES="$SEARCH_MODULES $MODULE"
export ONLY="$ONLY $MODULE"
done
;;
--debug) true ;;
*)
......@@ -416,10 +422,10 @@ done
case "$command" in
print)
find_modules_in_path
if test "x$MODULE" = "x"; then
if test "x$SEARCH_MODULES" = "x"; then
sort_modules $MODULES
else
sort_modules $MODULE
sort_modules $SEARCH_MODULES
fi
for mod in $MODULES; do
echo -n "$(eval echo \$NAME_$mod) "
......@@ -456,13 +462,12 @@ case "$command" in
else
sort_modules $MODULE
fi
if test x$ONLY != x; then
NAMES="$(eval echo \$NAME_$ONLY)"
else
for mod in $MODULES; do
NAMES="$NAMES$(eval echo \$NAME_$mod) "
done
if test "x$ONLY" != x; then
MODULES="$ONLY"
fi
for mod in $MODULES; do
NAMES="$NAMES$(eval echo \$NAME_$mod) "
done
echo "--- going to build $NAMES ---"
build_modules $command
echo "--- done ---"
......
......@@ -41,33 +41,6 @@ template<class T1, class T2, class T3 = T1> struct Can_multiply {
Can_multiply() { void (*p)(T1,T2,T3) = constraints; }
};
/**
\brief Helper template so that compilation fails if condition is not true.
If the condition is true a static function yes is available, othewise the
only function available is no().
Example for compile time check whether two types are the same:
\code
IsTrue<is_same<int,int>::value>::yes(); //
IsTrue<is_same<bool,int>::value>::yes(); // false, will trigger a compile time error
\endcode
A test that trigger a compile time error if condition is true:
\code
IsTrue<condition>::no()
\endcode
*/
template <bool condition>
struct IsTrue
{
static void no() {};
};
template <>
struct IsTrue<true>
{
static void yes() {};
};
#include "static_assert.hh"
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment