[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] Minor cosmetic fix for gnulib-tool generated Makefil
From: |
Derek Robert Price |
Subject: |
Re: [Bug-gnulib] Minor cosmetic fix for gnulib-tool generated Makefile.am |
Date: |
Fri, 15 Oct 2004 00:11:00 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 |
Patch actually attached this time.
Derek Robert Price wrote:
> Derek Robert Price wrote:
>
> >Bruno Haible wrote:
>
> >>Derek Robert Price wrote:
>
> >>>## For module alloca-opt:
> >>>BUILT_SOURCES += $(ALLOCA_H)
> >>>EXTRA_DIST += alloca_.h
>
>
> >>I would prefer this style:
>
>
> >># >>> gnulib module alloca-opt.
>
> >>BUILT_SOURCES += $(ALLOCA_H)
> >>EXTRA_DIST += alloca_.h
>
> >># <<< gnulib module alloca-opt.
>
>
> >>Does this look good to you?
>
>
>
> >It's fine with me, except that it should probably use the double-#
> >comment which Automake removes when it generates Makefile.in, like so:
>
> >## >>> gnulib module alloca-opt.
>
> >BUILT_SOURCES += $(ALLOCA_H)
> >EXTRA_DIST += alloca_.h
>
> >## <<< gnulib module alloca-opt.
>
>
> >Otherwise, since Automake compiles the += line into a single macro
> >definion line and deletes the original += lines, you would have a
> >bunch of comments bracketing nothing in the Makefile.in:
>
> ># >>> gnulib module alloca.
>
>
> ># <<< gnulib module alloca.
>
> ># >>> gnulib module alloca-opt.
>
>
> >and so on.
>
> >This might be more complicated to do in sed too, and still notice and
> >skip the empty modules, though I won't know for sure until I try. I
> >do have a second version of my patch which creats a temp file then
> >checks it wasn't all white space before it adds the comments and
> >copies in the contents of the temp file if you'd like that. I'll be
> >out of town for a few days but if you want it and I can't find a way
> >to check my email tonight, I should be able to send it Wednesday or
> >Thursday.
>
> >Cheers,
>
> >Derek
>
>
>
> New patch included combining my and Bruno's suggestions.
>
> 2004-10-15 Derek R. Price <address@hidden>
>
> * gnulib-tool: Cosmetic improvement for installed Makefile.am.
>
> Cheers,
>
> Derek
> --
> *8^)
>
> Email: address@hidden
>
> Get CVS support at <http://ximbiot.com>!
--
*8^)
Email: address@hidden
Get CVS support at <http://ximbiot.com>!
Index: gnulib-tool
===================================================================
RCS file: /cvsroot/gnulib/gnulib/gnulib-tool,v
retrieving revision 1.22
diff -u -p -r1.22 gnulib-tool
--- gnulib-tool 4 Oct 2004 11:44:19 -0000 1.22
+++ gnulib-tool 15 Oct 2004 04:10:12 -0000
@@ -771,18 +771,34 @@ case $mode in
echo "CLEANFILES ="
echo "DISTCLEANFILES ="
echo "MAINTAINERCLEANFILES ="
+ echo
for module in $modules; do
func_verify_module
if test -n "$module"; then
- func_get_automake_snippet "$module" | sed -e
"s,lib_SOURCES,${libname}_${libext}_SOURCES,g" -e
"s,lib_OBJECTS,${libname}_${libext}_OBJECTS,g"
+ func_get_automake_snippet "$module" | \
+ sed -e "s,lib_SOURCES,${libname}_${libext}_SOURCES,g" \
+ -e "s,lib_OBJECTS,${libname}_${libext}_OBJECTS,g" \
+ >amsnippet.tmp
+
if test "$module" = 'alloca'; then
- echo "${libname}_${libext}_LIBADD += @ALLOCA@"
+ echo "${libname}_${libext}_LIBADD += @ALLOCA@" \
+ >>amsnippet.tmp
+ echo >>amsnippet.tmp
+ fi
+
+ if expr x"`cat amsnippet.tmp`" : x"[
+]*$" >/dev/null; then :; else
+ echo "## <<< $module"
+ cat amsnippet.tmp
+ echo "## >>> $module"
+ echo
fi
fi
done
echo
echo "# Makefile.am ends here"
)
+ rm -f amsnippet.tmp
# Create gnulib.m4.
echo "Creating $destdir/$m4base/gnulib.m4..."
signature.asc
Description: OpenPGP digital signature