Use precious variables for various tools

master
Yevgen Muntyan 2008-09-05 23:59:52 -05:00
parent fa4e646276
commit 9f1cb1d7b6
7 changed files with 32 additions and 14 deletions

View File

@ -23,13 +23,13 @@ help-sections.h: stamp-help
build-docs: stamp-help
medit.1: man-medit.t2t
txt2tags --target=man --outfile=$(srcdir)/medit.1 $(srcdir)/man-medit.t2t
$(TXT2TAGS) --target=man --outfile=$(srcdir)/medit.1 $(srcdir)/man-medit.t2t
stamp-help: $(t2t_sources) makedocs
cd $(srcdir) && \
rm -fr help && \
$(mkdir_p) help && \
$(srcdir)/makedocs $(srcdir)/medit.t2t && \
TXT2TAGS=$(TXT2TAGS) $(srcdir)/makedocs $(srcdir)/medit.t2t && \
echo `date` > stamp-help
medit.lo: build-docs

View File

@ -8,7 +8,10 @@ infile="$1"
outfile="$thisdir"/`basename $infile .t2t`.html
outdir="$thisdir/help"
T2T=txt2tags
if [ -z "$TXT2TAGS" ]; then
TXT2TAGS=txt2tags
fi
SPLITY="perl -I$srcdir $srcdir/splity/splity.pl"
SPLITY_INDEX="$srcdir/splity/index-template.html"
SPLITY_PAGE="$srcdir/splity/page-template.html"
@ -23,13 +26,13 @@ if test ! -e "$outdir"; then
exit 1
fi
txt2tags --version >/dev/null 2>/dev/null || {
$TXT2TAGS --version >/dev/null 2>/dev/null || {
echo "*** WARNING: txt2tags has not been found, docs will not be regenerated ***" >&2
exit 0
}
generate () {
$T2T --outfile=$2 $1 || exit 1
$TXT2TAGS --outfile=$2 $1 || exit 1
(cd "$outdir" && $SPLITY -index $SPLITY_INDEX -page $SPLITY_PAGE $2) || exit 1
}

View File

@ -1 +1 @@
Fri Sep 5 13:44:58 CDT 2008
Fri Sep 5 23:57:27 CDT 2008

View File

@ -17,8 +17,23 @@ AC_DEFUN_ONCE([MOO_AM_RC_MK],[
fi
])
dnl _MOO_AC_CHECK_TOOL(variable,program)
AC_DEFUN([_MOO_AC_CHECK_TOOL],[
AC_ARG_VAR([$1], [$2 program])
AC_PATH_PROG([$1], [$2], [])
AM_CONDITIONAL([HAVE_$1],[ test "x$2" != "x" ])
])
AC_DEFUN_ONCE([MOO_AC_CHECK_TOOLS],[
_MOO_AC_CHECK_TOOL([GDK_PIXBUF_CSOURCE], [gdk-pixbuf-csource])
_MOO_AC_CHECK_TOOL([GLIB_GENMARSHAL], [glib-genmarshal])
_MOO_AC_CHECK_TOOL([GLIB_MKENUMS], [glib-mkenums])
_MOO_AC_CHECK_TOOL([TXT2TAGS], [txt2tags])
])
AC_DEFUN_ONCE([MOO_AM_MK],[
AC_REQUIRE([MOO_AC_I18N])
MOO_AM_MIME_MK
MOO_AM_RC_MK
MOO_AC_CHECK_TOOLS
])

View File

@ -96,8 +96,8 @@ libmoo_la_SOURCES =
BUILT_SOURCES += mooutils/marshals.c marshals.list
CLEANFILES += mooutils/marshals.c marshals.list
mooutils/marshals.c: marshals.list
glib-genmarshal --prefix=_moo_marshal --header marshals.list > $@.tmp && \
glib-genmarshal --prefix=_moo_marshal --body marshals.list >> $@.tmp && \
$(GLIB_GENMARSHAL) --prefix=_moo_marshal --header marshals.list > $@.tmp && \
$(GLIB_GENMARSHAL) --prefix=_moo_marshal --body marshals.list >> $@.tmp && \
mv $@.tmp $@
marshals.list: $(marshals)
( cat $(marshals) | uniq ) > marshals.list.tmp && mv marshals.list.tmp marshals.list
@ -106,7 +106,7 @@ BUILT_SOURCES += $(sub_marshals_h)
CLEANFILES += $(sub_marshals_h)
EXTRA_DIST += mooutils/marshals.list mooapp/marshals.list moofileview/marshals.list mooedit/marshals.list
%/marshals.h: $(srcdir)/%/marshals.list
glib-genmarshal --prefix=_moo_marshal --header $(srcdir)/$*/marshals.list > $@.tmp && \
$(GLIB_GENMARSHAL) --prefix=_moo_marshal --header $(srcdir)/$*/marshals.list > $@.tmp && \
mv $@.tmp $@

View File

@ -191,7 +191,7 @@ mooutils_pixmaps = \
CLEANFILES += stock-moo.h stock-medit.h
BUILT_SOURCES += stock-moo.h stock-medit.h
stock-moo.h: $(mooutils_pixmaps)
gdk-pixbuf-csource --static --build-list \
$(GDK_PIXBUF_CSOURCE) --static --build-list \
MOO_HIDE_ICON $(srcdir)/pixmaps/hide.png \
MOO_CLOSE_ICON $(srcdir)/pixmaps/close.png \
MOO_STICKY_ICON $(srcdir)/pixmaps/sticky.png \
@ -200,7 +200,7 @@ stock-moo.h: $(mooutils_pixmaps)
MOO_KEEP_ON_TOP_ICON $(srcdir)/pixmaps/keepontop.png \
> $@.tmp && mv $@.tmp $@
stock-medit.h: pixmaps/medit.png
gdk-pixbuf-csource --static --build-list \
$(GDK_PIXBUF_CSOURCE) --static --build-list \
MEDIT_ICON $(srcdir)/pixmaps/medit.png \
> $@.tmp && mv $@.tmp $@
@ -245,6 +245,6 @@ CLEANFILES += moofileicon-symlink.h
EXTRA_DIST += $(file_pixmaps)
moofileicon-symlink.h: $(file_pixmaps)
gdk-pixbuf-csource --static --build-list \
$(GDK_PIXBUF_CSOURCE) --static --build-list \
SYMLINK_ARROW $(srcdir)/pixmaps/symlink.png \
SYMLINK_ARROW_SMALL $(srcdir)/pixmaps/symlink-small.png > $@.tmp && mv $@.tmp $@

View File

@ -14,7 +14,7 @@ CLEANFILES += $(ugly_stamp_enum_hfile) $(ugly_stamp_enum_cfile)
$(ugly_stamp_enum_hfile): $(ENUM_HDRS) Makefile
( HGUARD=`echo $(ugly_enum_hfile) | tr '[a-z.\-]' '[A-Z__]'` && cd $(srcdir) && \
glib-mkenums --fhead "#ifndef $$HGUARD\n#define $$HGUARD\n\n#include <glib-object.h>\n" \
$(GLIB_MKENUMS) --fhead "#ifndef $$HGUARD\n#define $$HGUARD\n\n#include <glib-object.h>\n" \
--fhead "\nG_BEGIN_DECLS\n\n\n" \
--fprod "/* enumerations from @filename@ */\n" \
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define $(ugly_enum_prefix)_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n\n" \
@ -24,7 +24,7 @@ $(ugly_stamp_enum_hfile): $(ENUM_HDRS) Makefile
&& rm -f $(ugly_enum_hfile).tmp \
&& echo timestamp > $(@F)
$(ugly_stamp_enum_cfile): $(ENUM_HDRS) Makefile
( cd $(srcdir) && glib-mkenums \
( cd $(srcdir) && $(GLIB_MKENUMS) \
--fhead "#include \"$(ugly_enum_hfile)\"\n\n" \
--fprod "#include \"@filename@\"\n\n" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype;\n if (G_UNLIKELY (!etype))\n {\n static const G@Type@Value values[] = {" \