diff options
author | Bruno Haible <bruno@clisp.org> | 2006-12-15 12:36:56 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:14:29 +0200 |
commit | 3f650a93eb0a88b934f4c9aab78be44385ab58cb (patch) | |
tree | edb31c8f288a59b404e288f80ffb5a97e41f4a54 /gnulib-local/build-aux/moopp | |
parent | 1173b04b0f53e951550189f5be627cbd63f38c15 (diff) | |
download | external_gettext-3f650a93eb0a88b934f4c9aab78be44385ab58cb.zip external_gettext-3f650a93eb0a88b934f4c9aab78be44385ab58cb.tar.gz external_gettext-3f650a93eb0a88b934f4c9aab78be44385ab58cb.tar.bz2 |
moopp requires GNU sed.
Diffstat (limited to 'gnulib-local/build-aux/moopp')
-rwxr-xr-x | gnulib-local/build-aux/moopp | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/gnulib-local/build-aux/moopp b/gnulib-local/build-aux/moopp index d744f8b..151f90e 100755 --- a/gnulib-local/build-aux/moopp +++ b/gnulib-local/build-aux/moopp @@ -128,6 +128,14 @@ sed_remove_comments_ERE=" :e }" +# Check that 'sed' supports the kind of regular expressions used in +# sed_remove_comments. The use of \| meaning alternation of basic regular +# expressions is a GNU extension. +sed_test='s,^\(\(a\|X\)*\)//.*,\1,' +sed_result=`echo 'aaa//bcd' | sed -e "$sed_test"` +test "$sed_result" = 'aaa' \ + || func_fatal_error "The 'sed' program is not GNU sed. Try installing GNU sed." + # func_check_impl_syntax file # Check the syntax of the source implementation file. # Output: @@ -633,6 +641,13 @@ func_emit_source_c () } > "$newfile" } +# Generate the files in the source directory, not in the current directory. +# This is needed because they need to be distributed, since not all platforms +# have GNU 'sed' preinstalled. + +sed_butbase='s,[^/]*$,,' +destdir=`echo "$source_impl_file" | sed -e "$sed_butbase"` + # Generate the source.h file first. The Makefile.am snippets rely on the # fact that the other generated files have the same or a newer timestamp. # @@ -640,16 +655,18 @@ func_emit_source_c () # about the other generated files; they assume that when the source.c file # is finished, this command is complete. -new_source_header_file=`echo "$source_header_file_base" | sed -e 's,\.oo\.h$,.h,'` +new_source_header_file="${destdir}"`echo "$source_header_file_base" | sed -e 's,\.oo\.h$,.h,'` func_start_creation "$new_source_header_file" func_emit_source_h "$new_source_header_file" || func_fatal_error "failed" -func_start_creation "${main_classname}.priv.h" -func_emit_priv_h "${main_classname}.priv.h" || func_fatal_error "failed" +new_priv_header_file="${destdir}${main_classname}.priv.h" +func_start_creation "$new_priv_header_file" +func_emit_priv_h "$new_priv_header_file" || func_fatal_error "failed" -func_start_creation "${main_classname}.vt.h" -func_emit_vt_h "${main_classname}.vt.h" || func_fatal_error "failed" +new_vt_header_file="${destdir}${main_classname}.vt.h" +func_start_creation "$new_vt_header_file" +func_emit_vt_h "$new_vt_header_file" || func_fatal_error "failed" -new_source_impl_file=`echo "$source_impl_file_base" | sed -e 's,\.oo\.c$,.c,'` +new_source_impl_file="${destdir}"`echo "$source_impl_file_base" | sed -e 's,\.oo\.c$,.c,'` func_start_creation "$new_source_impl_file" func_emit_source_c "$new_source_impl_file" || func_fatal_error "failed" |