makedep: Generate rules for svg files in maintainer mode.

This commit is contained in:
Alexandre Julliard 2013-12-26 19:56:16 +01:00
parent 47c0f64fdd
commit 2535a3b8f6
4 changed files with 209 additions and 191 deletions

View File

@ -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)

358
configure vendored
View File

@ -718,13 +718,13 @@ dlldir
CPP
OPENGL_LIBS
XLIB
MAINTAINER_MODE
PKG_CONFIG
MSGFMT
ICOTOOL
CONVERT
RSVG
FONTFORGE
MAINTAINER_MODE
PKG_CONFIG
MSGFMT
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
@ -5457,178 +5457,6 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT="\$(INSTALL)"
test -z "$INSTALL_DATA" && INSTALL_DATA="\$(INSTALL) -m 644"
for ac_prog in fontforge
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_FONTFORGE+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$FONTFORGE"; then
ac_cv_prog_FONTFORGE="$FONTFORGE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_FONTFORGE="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
FONTFORGE=$ac_cv_prog_FONTFORGE
if test -n "$FONTFORGE"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTFORGE" >&5
$as_echo "$FONTFORGE" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$FONTFORGE" && break
done
test -n "$FONTFORGE" || FONTFORGE="false"
for ac_prog in rsvg
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_RSVG+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RSVG"; then
ac_cv_prog_RSVG="$RSVG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RSVG="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
RSVG=$ac_cv_prog_RSVG
if test -n "$RSVG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG" >&5
$as_echo "$RSVG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$RSVG" && break
done
test -n "$RSVG" || RSVG="false"
for ac_prog in convert
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CONVERT+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CONVERT"; then
ac_cv_prog_CONVERT="$CONVERT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CONVERT="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CONVERT=$ac_cv_prog_CONVERT
if test -n "$CONVERT"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONVERT" >&5
$as_echo "$CONVERT" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$CONVERT" && break
done
test -n "$CONVERT" || CONVERT="false"
for ac_prog in icotool
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ICOTOOL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ICOTOOL"; then
ac_cv_prog_ICOTOOL="$ICOTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ICOTOOL="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ICOTOOL=$ac_cv_prog_ICOTOOL
if test -n "$ICOTOOL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICOTOOL" >&5
$as_echo "$ICOTOOL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$ICOTOOL" && break
done
test -n "$ICOTOOL" || ICOTOOL="false"
for ac_prog in msgfmt
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@ -5758,10 +5586,186 @@ if test "x$enable_maintainer_mode" != "xyes"
then
MAINTAINER_MODE=\#
FONTFORGE=""
RSVG=""
CONVERT=""
ICOTOOL=""
else
test "$srcdir" = . || as_fn_error $? "Maintainer mode cannot work out of tree." "$LINENO" 5
if test "$FONTFORGE" = "false"; then as_fn_error $? "You need fontforge to rebuild fonts in maintainer mode." "$LINENO" 5; fi
if test "$RSVG" = "false"; then as_fn_error $? "You need rsvg to rebuild icons in maintainer mode." "$LINENO" 5; fi
for ac_prog in fontforge
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_FONTFORGE+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$FONTFORGE"; then
ac_cv_prog_FONTFORGE="$FONTFORGE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_FONTFORGE="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
FONTFORGE=$ac_cv_prog_FONTFORGE
if test -n "$FONTFORGE"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTFORGE" >&5
$as_echo "$FONTFORGE" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$FONTFORGE" && break
done
test -n "$FONTFORGE" || FONTFORGE="false"
for ac_prog in rsvg
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_RSVG+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RSVG"; then
ac_cv_prog_RSVG="$RSVG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RSVG="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
RSVG=$ac_cv_prog_RSVG
if test -n "$RSVG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG" >&5
$as_echo "$RSVG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$RSVG" && break
done
test -n "$RSVG" || RSVG="false"
for ac_prog in convert
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CONVERT+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CONVERT"; then
ac_cv_prog_CONVERT="$CONVERT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CONVERT="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CONVERT=$ac_cv_prog_CONVERT
if test -n "$CONVERT"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONVERT" >&5
$as_echo "$CONVERT" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$CONVERT" && break
done
test -n "$CONVERT" || CONVERT="false"
for ac_prog in icotool
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ICOTOOL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ICOTOOL"; then
ac_cv_prog_ICOTOOL="$ICOTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ICOTOOL="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ICOTOOL=$ac_cv_prog_ICOTOOL
if test -n "$ICOTOOL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICOTOOL" >&5
$as_echo "$ICOTOOL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$ICOTOOL" && break
done
test -n "$ICOTOOL" || ICOTOOL="false"
test "$FONTFORGE" != "false" || as_fn_error $? "You need fontforge to rebuild fonts in maintainer mode." "$LINENO" 5
test "$RSVG" != "false" || as_fn_error $? "You need rsvg to rebuild icons in maintainer mode." "$LINENO" 5
if test "$CONVERT" = false
then

View File

@ -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

View File

@ -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