Skip to content
Snippets Groups Projects
Commit 2535a3b8 authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

makedep: Generate rules for svg files in maintainer mode.

parent 47c0f64f
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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,17 +5457,17 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT="\$(INSTALL)"
test -z "$INSTALL_DATA" && INSTALL_DATA="\$(INSTALL) -m 644"
 
 
for ac_prog in fontforge
for ac_prog in msgfmt
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 :
if ${ac_cv_prog_MSGFMT+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$FONTFORGE"; then
ac_cv_prog_FONTFORGE="$FONTFORGE" # Let the user override the test.
if test -n "$MSGFMT"; then
ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
......@@ -5476,7 +5476,7 @@ do
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"
ac_cv_prog_MSGFMT="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
......@@ -5486,31 +5486,30 @@ 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; }
MSGFMT=$ac_cv_prog_MSGFMT
if test -n "$MSGFMT"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
$as_echo "$MSGFMT" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
 
 
test -n "$FONTFORGE" && break
test -n "$MSGFMT" && break
done
test -n "$FONTFORGE" || FONTFORGE="false"
test -n "$MSGFMT" || MSGFMT="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
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; 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 :
if ${ac_cv_prog_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RSVG"; then
ac_cv_prog_RSVG="$RSVG" # Let the user override the test.
if test -n "$PKG_CONFIG"; then
ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
......@@ -5519,7 +5518,7 @@ do
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"
ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
......@@ -5529,31 +5528,30 @@ 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; }
PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&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
fi
if test -n "$ac_cv_prog_PKG_CONFIG"; then
PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
elif test "$cross_compiling" != yes; then
unset ac_cv_prog_PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; 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 :
if ${ac_cv_prog_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CONVERT"; then
ac_cv_prog_CONVERT="$CONVERT" # Let the user override the test.
if test -n "$PKG_CONFIG"; then
ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
......@@ -5562,7 +5560,7 @@ do
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"
ac_cv_prog_PKG_CONFIG="pkg-config"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
......@@ -5572,31 +5570,39 @@ 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; }
PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&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"
fi
if test "x$enable_maintainer_mode" != "xyes"
then
MAINTAINER_MODE=\#
 
for ac_prog in icotool
FONTFORGE=""
RSVG=""
CONVERT=""
ICOTOOL=""
else
test "$srcdir" = . || as_fn_error $? "Maintainer mode cannot work out of tree." "$LINENO" 5
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_ICOTOOL+:} false; then :
if ${ac_cv_prog_FONTFORGE+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ICOTOOL"; then
ac_cv_prog_ICOTOOL="$ICOTOOL" # Let the user override the test.
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
......@@ -5605,7 +5611,7 @@ do
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"
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
......@@ -5615,31 +5621,31 @@ 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; }
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 "$ICOTOOL" && break
test -n "$FONTFORGE" && break
done
test -n "$ICOTOOL" || ICOTOOL="false"
test -n "$FONTFORGE" || FONTFORGE="false"
 
for ac_prog in msgfmt
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_MSGFMT+:} false; then :
if ${ac_cv_prog_RSVG+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$MSGFMT"; then
ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
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
......@@ -5648,7 +5654,7 @@ do
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_MSGFMT="$ac_prog"
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
......@@ -5658,30 +5664,31 @@ IFS=$as_save_IFS
 
fi
fi
MSGFMT=$ac_cv_prog_MSGFMT
if test -n "$MSGFMT"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
$as_echo "$MSGFMT" >&6; }
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 "$MSGFMT" && break
test -n "$RSVG" && break
done
test -n "$MSGFMT" || MSGFMT="false"
test -n "$RSVG" || RSVG="false"
 
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
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_PKG_CONFIG+:} false; then :
if ${ac_cv_prog_CONVERT+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$PKG_CONFIG"; then
ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
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
......@@ -5690,7 +5697,7 @@ do
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_PKG_CONFIG="${ac_tool_prefix}pkg-config"
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
......@@ -5700,30 +5707,31 @@ IFS=$as_save_IFS
 
fi
fi
PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
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
 
 
fi
if test -n "$ac_cv_prog_PKG_CONFIG"; then
PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
elif test "$cross_compiling" != yes; then
unset ac_cv_prog_PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
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_PKG_CONFIG+:} false; then :
if ${ac_cv_prog_ICOTOOL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$PKG_CONFIG"; then
ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
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
......@@ -5732,7 +5740,7 @@ do
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_PKG_CONFIG="pkg-config"
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
......@@ -5742,26 +5750,22 @@ IFS=$as_save_IFS
 
fi
fi
PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
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
 
 
fi
if test "x$enable_maintainer_mode" != "xyes"
then
MAINTAINER_MODE=\#
test -n "$ICOTOOL" && break
done
test -n "$ICOTOOL" || ICOTOOL="false"
 
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
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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment