diff options
author | Peter Williams <peterw@src.gnome.org> | 2000-05-01 20:44:29 +0000 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2000-05-01 20:44:29 +0000 |
commit | 84ad9f6175b366264b1bd613d0695eaa85da9b1b (patch) | |
tree | adb8ba11b5369e91b7a12146e1824c3ffcae0f9a | |
parent | a400b80e924d98c5a3e17a4ded89e787ec65df86 (diff) | |
download | shared-mime-info-84ad9f6175b366264b1bd613d0695eaa85da9b1b.tar.gz |
Fixes for bugs and stuff.
svn path=/branches/unlabeled-1.1.2/; revision=1202
-rw-r--r-- | macros/balsa-offset-tool.m4 | 20 | ||||
-rw-r--r-- | macros/offset-tool.sh.in | 20 |
2 files changed, 31 insertions, 9 deletions
diff --git a/macros/balsa-offset-tool.m4 b/macros/balsa-offset-tool.m4 index f0cda7ec..3d7b24cd 100644 --- a/macros/balsa-offset-tool.m4 +++ b/macros/balsa-offset-tool.m4 @@ -58,15 +58,23 @@ AC_DEFUN([BALSA_OFFSET_TOOL],[ ifelse($3,[],[ define([cat_command],[]) + define([cat_vars],[]) ],[ define([cat_command],[ - #Don't collide with the EOF inside the AC_OUTPUT_COMMANDS that we're in - cat <<BOTEOF >${BALSA_OFFSET_TOOL_DEFSFILE} -$3 + echo creating ${BALSA_OFFSET_TOOL_DEFSFILE} + #Don't collide with the EOF inside the AC_OUTPUT_COMMANDS that we're in + cat <<BOTEOF >${BALSA_OFFSET_TOOL_DEFSFILE} +${BALSA_OFFSET_TOOL_EXDEFS} BOTEOF ]) + define([cat_vars],[ + BALSA_OFFSET_TOOL_EXDEFS='$3' + ]) + ]) + dnl cat_command + changequote(<<,>>)dnl Clobbers my regexes! #Make everything relative to the make fragment @@ -106,10 +114,9 @@ BOTEOF ]) - AC_OUTPUT_COMMANDS(cat_command) + AC_OUTPUT_COMMANDS(cat_command,cat_vars) AC_OUTPUT_COMMANDS([ - echo creating $1 (cd ${BALSA_OFFSET_FRAG_DIR} && ${SHELL} ${BALSA_OFFSET_TOOL_DOTS}${BALSA_OFFSET_TOOL_HOME}/${BALSA_OFFSET_TOOL_NAME} \ --makerules --fragname ${BALSA_OFFSET_FRAG_BASE} ${BALSA_OFFSET_SRCFILES} >${BALSA_OFFSET_FRAG_BASE}) @@ -128,6 +135,7 @@ BOTEOF ]) undefine([cat_command]) + undefine([cat_vars]) BALSA_OFFSET_SRCPATH="${srcdir}" BALSA_OFFSET_TOOL_DOTS="${frag_dots}" @@ -140,4 +148,4 @@ BOTEOF AC_SUBST(BALSA_OFFSET_TOOL_NAME) AC_SUBST(BALSA_OFFSET_TOOL_DOTS) AC_SUBST(BALSA_OFFSET_SRCPATH) -])
\ No newline at end of file +]) diff --git a/macros/offset-tool.sh.in b/macros/offset-tool.sh.in index bd5cdecc..9ccc007b 100644 --- a/macros/offset-tool.sh.in +++ b/macros/offset-tool.sh.in @@ -6,6 +6,13 @@ # data for use with Balsa's configuration, because # it's really constant data although GCC, at least, # doesn't think so. +# +# To achieve that effect, I have writen this here +# absurdly overcomplicated tool, autoconf macro, +# configure.in code, and Makefile.am :-) There +# might be a simpler way to do this, and I guess +# I'll trade in this cool code for better code, +# but I can't think of a simpler way right now :-) srcdir="@srcdir@" top_srcdir="@top_srcdir@" @@ -19,6 +26,7 @@ CC="@CC@" DEFS="@DEFS@" CFLAGS="@CFLAGS@" mid_file=offset-tool.c +no_clean=no case "${top_srcdir}" in /*) @@ -71,7 +79,7 @@ top_srcdir="${tmp}" usage() { - echo "Usage: offset-tool.sh (--help|--create|--makerules|--headername) [--fragname=<fragment name>] <filenames...>" + echo "Usage: offset-tool.sh (--help|--create|--makerules|--headername) [--fragname=<fragment name>] [--noclean] <filenames...>" echo "Look at $(top_srcdir)/${offset_tool_home}/offset-tool.sh.in for more information" exit 1 } @@ -108,6 +116,8 @@ while test $# -gt 0 ; do fragname=`echo ${1} |sed -e 's,.*=\(.*\),\1,'`; shift ;; --fragname) shift; fragname="${1}" ; shift ;; + --noclean) + no_clean=yes ; shift ;; --) shift; break ;; -*) @@ -206,8 +216,12 @@ EOF exit 3 } - echo "Cleaning up..." - rm -f ${mid_file} ${mid_exe} + if test x"$no_clean" = xyes ; then + : + else + echo "Cleaning up..." + rm -f ${mid_file} ${mid_exe} + fi res=$? echo "Done creating ${header}" |