From d84de4ca001fa361652c7fdef00f624b03649eca Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 27 Nov 2018 13:16:52 +0100 Subject: [PATCH] makefiles: Support specifying installed files in the top-level makefile. Signed-off-by: Alexandre Julliard --- Makefile.in | 6 ++-- configure | 53 +++++++++++++++++------------- configure.ac | 38 ++++++++++++++++------ libs/wine/Makefile.in | 2 -- loader/Makefile.in | 2 +- programs/msiexec/Makefile.in | 2 -- programs/notepad/Makefile.in | 2 -- programs/regedit/Makefile.in | 2 -- programs/regsvr32/Makefile.in | 2 -- programs/wineboot/Makefile.in | 2 -- programs/winecfg/Makefile.in | 2 -- programs/wineconsole/Makefile.in | 2 -- programs/winedbg/Makefile.in | 2 -- programs/winefile/Makefile.in | 2 -- programs/winemine/Makefile.in | 2 -- programs/winepath/Makefile.in | 2 -- server/Makefile.in | 2 -- tools/makedep.c | 55 +++++++++++++++----------------- 18 files changed, 87 insertions(+), 93 deletions(-) diff --git a/Makefile.in b/Makefile.in index 6b65fdfb8c0..13b5a5a0536 100644 --- a/Makefile.in +++ b/Makefile.in @@ -33,7 +33,6 @@ dlldir = ${libdir}/wine top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ srcdir = @srcdir@ -wine64_disable = @wine64_disable@ SHELL = /bin/sh RM = rm -f MV = mv @@ -87,16 +86,15 @@ api_manext = 3w conf_manext = 5 WINELOADER_PROGRAMS = @WINELOADER_PROGRAMS@ WINELOADER_DEPENDS = @WINELOADER_DEPENDS@ -WINELOADER_INSTALL = @WINELOADER_INSTALL@ WINELOADER_LDFLAGS = @WINELOADER_LDFLAGS@ LIBWINE_SHAREDLIB = @LIBWINE_SHAREDLIB@ LIBWINE_IMPORTLIB = @LIBWINE_IMPORTLIB@ -LIBWINE_INSTALL_LIB = @LIBWINE_INSTALL_LIB@ -LIBWINE_INSTALL_DEV = @LIBWINE_INSTALL_DEV@ LIBWINE_LDFLAGS = @LIBWINE_LDFLAGS@ LIBWINE_DEPENDS = @LIBWINE_DEPENDS@ DISABLED_SUBDIRS = @DISABLED_SUBDIRS@ CONFIGURE_TARGETS = @CONFIGURE_TARGETS@ +TOP_INSTALL_LIB = @TOP_INSTALL_LIB@ +TOP_INSTALL_DEV = @TOP_INSTALL_DEV@ @ALL_VARS_RULES@ @SET_MAKE@ diff --git a/configure b/configure index bb2817c0742..7236d8bf13d 100755 --- a/configure +++ b/configure @@ -624,7 +624,6 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS -WINELOADER_INSTALL ALL_VARS_RULES LDAP_LIBS LDAP_CFLAGS @@ -725,8 +724,6 @@ OBJCFLAGS OBJC LIBWINE_DEPENDS LIBWINE_LDFLAGS -LIBWINE_INSTALL_DEV -LIBWINE_INSTALL_LIB LIBWINE_IMPORTLIB LIBWINE_SHAREDLIB DLLTOOL @@ -738,6 +735,8 @@ READELF OTOOL LDD WINELOADER_LDFLAGS +TOP_INSTALL_DEV +TOP_INSTALL_LIB LDEXECFLAGS LDRPATH_LOCAL LDRPATH_INSTALL @@ -762,7 +761,6 @@ AR BISON FLEX TOOLSDIR -wine64_disable TARGETFLAGS LD CPPBIN @@ -5661,8 +5659,6 @@ then You should create a separate build directory and run configure from there." "$LINENO" 5 enable_fonts=${enable_fonts:-no} enable_server=${enable_server:-no} - wine64_disable=\# - elif test "x$enable_win64" = "xyes" then test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib64" @@ -7763,6 +7759,10 @@ LDRPATH_LOCAL="" LDEXECFLAGS="" +TOP_INSTALL_LIB="" + +TOP_INSTALL_DEV="" + WINELOADER_LDFLAGS="" LIBEXT="so" @@ -8153,14 +8153,12 @@ fi LIBWINE_IMPORTLIB="libwine.a" - LIBWINE_INSTALL_LIB="libwine.dll" - - LIBWINE_INSTALL_DEV="libwine.a" - LIBWINE_LDFLAGS="-shared \$(srcdir)/wine.def" LIBWINE_DEPENDS="wine.def" + TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.dll" + TOP_INSTALL_DEV="$TOP_INSTALL_DEV libs/wine/libwine.a" ;; darwin*|macosx*) @@ -8812,14 +8810,12 @@ fi LIBWINE_SHAREDLIB="libwine.$libwine_version.dylib" - LIBWINE_INSTALL_LIB="libwine.$libwine_version.dylib libwine.$libwine_soversion.dylib" - - LIBWINE_INSTALL_DEV="libwine.dylib" - LIBWINE_LDFLAGS="-dynamiclib -install_name @rpath/libwine.$libwine_soversion.dylib -Wl,-rpath,@loader_path/ -compatibility_version $libwine_soversion -current_version $libwine_version" WINELOADER_DEPENDS="wine_info.plist" + TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.$libwine_version.dylib libs/wine/libwine.$libwine_soversion.dylib" + TOP_INSTALL_DEV="$TOP_INSTALL_DEV libs/wine/libwine.dylib" ;; linux-android*) @@ -8936,10 +8932,9 @@ fi LIBWINE_SHAREDLIB="libwine.so" - LIBWINE_INSTALL_LIB="libwine.so" - LIBWINE_LDFLAGS="-shared -Wl,-soname,libwine.so" + TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.so" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lEGL" >&5 $as_echo_n "checking for -lEGL... " >&6; } @@ -9438,12 +9433,10 @@ $as_echo "$ac_cv_c_dll_unixware" >&6; } fi LIBWINE_SHAREDLIB="libwine.so.$libwine_version" - LIBWINE_INSTALL_LIB="libwine.so.$libwine_version libwine.so.$libwine_soversion" - - LIBWINE_INSTALL_DEV="libwine.so" - LIBWINE_DEPENDS="wine.map" + TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.so.$libwine_version libs/wine/libwine.so.$libwine_soversion" + TOP_INSTALL_DEV="$TOP_INSTALL_DEV libs/wine/libwine.so" ;; esac @@ -20204,11 +20197,27 @@ $with_wine64/loader/wine-preloader: clean:: \$(RM) fonts server loader/wine64 loader/wine64-preloader $with_wine64/loader/wine $with_wine64/loader/wine-preloader" else - WINELOADER_INSTALL="wine.inf l_intl.nls" + TOP_INSTALL_DEV="$TOP_INSTALL_DEV include" + TOP_INSTALL_LIB="$TOP_INSTALL_LIB \ +fonts \ +loader/l_intl.nls \ +loader/wine.inf \ +programs/msiexec/msiexec \ +programs/notepad/notepad \ +programs/regedit/regedit \ +programs/regsvr32/regsvr32 \ +programs/wineboot/wineboot \ +programs/winecfg/winecfg \ +programs/wineconsole/wineconsole \ +programs/winedbg/winedbg \ +programs/winefile/winefile \ +programs/winemine/winemine \ +programs/winepath/winepath \ +server/wineserver" case $host_os in cygwin*|mingw32*|darwin*|macosx*|linux-android*) ;; - *) WINELOADER_INSTALL="$WINELOADER_INSTALL wine.desktop" ;; + *) TOP_INSTALL_LIB="$TOP_INSTALL_LIB loader/wine.desktop" ;; esac fi diff --git a/configure.ac b/configure.ac index 8bf5e109e60..5d0205830c5 100644 --- a/configure.ac +++ b/configure.ac @@ -237,7 +237,6 @@ then You should create a separate build directory and run configure from there.]) enable_fonts=${enable_fonts:-no} enable_server=${enable_server:-no} - AC_SUBST(wine64_disable,[\#]) elif test "x$enable_win64" = "xyes" then test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib64" @@ -714,6 +713,8 @@ AC_SUBST(DLLFLAGS,"-D_REENTRANT") AC_SUBST(LDRPATH_INSTALL,"") AC_SUBST(LDRPATH_LOCAL,"") AC_SUBST(LDEXECFLAGS,"") +AC_SUBST(TOP_INSTALL_LIB,"") +AC_SUBST(TOP_INSTALL_DEV,"") AC_SUBST(WINELOADER_LDFLAGS,"") LIBEXT="so" DLLEXT=".so" @@ -753,10 +754,10 @@ case $host_os in AC_SUBST(LIBWINE_SHAREDLIB,"libwine.dll") AC_SUBST(LIBWINE_IMPORTLIB,"libwine.a") - AC_SUBST(LIBWINE_INSTALL_LIB,"libwine.dll") - AC_SUBST(LIBWINE_INSTALL_DEV,"libwine.a") AC_SUBST(LIBWINE_LDFLAGS,"-shared \$(srcdir)/wine.def") AC_SUBST(LIBWINE_DEPENDS,"wine.def") + TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.dll" + TOP_INSTALL_DEV="$TOP_INSTALL_DEV libs/wine/libwine.a" ;; darwin*|macosx*) @@ -881,10 +882,10 @@ case $host_os in fi AC_SUBST(LIBWINE_SHAREDLIB,"libwine.$libwine_version.dylib") - AC_SUBST(LIBWINE_INSTALL_LIB,"libwine.$libwine_version.dylib libwine.$libwine_soversion.dylib") - AC_SUBST(LIBWINE_INSTALL_DEV,"libwine.dylib") AC_SUBST(LIBWINE_LDFLAGS,["-dynamiclib -install_name @rpath/libwine.$libwine_soversion.dylib -Wl,-rpath,@loader_path/ -compatibility_version $libwine_soversion -current_version $libwine_version"]) AC_SUBST(WINELOADER_DEPENDS,"wine_info.plist") + TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.$libwine_version.dylib libs/wine/libwine.$libwine_soversion.dylib" + TOP_INSTALL_DEV="$TOP_INSTALL_DEV libs/wine/libwine.dylib" ;; linux-android*) @@ -903,8 +904,8 @@ case $host_os in [LDRPATH_INSTALL="$LDRPATH_INSTALL -Wl,--enable-new-dtags"]) AC_SUBST(LIBWINE_SHAREDLIB,"libwine.so") - AC_SUBST(LIBWINE_INSTALL_LIB,"libwine.so") AC_SUBST(LIBWINE_LDFLAGS,["-shared -Wl,-soname,libwine.so"]) + TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.so" WINE_CHECK_SONAME(EGL,eglGetProcAddress) WINE_CHECK_SONAME(GLESv2,glFlush) @@ -983,9 +984,9 @@ case $host_os in fi fi AC_SUBST(LIBWINE_SHAREDLIB,"libwine.so.$libwine_version") - AC_SUBST(LIBWINE_INSTALL_LIB,"libwine.so.$libwine_version libwine.so.$libwine_soversion") - AC_SUBST(LIBWINE_INSTALL_DEV,"libwine.so") AC_SUBST(LIBWINE_DEPENDS,"wine.map") + TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.so.$libwine_version libs/wine/libwine.so.$libwine_soversion" + TOP_INSTALL_DEV="$TOP_INSTALL_DEV libs/wine/libwine.so" ;; esac @@ -4075,10 +4076,27 @@ $with_wine64/loader/wine-preloader: clean:: \$(RM) fonts server loader/wine64 loader/wine64-preloader $with_wine64/loader/wine $with_wine64/loader/wine-preloader]) else - AC_SUBST(WINELOADER_INSTALL,"wine.inf l_intl.nls") + TOP_INSTALL_DEV="$TOP_INSTALL_DEV include" + TOP_INSTALL_LIB="$TOP_INSTALL_LIB \ +fonts \ +loader/l_intl.nls \ +loader/wine.inf \ +programs/msiexec/msiexec \ +programs/notepad/notepad \ +programs/regedit/regedit \ +programs/regsvr32/regsvr32 \ +programs/wineboot/wineboot \ +programs/winecfg/winecfg \ +programs/wineconsole/wineconsole \ +programs/winedbg/winedbg \ +programs/winefile/winefile \ +programs/winemine/winemine \ +programs/winepath/winepath \ +server/wineserver" + case $host_os in cygwin*|mingw32*|darwin*|macosx*|linux-android*) ;; - *) WINELOADER_INSTALL="$WINELOADER_INSTALL wine.desktop" ;; + *) TOP_INSTALL_LIB="$TOP_INSTALL_LIB loader/wine.desktop" ;; esac fi diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in index 02f266c4bb3..5047449cdd0 100644 --- a/libs/wine/Makefile.in +++ b/libs/wine/Makefile.in @@ -26,8 +26,6 @@ config_EXTRADEFS = \ SHAREDLIB = $(LIBWINE_SHAREDLIB) IMPORTLIB = $(LIBWINE_IMPORTLIB) -INSTALL_LIB = $(LIBWINE_INSTALL_LIB) -INSTALL_DEV = $(LIBWINE_INSTALL_DEV) libwine_LDFLAGS = $(LIBWINE_LDFLAGS) libwine_DEPS = $(LIBWINE_DEPENDS) diff --git a/loader/Makefile.in b/loader/Makefile.in index b1eafd19650..bbb1b953391 100644 --- a/loader/Makefile.in +++ b/loader/Makefile.in @@ -11,7 +11,7 @@ SOURCES = \ wine_info.plist.in PROGRAMS = $(WINELOADER_PROGRAMS) -INSTALL_LIB = $(WINELOADER_PROGRAMS) $(WINELOADER_INSTALL) +INSTALL_LIB = $(WINELOADER_PROGRAMS) preloader_EXTRADEFS = $(MSVCRTFLAGS) diff --git a/programs/msiexec/Makefile.in b/programs/msiexec/Makefile.in index 73a6d2620b9..6d0cf9a57e5 100644 --- a/programs/msiexec/Makefile.in +++ b/programs/msiexec/Makefile.in @@ -11,5 +11,3 @@ RC_SRCS = rsrc.rc MANPAGES = msiexec.man.in SVG_SRCS = msiexec.svg - -INSTALL_LIB = msiexec.exe $(wine64_disable)msiexec diff --git a/programs/notepad/Makefile.in b/programs/notepad/Makefile.in index 28e37109ab3..26e977d8e74 100644 --- a/programs/notepad/Makefile.in +++ b/programs/notepad/Makefile.in @@ -11,5 +11,3 @@ RC_SRCS = notepad.rc MANPAGES = notepad.man.in SVG_SRCS = notepad.svg - -INSTALL_LIB = notepad.exe $(wine64_disable)notepad diff --git a/programs/regedit/Makefile.in b/programs/regedit/Makefile.in index 78981bfcf23..18602efc252 100644 --- a/programs/regedit/Makefile.in +++ b/programs/regedit/Makefile.in @@ -20,5 +20,3 @@ RC_SRCS = regedit.rc MANPAGES = regedit.man.in SVG_SRCS = regedit.svg - -INSTALL_LIB = regedit.exe $(wine64_disable)regedit diff --git a/programs/regsvr32/Makefile.in b/programs/regsvr32/Makefile.in index 25434bfd585..15646a6b7ec 100644 --- a/programs/regsvr32/Makefile.in +++ b/programs/regsvr32/Makefile.in @@ -8,5 +8,3 @@ C_SRCS = \ RC_SRCS = regsvr32.rc MANPAGES = regsvr32.man.in - -INSTALL_LIB = regsvr32.exe $(wine64_disable)regsvr32 diff --git a/programs/wineboot/Makefile.in b/programs/wineboot/Makefile.in index 2006067c4ed..f6da0f9df65 100644 --- a/programs/wineboot/Makefile.in +++ b/programs/wineboot/Makefile.in @@ -10,5 +10,3 @@ C_SRCS = \ RC_SRCS = wineboot.rc MANPAGES = wineboot.man.in - -INSTALL_LIB = wineboot.exe $(wine64_disable)wineboot diff --git a/programs/winecfg/Makefile.in b/programs/winecfg/Makefile.in index d5167788345..4e66e04e31a 100644 --- a/programs/winecfg/Makefile.in +++ b/programs/winecfg/Makefile.in @@ -22,5 +22,3 @@ MANPAGES = winecfg.man.in SVG_SRCS = \ logo.svg \ winecfg.svg - -INSTALL_LIB = winecfg.exe $(wine64_disable)winecfg diff --git a/programs/wineconsole/Makefile.in b/programs/wineconsole/Makefile.in index cc131e3e66f..6cde7e34447 100644 --- a/programs/wineconsole/Makefile.in +++ b/programs/wineconsole/Makefile.in @@ -13,5 +13,3 @@ C_SRCS = \ RC_SRCS = wineconsole.rc MANPAGES = wineconsole.man.in - -INSTALL_LIB = wineconsole.exe $(wine64_disable)wineconsole diff --git a/programs/winedbg/Makefile.in b/programs/winedbg/Makefile.in index 194a30c0fcb..22c4cd23e85 100644 --- a/programs/winedbg/Makefile.in +++ b/programs/winedbg/Makefile.in @@ -34,5 +34,3 @@ LEX_SRCS = debug.l BISON_SRCS = dbg.y MANPAGES = winedbg.man.in - -INSTALL_LIB = winedbg.exe $(wine64_disable)winedbg diff --git a/programs/winefile/Makefile.in b/programs/winefile/Makefile.in index 06fd2182a4e..f63106ca97b 100644 --- a/programs/winefile/Makefile.in +++ b/programs/winefile/Makefile.in @@ -12,5 +12,3 @@ RC_SRCS = winefile.rc MANPAGES = winefile.man.in SVG_SRCS = winefile.svg - -INSTALL_LIB = winefile.exe $(wine64_disable)winefile diff --git a/programs/winemine/Makefile.in b/programs/winemine/Makefile.in index bd7bdb6ee51..f72e1b18931 100644 --- a/programs/winemine/Makefile.in +++ b/programs/winemine/Makefile.in @@ -12,5 +12,3 @@ RC_SRCS = winemine.rc MANPAGES = winemine.man.in SVG_SRCS = winemine.svg - -INSTALL_LIB = winemine.exe $(wine64_disable)winemine diff --git a/programs/winepath/Makefile.in b/programs/winepath/Makefile.in index 176388b475c..16b5627aa51 100644 --- a/programs/winepath/Makefile.in +++ b/programs/winepath/Makefile.in @@ -4,5 +4,3 @@ APPMODE = -mconsole -municode C_SRCS = winepath.c MANPAGES = winepath.man.in - -INSTALL_LIB = winepath.exe $(wine64_disable)winepath diff --git a/server/Makefile.in b/server/Makefile.in index aaaa8d34d54..29f17f31578 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -51,5 +51,3 @@ MANPAGES = \ wineserver.man.in EXTRALIBS = $(LDEXECFLAGS) -lwine $(POLL_LIBS) $(RT_LIBS) - -INSTALL_LIB = $(PROGRAMS) diff --git a/tools/makedep.c b/tools/makedep.c index 21ae2f7858c..e2f6d23d9eb 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -137,6 +137,8 @@ static struct strarray libs; static struct strarray enable_tests; static struct strarray cmdline_vars; static struct strarray disabled_dirs; +static struct strarray top_install_lib; +static struct strarray top_install_dev; static const char *root_src_dir; static const char *tools_dir; static const char *tools_ext; @@ -2126,12 +2128,16 @@ static struct strarray get_default_imports( const struct makefile *make ) static void add_install_rule( struct makefile *make, const char *target, const char *file, const char *dest ) { - if (strarray_exists( &make->install_lib, target )) + if (strarray_exists( &make->install_lib, target ) || + strarray_exists( &top_install_lib, make->base_dir ) || + strarray_exists( &top_install_lib, base_dir_path( make, target ))) { strarray_add( &make->install_rules[INSTALL_LIB], file ); strarray_add( &make->install_rules[INSTALL_LIB], dest ); } - else if (strarray_exists( &make->install_dev, target )) + else if (strarray_exists( &make->install_dev, target ) || + strarray_exists( &top_install_dev, make->base_dir ) || + strarray_exists( &top_install_dev, base_dir_path( make, target ))) { strarray_add( &make->install_rules[INSTALL_DEV], file ); strarray_add( &make->install_rules[INSTALL_DEV], dest ); @@ -2493,15 +2499,10 @@ static void output_source_l( struct makefile *make, struct incl_file *source, co static void output_source_h( struct makefile *make, struct incl_file *source, const char *obj ) { if (source->file->flags & FLAG_GENERATED) - { strarray_add( &make->all_targets, source->name ); - } else - { - strarray_add( &make->install_rules[INSTALL_DEV], source->name ); - strarray_add( &make->install_rules[INSTALL_DEV], - strmake( "D$(includedir)/wine/%s", get_include_install_path( source->name ) )); - } + add_install_rule( make, source->name, source->name, + strmake( "D$(includedir)/wine/%s", get_include_install_path( source->name ) )); } @@ -2626,15 +2627,11 @@ static void output_source_idl( struct makefile *make, struct incl_file *source, if (source->file->flags & FLAG_IDL_PROXY) strarray_add( &make->dlldata_files, source->name ); if (source->file->flags & FLAG_INSTALL) { - strarray_add( &make->install_rules[INSTALL_DEV], xstrdup( source->name )); - strarray_add( &make->install_rules[INSTALL_DEV], - strmake( "D$(includedir)/wine/%s.idl", get_include_install_path( obj ) )); + add_install_rule( make, source->name, xstrdup( source->name ), + strmake( "D$(includedir)/wine/%s.idl", get_include_install_path( obj ) )); if (source->file->flags & FLAG_IDL_HEADER) - { - strarray_add( &make->install_rules[INSTALL_DEV], strmake( "%s.h", obj )); - strarray_add( &make->install_rules[INSTALL_DEV], - strmake( "d$(includedir)/wine/%s.h", get_include_install_path( obj ) )); - } + add_install_rule( make, source->name, strmake( "%s.h", obj ), + strmake( "d$(includedir)/wine/%s.h", get_include_install_path( obj ) )); } if (!targets.count) return; @@ -2676,12 +2673,10 @@ static void output_source_x( struct makefile *make, struct incl_file *source, co tools_dir_path( make, "make_xftmpl" ), tools_ext, source->filename ); if (source->file->flags & FLAG_INSTALL) { - strarray_add( &make->install_rules[INSTALL_DEV], source->name ); - strarray_add( &make->install_rules[INSTALL_DEV], - strmake( "D$(includedir)/wine/%s", get_include_install_path( source->name ) )); - strarray_add( &make->install_rules[INSTALL_DEV], strmake( "%s.h", obj )); - strarray_add( &make->install_rules[INSTALL_DEV], - strmake( "d$(includedir)/wine/%s.h", get_include_install_path( obj ) )); + add_install_rule( make, source->name, source->name, + strmake( "D$(includedir)/wine/%s", get_include_install_path( source->name ) )); + add_install_rule( make, source->name, strmake( "%s.h", obj ), + strmake( "d$(includedir)/wine/%s.h", get_include_install_path( obj ) )); } } @@ -2692,7 +2687,8 @@ static void output_source_x( struct makefile *make, struct incl_file *source, co static void output_source_sfd( struct makefile *make, struct incl_file *source, const char *obj ) { unsigned int i; - char *ttf_file = src_dir_path( make, strmake( "%s.ttf", obj )); + char *ttf_obj = strmake( "%s.ttf", obj ); + char *ttf_file = src_dir_path( make, ttf_obj ); if (fontforge && !make->src_dir) { @@ -2702,10 +2698,8 @@ static void output_source_sfd( struct makefile *make, struct incl_file *source, if (!(source->file->flags & FLAG_SFD_FONTS)) output( "all: %s\n", ttf_file ); } if (source->file->flags & FLAG_INSTALL) - { - strarray_add( &make->install_rules[INSTALL_LIB], strmake( "%s.ttf", obj )); - strarray_add( &make->install_rules[INSTALL_LIB], strmake( "D$(fontdir)/%s.ttf", obj )); - } + add_install_rule( make, source->name, ttf_obj, strmake( "D$(fontdir)/%s", ttf_obj )); + if (source->file->flags & FLAG_SFD_FONTS) { struct strarray *array = source->file->args; @@ -2719,8 +2713,7 @@ static void output_source_sfd( struct makefile *make, struct incl_file *source, output( "%s: %s %s\n", obj_dir_path( make, font ), tools_path( make, "sfnt2fon" ), ttf_file ); output( "\t%s -o $@ %s %s\n", tools_path( make, "sfnt2fon" ), ttf_file, args ); - strarray_add( &make->install_rules[INSTALL_LIB], xstrdup(font) ); - strarray_add( &make->install_rules[INSTALL_LIB], strmake( "d$(fontdir)/%s", font )); + add_install_rule( make, source->name, xstrdup(font), strmake( "d$(fontdir)/%s", font )); } } } @@ -4211,6 +4204,8 @@ int main( int argc, char *argv[] ) unwind_flags = get_expanded_make_var_array( top_makefile, "UNWINDFLAGS" ); libs = get_expanded_make_var_array( top_makefile, "LIBS" ); enable_tests = get_expanded_make_var_array( top_makefile, "ENABLE_TESTS" ); + top_install_lib = get_expanded_make_var_array( top_makefile, "TOP_INSTALL_LIB" ); + top_install_dev = get_expanded_make_var_array( top_makefile, "TOP_INSTALL_DEV" ); root_src_dir = get_expanded_make_variable( top_makefile, "srcdir" ); tools_dir = get_expanded_make_variable( top_makefile, "TOOLSDIR" );