From 06233cfb47fd1556856907a3db6aa7c24ea4b2f3 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 11 Aug 2004 20:59:09 +0000 Subject: [PATCH] Avoid some non-portable makefile constructs. --- dlls/Makefile.in | 263 +++++++++++++++++----------------- dlls/make_dlls | 17 ++- loader/Makefile.in | 2 +- programs/Makefile.in | 68 ++++----- programs/avitools/Makefile.in | 6 +- programs/make_progs | 6 +- programs/winetest/Makefile.in | 54 ++++--- 7 files changed, 205 insertions(+), 211 deletions(-) diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 871183c33f3..1086b8f3dbc 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -957,138 +957,135 @@ libuuid.a: uuid/libuuid.a # Import libraries IMPORT_LIBS = \ - libadvapi32 \ - libamstream \ - libatl \ - libavicap32 \ - libavifil32 \ - libcabinet \ - libcapi2032 \ - libcards \ - libcfgmgr32 \ - libcomcat \ - libcomctl32 \ - libcomdlg32 \ - libcrtdll \ - libcrypt32 \ - libctl3d32 \ - libd3d8 \ - libd3d9 \ - libd3dim \ - libd3drm \ - libd3dx8 \ - libd3dxof \ - libdbghelp \ - libdciman32 \ - libddraw \ - libdevenum \ - libdinput \ - libdinput8 \ - libdmband \ - libdmcompos \ - libdmime \ - libdmloader \ - libdmscript \ - libdmstyle \ - libdmsynth \ - libdmusic \ - libdmusic32 \ - libdplay \ - libdplayx \ - libdpnet \ - libdpnhpast \ - libdsound \ - libdswave \ - libdxdiagn \ - libgdi32 \ - libglu32 \ - libglut32 \ - libiccvid \ - libicmp \ - libimagehlp \ - libimm32 \ - libiphlpapi \ - libkernel32 \ - liblz32 \ - libmapi32 \ - libmlang \ - libmpr \ - libmsacm32 \ - libmsdmo \ - libmshtml \ - libmsi \ - libmsimg32 \ - libmsnet32 \ - libmsrle32 \ - libmsvcrt \ - libmsvcrt20 \ - libmsvcrt40 \ - libmsvcrtd \ - libmsvfw32 \ - libmsvidc32 \ - libmswsock \ - libnetapi32 \ - libnewdev \ - libntdll \ - libodbc32 \ - libole32 \ - liboleacc \ - liboleaut32 \ - libolecli32 \ - liboledlg \ - libolepro32 \ - libolesvr32 \ - libopengl32 \ - libpsapi \ - libqcap \ - libquartz \ - librasapi32 \ - libriched32 \ - librpcrt4 \ - librsabase \ - libsecur32 \ - libserialui \ - libsetupapi \ - libshdocvw \ - libshell32 \ - libshfolder \ - libshlwapi \ - libsnmpapi \ - libsti \ - libtapi32 \ - libttydrv \ - libtwain_32 \ - libunicows \ - liburl \ - liburlmon \ - libuser32 \ - libuxtheme \ - libvdmdbg \ - libversion \ - libw32skrnl \ - libwined3d \ - libwinedos \ - libwineps \ - libwininet \ - libwinmm \ - libwinnls32 \ - libwinspool \ - libwintab32 \ - libwintrust \ - libwnaspi32 \ - libwow32 \ - libws2_32 \ - libwsock32 \ - libx11drv - -ALL_IMPORT_LIBS = \ - $(IMPORT_LIBS:%=%.$(IMPLIBEXT)) \ + libadvapi32.$(IMPLIBEXT) \ + libamstream.$(IMPLIBEXT) \ + libatl.$(IMPLIBEXT) \ + libavicap32.$(IMPLIBEXT) \ + libavifil32.$(IMPLIBEXT) \ + libcabinet.$(IMPLIBEXT) \ + libcapi2032.$(IMPLIBEXT) \ + libcards.$(IMPLIBEXT) \ + libcfgmgr32.$(IMPLIBEXT) \ + libcomcat.$(IMPLIBEXT) \ + libcomctl32.$(IMPLIBEXT) \ + libcomdlg32.$(IMPLIBEXT) \ + libcrtdll.$(IMPLIBEXT) \ + libcrypt32.$(IMPLIBEXT) \ + libctl3d32.$(IMPLIBEXT) \ + libd3d8.$(IMPLIBEXT) \ + libd3d9.$(IMPLIBEXT) \ + libd3dim.$(IMPLIBEXT) \ + libd3drm.$(IMPLIBEXT) \ + libd3dx8.$(IMPLIBEXT) \ + libd3dxof.$(IMPLIBEXT) \ + libdbghelp.$(IMPLIBEXT) \ + libdciman32.$(IMPLIBEXT) \ + libddraw.$(IMPLIBEXT) \ + libdevenum.$(IMPLIBEXT) \ + libdinput.$(IMPLIBEXT) \ + libdinput8.$(IMPLIBEXT) \ + libdmband.$(IMPLIBEXT) \ + libdmcompos.$(IMPLIBEXT) \ + libdmime.$(IMPLIBEXT) \ + libdmloader.$(IMPLIBEXT) \ + libdmscript.$(IMPLIBEXT) \ + libdmstyle.$(IMPLIBEXT) \ + libdmsynth.$(IMPLIBEXT) \ + libdmusic.$(IMPLIBEXT) \ + libdmusic32.$(IMPLIBEXT) \ + libdplay.$(IMPLIBEXT) \ + libdplayx.$(IMPLIBEXT) \ + libdpnet.$(IMPLIBEXT) \ + libdpnhpast.$(IMPLIBEXT) \ + libdsound.$(IMPLIBEXT) \ + libdswave.$(IMPLIBEXT) \ + libdxdiagn.$(IMPLIBEXT) \ + libgdi32.$(IMPLIBEXT) \ + libglu32.$(IMPLIBEXT) \ + libglut32.$(IMPLIBEXT) \ + libiccvid.$(IMPLIBEXT) \ + libicmp.$(IMPLIBEXT) \ + libimagehlp.$(IMPLIBEXT) \ + libimm32.$(IMPLIBEXT) \ + libiphlpapi.$(IMPLIBEXT) \ + libkernel32.$(IMPLIBEXT) \ + liblz32.$(IMPLIBEXT) \ + libmapi32.$(IMPLIBEXT) \ + libmlang.$(IMPLIBEXT) \ + libmpr.$(IMPLIBEXT) \ + libmsacm32.$(IMPLIBEXT) \ + libmsdmo.$(IMPLIBEXT) \ + libmshtml.$(IMPLIBEXT) \ + libmsi.$(IMPLIBEXT) \ + libmsimg32.$(IMPLIBEXT) \ + libmsnet32.$(IMPLIBEXT) \ + libmsrle32.$(IMPLIBEXT) \ + libmsvcrt.$(IMPLIBEXT) \ + libmsvcrt20.$(IMPLIBEXT) \ + libmsvcrt40.$(IMPLIBEXT) \ + libmsvcrtd.$(IMPLIBEXT) \ + libmsvfw32.$(IMPLIBEXT) \ + libmsvidc32.$(IMPLIBEXT) \ + libmswsock.$(IMPLIBEXT) \ + libnetapi32.$(IMPLIBEXT) \ + libnewdev.$(IMPLIBEXT) \ + libntdll.$(IMPLIBEXT) \ + libodbc32.$(IMPLIBEXT) \ + libole32.$(IMPLIBEXT) \ + liboleacc.$(IMPLIBEXT) \ + liboleaut32.$(IMPLIBEXT) \ + libolecli32.$(IMPLIBEXT) \ + liboledlg.$(IMPLIBEXT) \ + libolepro32.$(IMPLIBEXT) \ + libolesvr32.$(IMPLIBEXT) \ + libopengl32.$(IMPLIBEXT) \ + libpsapi.$(IMPLIBEXT) \ + libqcap.$(IMPLIBEXT) \ + libquartz.$(IMPLIBEXT) \ + librasapi32.$(IMPLIBEXT) \ + libriched32.$(IMPLIBEXT) \ + librpcrt4.$(IMPLIBEXT) \ + librsabase.$(IMPLIBEXT) \ + libsecur32.$(IMPLIBEXT) \ + libserialui.$(IMPLIBEXT) \ + libsetupapi.$(IMPLIBEXT) \ + libshdocvw.$(IMPLIBEXT) \ + libshell32.$(IMPLIBEXT) \ + libshfolder.$(IMPLIBEXT) \ + libshlwapi.$(IMPLIBEXT) \ + libsnmpapi.$(IMPLIBEXT) \ + libsti.$(IMPLIBEXT) \ + libtapi32.$(IMPLIBEXT) \ + libttydrv.$(IMPLIBEXT) \ + libtwain_32.$(IMPLIBEXT) \ + libunicows.$(IMPLIBEXT) \ + liburl.$(IMPLIBEXT) \ + liburlmon.$(IMPLIBEXT) \ + libuser32.$(IMPLIBEXT) \ + libuxtheme.$(IMPLIBEXT) \ + libvdmdbg.$(IMPLIBEXT) \ + libversion.$(IMPLIBEXT) \ + libw32skrnl.$(IMPLIBEXT) \ + libwined3d.$(IMPLIBEXT) \ + libwinedos.$(IMPLIBEXT) \ + libwineps.$(IMPLIBEXT) \ + libwininet.$(IMPLIBEXT) \ + libwinmm.$(IMPLIBEXT) \ + libwinnls32.$(IMPLIBEXT) \ + libwinspool.$(IMPLIBEXT) \ + libwintab32.$(IMPLIBEXT) \ + libwintrust.$(IMPLIBEXT) \ + libwnaspi32.$(IMPLIBEXT) \ + libwow32.$(IMPLIBEXT) \ + libws2_32.$(IMPLIBEXT) \ + libwsock32.$(IMPLIBEXT) \ + libx11drv.$(IMPLIBEXT) \ libdxerr8.a \ libdxerr9.a \ libdxguid.a \ libuuid.a -implib: $(ALL_IMPORT_LIBS) +implib: $(IMPORT_LIBS) libadvapi32.def: advapi32/advapi32.spec.def $(RM) $@ && $(LN_S) advapi32/advapi32.spec.def $@ @@ -1829,8 +1826,8 @@ winsock/ws2_32.spec.def: $(WINEBUILD) wsock32/wsock32.spec.def: $(WINEBUILD) x11drv/x11drv.spec.def: $(WINEBUILD) -$(BUILDSUBDIRS): $(ALL_IMPORT_LIBS) -$(INSTALLSUBDIRS:%=%/__install__): $(ALL_IMPORT_LIBS) +$(BUILDSUBDIRS): $(IMPORT_LIBS) +$(INSTALLSUBDIRS:%=%/__install__): $(IMPORT_LIBS) # Map library name to the corresponding directory @@ -2012,18 +2009,18 @@ doc-sgml: $(SUBDIRS:%=%/__doc_sgml__) # Misc rules -install install-dev:: $(ALL_IMPORT_LIBS) +install install-dev:: $(IMPORT_LIBS) $(MKINSTALLDIRS) $(dlldir) - for f in $(ALL_IMPORT_LIBS); do $(INSTALL_DATA) $$f $(dlldir)/$$f; done + for f in $(IMPORT_LIBS); do $(INSTALL_DATA) $$f $(dlldir)/$$f; done install install-lib:: $(INSTALLSUBDIRS:%=%/__install__) uninstall:: - $(RM) $(ALL_IMPORT_LIBS:%=$(dlldir)/%) + -cd $(dlldir) && $(RM) $(IMPORT_LIBS) -rmdir $(dlldir) clean:: - $(RM) $(ALL_IMPORT_LIBS) $(SYMLINKS) + $(RM) $(IMPORT_LIBS) $(SYMLINKS) check test:: $(BUILDSUBDIRS:%=%/__test__) diff --git a/dlls/make_dlls b/dlls/make_dlls index 72769b2f803..82a6b3332e0 100755 --- a/dlls/make_dlls +++ b/dlls/make_dlls @@ -229,15 +229,14 @@ foreach my $mod (sort @implibs) { my $def = $mod; $def =~ s/\.(dll|drv)$//; - printf NEWMAKE " \\\n\tlib%s", $def; + printf NEWMAKE " \\\n\tlib%s.\$(IMPLIBEXT)", $def; } -print NEWMAKE "\n\nALL_IMPORT_LIBS = \\\n\t\$(IMPORT_LIBS:%=%.\$(IMPLIBEXT))"; foreach my $mod (sort keys %implib_dirs) { printf NEWMAKE " \\\n\t%s", $mod; } print NEWMAKE "\n\n"; -print NEWMAKE "implib: \$(ALL_IMPORT_LIBS)\n\n"; +print NEWMAKE "implib: \$(IMPORT_LIBS)\n\n"; foreach my $mod (sort @implibs) { @@ -262,8 +261,8 @@ foreach my $mod (sort @implibs) print NEWMAKE <$@ || ($(RM) $@ && false) @@ -152,7 +152,7 @@ install:: winelauncher install-progs$(DLLEXT) $(INSTALL_SCRIPT) winelauncher $(bindir)/winelauncher uninstall:: - $(RM) $(bindir)/wineapploader $(bindir)/winelauncher $(INSTALLPROGS:%=$(bindir)/%) + -cd $(bindir) && $(RM) wineapploader winelauncher $(INSTALLPROGS) -rmdir $(dlldir) clean:: diff --git a/programs/avitools/Makefile.in b/programs/avitools/Makefile.in index 4e2b63fd820..14279346e08 100644 --- a/programs/avitools/Makefile.in +++ b/programs/avitools/Makefile.in @@ -15,7 +15,7 @@ C_SRCS = \ @MAKE_RULES@ -all: $(PROGRAMS:%=%$(DLLEXT)) $(PROGRAMS:.exe=$(EXEEXT)) +all: aviinfo.exe$(DLLEXT) aviplay.exe$(DLLEXT) icinfo.exe$(DLLEXT) aviinfo$(EXEEXT) aviplay$(EXEEXT) icinfo$(EXEEXT) aviinfo.exe.so: aviinfo.o $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -mwindows -o $@ aviinfo.o -L$(DLLDIR) -lavifil32 -lkernel32 $(ALL_LIBS) @@ -55,10 +55,10 @@ install_prog: $(PROGRAMS) $(INSTALL_PROGRAM) icinfo.exe $(bindir)/icinfo.exe uninstall_prog.so: - $(RM) $(PROGRAMS:%=$(dlldir)/%.so) + $(RM) $(dlldir)/aviinfo.exe.so $(dlldir)/aviplay.exe.so $(dlldir)/icinfo.exe.so uninstall_prog: - $(RM) $(PROGRAMS:%=$(bindir)/%) + $(RM) $(bindir)/aviinfo.exe $(bindir)/aviplay.exe $(bindir)/icinfo.exe install:: install_prog$(DLLEXT) diff --git a/programs/make_progs b/programs/make_progs index 261d63765a5..a674ed10e6e 100755 --- a/programs/make_progs +++ b/programs/make_progs @@ -134,7 +134,7 @@ foreach my $dir (sort keys %alldirs) print NEWMAKE "\n\n# Symlinks to apps that we want to run from inside the source tree\nSYMLINKS ="; foreach my $mod (sort keys %directories) { - printf NEWMAKE " \\\n\t%s", $mod; + printf NEWMAKE " \\\n\t%s\$(DLLEXT)", $mod; } ################################################################ @@ -145,7 +145,7 @@ print NEWMAKE <\$\@ || (\$(RM) \$\@ && false) @@ -174,7 +174,7 @@ install:: winelauncher install-progs\$(DLLEXT) \$(INSTALL_SCRIPT) winelauncher \$(bindir)/winelauncher uninstall:: - \$(RM) \$(bindir)/wineapploader \$(bindir)/winelauncher \$(INSTALLPROGS:%=\$(bindir)/%) + -cd \$(bindir) && \$(RM) wineapploader winelauncher \$(INSTALLPROGS) -rmdir \$(dlldir) clean:: diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in index 0e17696a909..054e36c014b 100644 --- a/programs/winetest/Makefile.in +++ b/programs/winetest/Makefile.in @@ -18,39 +18,37 @@ RC_SRCS = \ RC_BINSRC = winetest.rc RC_BINARIES = wine.ico -TESTS = \ - advapi32 \ - comctl32 \ - dsound \ - gdi32 \ - iphlpapi \ - kernel32 \ - mapi32 \ - mlang \ - msacm32 \ - msvcrt \ - msvcrtd \ - netapi32 \ - ntdll \ - oleaut32 \ - psapi \ - rpcrt4 \ - shell32 \ - shlwapi \ - urlmon \ - user32 \ - version \ - wininet \ - winmm \ - winspool.drv \ - ws2_32 +TESTBINS = \ + advapi32_test.exe$(DLLEXT) \ + comctl32_test.exe$(DLLEXT) \ + dsound_test.exe$(DLLEXT) \ + gdi32_test.exe$(DLLEXT) \ + iphlpapi_test.exe$(DLLEXT) \ + kernel32_test.exe$(DLLEXT) \ + mapi32_test.exe$(DLLEXT) \ + mlang_test.exe$(DLLEXT) \ + msacm32_test.exe$(DLLEXT) \ + msvcrt_test.exe$(DLLEXT) \ + msvcrtd_test.exe$(DLLEXT) \ + netapi32_test.exe$(DLLEXT) \ + ntdll_test.exe$(DLLEXT) \ + oleaut32_test.exe$(DLLEXT) \ + psapi_test.exe$(DLLEXT) \ + rpcrt4_test.exe$(DLLEXT) \ + shell32_test.exe$(DLLEXT) \ + shlwapi_test.exe$(DLLEXT) \ + urlmon_test.exe$(DLLEXT) \ + user32_test.exe$(DLLEXT) \ + version_test.exe$(DLLEXT) \ + wininet_test.exe$(DLLEXT) \ + winmm_test.exe$(DLLEXT) \ + winspool.drv_test.exe$(DLLEXT) \ + ws2_32_test.exe$(DLLEXT) @MAKE_PROG_RULES@ # Special rules -TESTBINS = $(TESTS:%=%_test.exe$(DLLEXT)) - tests.rc: maketest Makefile.in $(SRCDIR)/maketest $(TOPSRCDIR) $(TESTBINS) > $@ || ( $(RM) $@ && exit 1 )