fi
}
+# func_compute_include_guard_prefix
+# Determine include_guard_prefix.
+# Input:
+# - macro_prefix prefix of gl_LIBOBJS macros to use
+# Output:
+# - include_guard_prefix replacement for ${gl_include_guard_prefix}
+# - sed_replace_include_guard_prefix
+# sed expression for resolving ${gl_include_guard_prefix}
+func_compute_include_guard_prefix ()
+{
+ if test "$macro_prefix" = gl; then
+ include_guard_prefix='GL'
+ else
+ include_guard_prefix='GL_'`echo "$macro_prefix" | LC_ALL=C tr '[a-z]' '[A-Z]'`
+ fi
+ sed_replace_include_guard_prefix='s/\${gl_include_guard_prefix}/'"${include_guard_prefix}"'/g'
+}
+
# func_execute_command command [args...]
# Executes a command.
# Uses also the variables
# - po_domain prefix of i18n domain to use (without -gnulib suffix)
# - actioncmd (optional) command that will reproduce this invocation
# - for_test true if creating a package for testing, false otherwise
+# - sed_replace_include_guard_prefix
+# sed expression for resolving ${gl_include_guard_prefix}
# - destfile filename relative to destdir of makefile being generated
# Input/Output:
# - makefile_am_edits and makefile_am_edit${edit}_{dir,var,val}
-e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' \
-e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \
-e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' \
- -e "$sed_transform_check_PROGRAMS"
+ -e "$sed_transform_check_PROGRAMS" \
+ -e "$sed_replace_include_guard_prefix"
if test "$module" = 'alloca'; then
echo "${libname}_${libext}_LIBADD += @${perhapsLT}ALLOCA@"
echo "${libname}_${libext}_DEPENDENCIES += @${perhapsLT}ALLOCA@"
# - single_configure true if a single configure file should be generated,
# false for a separate configure file for the tests
# - use_libtests true if a libtests.a should be built, false otherwise
+# - sed_replace_include_guard_prefix
+# sed expression for resolving ${gl_include_guard_prefix}
# - destfile filename relative to destdir of makefile being generated
# Input/Output:
# - makefile_am_edits and makefile_am_edit${edit}_{dir,var,val}
-e 's,lib_\([A-Z][A-Z]*\),libtests_a_\1,g' \
-e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \
-e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' \
- -e "$sed_transform_check_PROGRAMS"
+ -e "$sed_transform_check_PROGRAMS" \
+ -e "$sed_replace_include_guard_prefix"
if $use_libtests && test "$module" = 'alloca'; then
echo "libtests_a_LIBADD += @${perhapsLT}ALLOCA@"
echo "libtests_a_DEPENDENCIES += @${perhapsLT}ALLOCA@"
fi
func_append actioncmd " `echo $specified_modules`"
+ # Determine include_guard_prefix.
+ func_compute_include_guard_prefix
+
# Default the makefile name to Makefile.am.
if test -n "$makefile_name"; then
makefile_am=$makefile_name
exec 0<&5 5<&-
}
+ # Determine include_guard_prefix.
+ func_compute_include_guard_prefix
+
# Create Makefile.ams that are for testing.
for_test=true
echo "AC_OUTPUT"
) > "$testdir/$testsbase/configure.ac"
auxdir="$saved_auxdir"
- func_append subdirs " $testsbase"
subdirs_with_configure_ac="$subdirs_with_configure_ac $testsbase"
fi
- subdirs="$subdirs $testsbase"
+ func_append subdirs " $testsbase"
fi
# Create Makefile.am.