Commit 2535a3b8 authored by Alexandre Julliard's avatar Alexandre Julliard

makedep: Generate rules for svg files in maintainer mode.

parent 47c0f64f
......@@ -30,17 +30,11 @@ ALLCROSSCFLAGS = $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS)
# Implicit rules
@MAINTAINER_MODE@.SUFFIXES: .sfd .ttf .svg .ico .bmp
@MAINTAINER_MODE@.SUFFIXES: .sfd .ttf
.sfd.ttf:
$(FONTFORGE) -script $(top_srcdir)/fonts/genttf.ff $< $@
.svg.ico:
CONVERT="$(CONVERT)" ICOTOOL="$(ICOTOOL)" RSVG="$(RSVG)" $(BUILDIMAGE) $< $@
.svg.bmp:
CONVERT="$(CONVERT)" ICOTOOL="$(ICOTOOL)" RSVG="$(RSVG)" $(BUILDIMAGE) $< $@
# Rules for main module
$(MODULE) $(MODULE:%=%.so) $(MODULE:%=%.fake): $(MAINSPEC) $(OBJS)
......
......@@ -271,21 +271,24 @@ test -z "$INSTALL_PROGRAM" && AC_SUBST([INSTALL_PROGRAM],"STRIPPROG=\"\$(STRIP)\
test -z "$INSTALL_SCRIPT" && AC_SUBST([INSTALL_SCRIPT],"\$(INSTALL)")
test -z "$INSTALL_DATA" && AC_SUBST([INSTALL_DATA],"\$(INSTALL) -m 644")
dnl Check for various programs
AC_CHECK_PROGS(FONTFORGE, fontforge, false)
AC_CHECK_PROGS(RSVG, rsvg, false)
AC_CHECK_PROGS(CONVERT, convert, false)
AC_CHECK_PROGS(ICOTOOL, icotool, false)
AC_CHECK_PROGS(MSGFMT, msgfmt, false)
WINE_PATH_PKG_CONFIG
if test "x$enable_maintainer_mode" != "xyes"
then
AC_SUBST([MAINTAINER_MODE],[\#])
FONTFORGE=""
RSVG=""
CONVERT=""
ICOTOOL=""
else
test "$srcdir" = . || AC_MSG_ERROR([Maintainer mode cannot work out of tree.])
if test "$FONTFORGE" = "false"; then AC_MSG_ERROR([You need fontforge to rebuild fonts in maintainer mode.]); fi
if test "$RSVG" = "false"; then AC_MSG_ERROR([You need rsvg to rebuild icons in maintainer mode.]); fi
AC_CHECK_PROGS(FONTFORGE, fontforge, false)
AC_CHECK_PROGS(RSVG, rsvg, false)
AC_CHECK_PROGS(CONVERT, convert, false)
AC_CHECK_PROGS(ICOTOOL, icotool, false)
test "$FONTFORGE" != "false" || AC_MSG_ERROR([You need fontforge to rebuild fonts in maintainer mode.])
test "$RSVG" != "false" || AC_MSG_ERROR([You need rsvg to rebuild icons in maintainer mode.])
dnl Check the imagemagick version
if test "$CONVERT" = false
......
......@@ -1498,6 +1498,22 @@ static struct strarray output_sources(void)
output( "\t$(SED_CMD) %s >$@ || ($(RM) $@ && false)\n", source->filename );
column += output( "%s:", obj );
}
else if (!strcmp( ext, "svg" )) /* svg file */
{
char *convert = get_expanded_make_variable( "CONVERT" );
char *rsvg = get_expanded_make_variable( "RSVG" );
char *icotool = get_expanded_make_variable( "ICOTOOL" );
if (convert && rsvg && icotool && !src_dir)
{
output( "%s.ico %s.bmp: %s\n", obj, obj, source->filename );
output( "\tCONVERT=\"%s\" ICOTOOL=\"%s\" RSVG=\"%s\" $(BUILDIMAGE) %s $@\n",
convert, icotool, rsvg, source->filename );
}
free( convert );
free( rsvg );
free( icotool );
continue; /* no dependencies */
}
else if (!strcmp( ext, "res" ))
{
strarray_add( &clean_files, source->name );
......@@ -1764,6 +1780,7 @@ static void update_makefile( const char *path )
"BISON_SRCS",
"LEX_SRCS",
"XTEMPLATE_SRCS",
"SVG_SRCS",
"IN_SRCS",
"MANPAGES",
NULL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment