Avoid some non-portable makefile constructs.

This commit is contained in:
Alexandre Julliard 2004-08-11 20:59:09 +00:00
parent ab13698998
commit 06233cfb47
7 changed files with 205 additions and 211 deletions

View File

@ -957,138 +957,135 @@ libuuid.a: uuid/libuuid.a
# Import libraries # Import libraries
IMPORT_LIBS = \ IMPORT_LIBS = \
libadvapi32 \ libadvapi32.$(IMPLIBEXT) \
libamstream \ libamstream.$(IMPLIBEXT) \
libatl \ libatl.$(IMPLIBEXT) \
libavicap32 \ libavicap32.$(IMPLIBEXT) \
libavifil32 \ libavifil32.$(IMPLIBEXT) \
libcabinet \ libcabinet.$(IMPLIBEXT) \
libcapi2032 \ libcapi2032.$(IMPLIBEXT) \
libcards \ libcards.$(IMPLIBEXT) \
libcfgmgr32 \ libcfgmgr32.$(IMPLIBEXT) \
libcomcat \ libcomcat.$(IMPLIBEXT) \
libcomctl32 \ libcomctl32.$(IMPLIBEXT) \
libcomdlg32 \ libcomdlg32.$(IMPLIBEXT) \
libcrtdll \ libcrtdll.$(IMPLIBEXT) \
libcrypt32 \ libcrypt32.$(IMPLIBEXT) \
libctl3d32 \ libctl3d32.$(IMPLIBEXT) \
libd3d8 \ libd3d8.$(IMPLIBEXT) \
libd3d9 \ libd3d9.$(IMPLIBEXT) \
libd3dim \ libd3dim.$(IMPLIBEXT) \
libd3drm \ libd3drm.$(IMPLIBEXT) \
libd3dx8 \ libd3dx8.$(IMPLIBEXT) \
libd3dxof \ libd3dxof.$(IMPLIBEXT) \
libdbghelp \ libdbghelp.$(IMPLIBEXT) \
libdciman32 \ libdciman32.$(IMPLIBEXT) \
libddraw \ libddraw.$(IMPLIBEXT) \
libdevenum \ libdevenum.$(IMPLIBEXT) \
libdinput \ libdinput.$(IMPLIBEXT) \
libdinput8 \ libdinput8.$(IMPLIBEXT) \
libdmband \ libdmband.$(IMPLIBEXT) \
libdmcompos \ libdmcompos.$(IMPLIBEXT) \
libdmime \ libdmime.$(IMPLIBEXT) \
libdmloader \ libdmloader.$(IMPLIBEXT) \
libdmscript \ libdmscript.$(IMPLIBEXT) \
libdmstyle \ libdmstyle.$(IMPLIBEXT) \
libdmsynth \ libdmsynth.$(IMPLIBEXT) \
libdmusic \ libdmusic.$(IMPLIBEXT) \
libdmusic32 \ libdmusic32.$(IMPLIBEXT) \
libdplay \ libdplay.$(IMPLIBEXT) \
libdplayx \ libdplayx.$(IMPLIBEXT) \
libdpnet \ libdpnet.$(IMPLIBEXT) \
libdpnhpast \ libdpnhpast.$(IMPLIBEXT) \
libdsound \ libdsound.$(IMPLIBEXT) \
libdswave \ libdswave.$(IMPLIBEXT) \
libdxdiagn \ libdxdiagn.$(IMPLIBEXT) \
libgdi32 \ libgdi32.$(IMPLIBEXT) \
libglu32 \ libglu32.$(IMPLIBEXT) \
libglut32 \ libglut32.$(IMPLIBEXT) \
libiccvid \ libiccvid.$(IMPLIBEXT) \
libicmp \ libicmp.$(IMPLIBEXT) \
libimagehlp \ libimagehlp.$(IMPLIBEXT) \
libimm32 \ libimm32.$(IMPLIBEXT) \
libiphlpapi \ libiphlpapi.$(IMPLIBEXT) \
libkernel32 \ libkernel32.$(IMPLIBEXT) \
liblz32 \ liblz32.$(IMPLIBEXT) \
libmapi32 \ libmapi32.$(IMPLIBEXT) \
libmlang \ libmlang.$(IMPLIBEXT) \
libmpr \ libmpr.$(IMPLIBEXT) \
libmsacm32 \ libmsacm32.$(IMPLIBEXT) \
libmsdmo \ libmsdmo.$(IMPLIBEXT) \
libmshtml \ libmshtml.$(IMPLIBEXT) \
libmsi \ libmsi.$(IMPLIBEXT) \
libmsimg32 \ libmsimg32.$(IMPLIBEXT) \
libmsnet32 \ libmsnet32.$(IMPLIBEXT) \
libmsrle32 \ libmsrle32.$(IMPLIBEXT) \
libmsvcrt \ libmsvcrt.$(IMPLIBEXT) \
libmsvcrt20 \ libmsvcrt20.$(IMPLIBEXT) \
libmsvcrt40 \ libmsvcrt40.$(IMPLIBEXT) \
libmsvcrtd \ libmsvcrtd.$(IMPLIBEXT) \
libmsvfw32 \ libmsvfw32.$(IMPLIBEXT) \
libmsvidc32 \ libmsvidc32.$(IMPLIBEXT) \
libmswsock \ libmswsock.$(IMPLIBEXT) \
libnetapi32 \ libnetapi32.$(IMPLIBEXT) \
libnewdev \ libnewdev.$(IMPLIBEXT) \
libntdll \ libntdll.$(IMPLIBEXT) \
libodbc32 \ libodbc32.$(IMPLIBEXT) \
libole32 \ libole32.$(IMPLIBEXT) \
liboleacc \ liboleacc.$(IMPLIBEXT) \
liboleaut32 \ liboleaut32.$(IMPLIBEXT) \
libolecli32 \ libolecli32.$(IMPLIBEXT) \
liboledlg \ liboledlg.$(IMPLIBEXT) \
libolepro32 \ libolepro32.$(IMPLIBEXT) \
libolesvr32 \ libolesvr32.$(IMPLIBEXT) \
libopengl32 \ libopengl32.$(IMPLIBEXT) \
libpsapi \ libpsapi.$(IMPLIBEXT) \
libqcap \ libqcap.$(IMPLIBEXT) \
libquartz \ libquartz.$(IMPLIBEXT) \
librasapi32 \ librasapi32.$(IMPLIBEXT) \
libriched32 \ libriched32.$(IMPLIBEXT) \
librpcrt4 \ librpcrt4.$(IMPLIBEXT) \
librsabase \ librsabase.$(IMPLIBEXT) \
libsecur32 \ libsecur32.$(IMPLIBEXT) \
libserialui \ libserialui.$(IMPLIBEXT) \
libsetupapi \ libsetupapi.$(IMPLIBEXT) \
libshdocvw \ libshdocvw.$(IMPLIBEXT) \
libshell32 \ libshell32.$(IMPLIBEXT) \
libshfolder \ libshfolder.$(IMPLIBEXT) \
libshlwapi \ libshlwapi.$(IMPLIBEXT) \
libsnmpapi \ libsnmpapi.$(IMPLIBEXT) \
libsti \ libsti.$(IMPLIBEXT) \
libtapi32 \ libtapi32.$(IMPLIBEXT) \
libttydrv \ libttydrv.$(IMPLIBEXT) \
libtwain_32 \ libtwain_32.$(IMPLIBEXT) \
libunicows \ libunicows.$(IMPLIBEXT) \
liburl \ liburl.$(IMPLIBEXT) \
liburlmon \ liburlmon.$(IMPLIBEXT) \
libuser32 \ libuser32.$(IMPLIBEXT) \
libuxtheme \ libuxtheme.$(IMPLIBEXT) \
libvdmdbg \ libvdmdbg.$(IMPLIBEXT) \
libversion \ libversion.$(IMPLIBEXT) \
libw32skrnl \ libw32skrnl.$(IMPLIBEXT) \
libwined3d \ libwined3d.$(IMPLIBEXT) \
libwinedos \ libwinedos.$(IMPLIBEXT) \
libwineps \ libwineps.$(IMPLIBEXT) \
libwininet \ libwininet.$(IMPLIBEXT) \
libwinmm \ libwinmm.$(IMPLIBEXT) \
libwinnls32 \ libwinnls32.$(IMPLIBEXT) \
libwinspool \ libwinspool.$(IMPLIBEXT) \
libwintab32 \ libwintab32.$(IMPLIBEXT) \
libwintrust \ libwintrust.$(IMPLIBEXT) \
libwnaspi32 \ libwnaspi32.$(IMPLIBEXT) \
libwow32 \ libwow32.$(IMPLIBEXT) \
libws2_32 \ libws2_32.$(IMPLIBEXT) \
libwsock32 \ libwsock32.$(IMPLIBEXT) \
libx11drv libx11drv.$(IMPLIBEXT) \
ALL_IMPORT_LIBS = \
$(IMPORT_LIBS:%=%.$(IMPLIBEXT)) \
libdxerr8.a \ libdxerr8.a \
libdxerr9.a \ libdxerr9.a \
libdxguid.a \ libdxguid.a \
libuuid.a libuuid.a
implib: $(ALL_IMPORT_LIBS) implib: $(IMPORT_LIBS)
libadvapi32.def: advapi32/advapi32.spec.def libadvapi32.def: advapi32/advapi32.spec.def
$(RM) $@ && $(LN_S) 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) wsock32/wsock32.spec.def: $(WINEBUILD)
x11drv/x11drv.spec.def: $(WINEBUILD) x11drv/x11drv.spec.def: $(WINEBUILD)
$(BUILDSUBDIRS): $(ALL_IMPORT_LIBS) $(BUILDSUBDIRS): $(IMPORT_LIBS)
$(INSTALLSUBDIRS:%=%/__install__): $(ALL_IMPORT_LIBS) $(INSTALLSUBDIRS:%=%/__install__): $(IMPORT_LIBS)
# Map library name to the corresponding directory # Map library name to the corresponding directory
@ -2012,18 +2009,18 @@ doc-sgml: $(SUBDIRS:%=%/__doc_sgml__)
# Misc rules # Misc rules
install install-dev:: $(ALL_IMPORT_LIBS) install install-dev:: $(IMPORT_LIBS)
$(MKINSTALLDIRS) $(dlldir) $(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__) install install-lib:: $(INSTALLSUBDIRS:%=%/__install__)
uninstall:: uninstall::
$(RM) $(ALL_IMPORT_LIBS:%=$(dlldir)/%) -cd $(dlldir) && $(RM) $(IMPORT_LIBS)
-rmdir $(dlldir) -rmdir $(dlldir)
clean:: clean::
$(RM) $(ALL_IMPORT_LIBS) $(SYMLINKS) $(RM) $(IMPORT_LIBS) $(SYMLINKS)
check test:: $(BUILDSUBDIRS:%=%/__test__) check test:: $(BUILDSUBDIRS:%=%/__test__)

View File

@ -229,15 +229,14 @@ foreach my $mod (sort @implibs)
{ {
my $def = $mod; my $def = $mod;
$def =~ s/\.(dll|drv)$//; $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) foreach my $mod (sort keys %implib_dirs)
{ {
printf NEWMAKE " \\\n\t%s", $mod; printf NEWMAKE " \\\n\t%s", $mod;
} }
print NEWMAKE "\n\n"; print NEWMAKE "\n\n";
print NEWMAKE "implib: \$(ALL_IMPORT_LIBS)\n\n"; print NEWMAKE "implib: \$(IMPORT_LIBS)\n\n";
foreach my $mod (sort @implibs) foreach my $mod (sort @implibs)
{ {
@ -262,8 +261,8 @@ foreach my $mod (sort @implibs)
print NEWMAKE <<EOF; print NEWMAKE <<EOF;
\$(BUILDSUBDIRS): \$(ALL_IMPORT_LIBS) \$(BUILDSUBDIRS): \$(IMPORT_LIBS)
\$(INSTALLSUBDIRS:%=%/__install__): \$(ALL_IMPORT_LIBS) \$(INSTALLSUBDIRS:%=%/__install__): \$(IMPORT_LIBS)
EOF EOF
@ -307,18 +306,18 @@ doc-sgml: \$(SUBDIRS:%=%/__doc_sgml__)
# Misc rules # Misc rules
install install-dev:: \$(ALL_IMPORT_LIBS) install install-dev:: \$(IMPORT_LIBS)
\$(MKINSTALLDIRS) \$(dlldir) \$(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__) install install-lib:: \$(INSTALLSUBDIRS:%=%/__install__)
uninstall:: uninstall::
\$(RM) \$(ALL_IMPORT_LIBS:%=\$(dlldir)/%) -cd \$(dlldir) && \$(RM) \$(IMPORT_LIBS)
-rmdir \$(dlldir) -rmdir \$(dlldir)
clean:: clean::
\$(RM) \$(ALL_IMPORT_LIBS) \$(SYMLINKS) \$(RM) \$(IMPORT_LIBS) \$(SYMLINKS)
check test:: \$(BUILDSUBDIRS:%=%/__test__) check test:: \$(BUILDSUBDIRS:%=%/__test__)

View File

@ -49,7 +49,7 @@ install:: $(WINE_BINARIES)
done done
uninstall:: uninstall::
$(RM) $(WINE_BINARIES:%=$(bindir)/%) $(bindir)/$(MODULE) -cd $(bindir) && $(RM) $(WINE_BINARIES) $(MODULE)
clean:: clean::
$(RM) $(WINE_BINARIES) $(MODULE) $(RM) $(WINE_BINARIES) $(MODULE)

View File

@ -88,42 +88,42 @@ INSTALLPROGS = \
# Symlinks to apps that we want to run from inside the source tree # Symlinks to apps that we want to run from inside the source tree
SYMLINKS = \ SYMLINKS = \
aviinfo.exe \ aviinfo.exe$(DLLEXT) \
aviplay.exe \ aviplay.exe$(DLLEXT) \
clock.exe \ clock.exe$(DLLEXT) \
cmdlgtst.exe \ cmdlgtst.exe$(DLLEXT) \
control.exe \ control.exe$(DLLEXT) \
expand.exe \ expand.exe$(DLLEXT) \
icinfo.exe \ icinfo.exe$(DLLEXT) \
msiexec.exe \ msiexec.exe$(DLLEXT) \
notepad.exe \ notepad.exe$(DLLEXT) \
progman.exe \ progman.exe$(DLLEXT) \
regedit.exe \ regedit.exe$(DLLEXT) \
regsvr32.exe \ regsvr32.exe$(DLLEXT) \
rpcss.exe \ rpcss.exe$(DLLEXT) \
rundll32.exe \ rundll32.exe$(DLLEXT) \
start.exe \ start.exe$(DLLEXT) \
taskmgr.exe \ taskmgr.exe$(DLLEXT) \
uninstaller.exe \ uninstaller.exe$(DLLEXT) \
view.exe \ view.exe$(DLLEXT) \
wcmd.exe \ wcmd.exe$(DLLEXT) \
wineboot.exe \ wineboot.exe$(DLLEXT) \
winebrowser.exe \ winebrowser.exe$(DLLEXT) \
winecfg.exe \ winecfg.exe$(DLLEXT) \
wineconsole.exe \ wineconsole.exe$(DLLEXT) \
winedbg.exe \ winedbg.exe$(DLLEXT) \
winefile.exe \ winefile.exe$(DLLEXT) \
winemenubuilder.exe \ winemenubuilder.exe$(DLLEXT) \
winemine.exe \ winemine.exe$(DLLEXT) \
winepath.exe \ winepath.exe$(DLLEXT) \
winetest.exe \ winetest.exe$(DLLEXT) \
winevdm.exe \ winevdm.exe$(DLLEXT) \
winhelp.exe \ winhelp.exe$(DLLEXT) \
winver.exe winver.exe$(DLLEXT)
@MAKE_RULES@ @MAKE_RULES@
all: wineapploader winelauncher $(SUBDIRS) $(SYMLINKS:%=%$(DLLEXT)) all: wineapploader winelauncher $(SUBDIRS) $(SYMLINKS)
wineapploader: wineapploader.in wineapploader: wineapploader.in
sed -e 's,@bindir\@,$(bindir),g' $(SRCDIR)/wineapploader.in >$@ || ($(RM) $@ && false) sed -e 's,@bindir\@,$(bindir),g' $(SRCDIR)/wineapploader.in >$@ || ($(RM) $@ && false)
@ -152,7 +152,7 @@ install:: winelauncher install-progs$(DLLEXT)
$(INSTALL_SCRIPT) winelauncher $(bindir)/winelauncher $(INSTALL_SCRIPT) winelauncher $(bindir)/winelauncher
uninstall:: uninstall::
$(RM) $(bindir)/wineapploader $(bindir)/winelauncher $(INSTALLPROGS:%=$(bindir)/%) -cd $(bindir) && $(RM) wineapploader winelauncher $(INSTALLPROGS)
-rmdir $(dlldir) -rmdir $(dlldir)
clean:: clean::

View File

@ -15,7 +15,7 @@ C_SRCS = \
@MAKE_RULES@ @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 aviinfo.exe.so: aviinfo.o
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -mwindows -o $@ aviinfo.o -L$(DLLDIR) -lavifil32 -lkernel32 $(ALL_LIBS) $(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 $(INSTALL_PROGRAM) icinfo.exe $(bindir)/icinfo.exe
uninstall_prog.so: uninstall_prog.so:
$(RM) $(PROGRAMS:%=$(dlldir)/%.so) $(RM) $(dlldir)/aviinfo.exe.so $(dlldir)/aviplay.exe.so $(dlldir)/icinfo.exe.so
uninstall_prog: uninstall_prog:
$(RM) $(PROGRAMS:%=$(bindir)/%) $(RM) $(bindir)/aviinfo.exe $(bindir)/aviplay.exe $(bindir)/icinfo.exe
install:: install_prog$(DLLEXT) install:: install_prog$(DLLEXT)

View File

@ -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 ="; print NEWMAKE "\n\n# Symlinks to apps that we want to run from inside the source tree\nSYMLINKS =";
foreach my $mod (sort keys %directories) 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 <<EOF;
\@MAKE_RULES\@ \@MAKE_RULES\@
all: wineapploader winelauncher \$(SUBDIRS) \$(SYMLINKS:%=%\$(DLLEXT)) all: wineapploader winelauncher \$(SUBDIRS) \$(SYMLINKS)
wineapploader: wineapploader.in wineapploader: wineapploader.in
sed -e 's,\@bindir\\\@,\$(bindir),g' \$(SRCDIR)/wineapploader.in >\$\@ || (\$(RM) \$\@ && false) sed -e 's,\@bindir\\\@,\$(bindir),g' \$(SRCDIR)/wineapploader.in >\$\@ || (\$(RM) \$\@ && false)
@ -174,7 +174,7 @@ install:: winelauncher install-progs\$(DLLEXT)
\$(INSTALL_SCRIPT) winelauncher \$(bindir)/winelauncher \$(INSTALL_SCRIPT) winelauncher \$(bindir)/winelauncher
uninstall:: uninstall::
\$(RM) \$(bindir)/wineapploader \$(bindir)/winelauncher \$(INSTALLPROGS:%=\$(bindir)/%) -cd \$(bindir) && \$(RM) wineapploader winelauncher \$(INSTALLPROGS)
-rmdir \$(dlldir) -rmdir \$(dlldir)
clean:: clean::

View File

@ -18,39 +18,37 @@ RC_SRCS = \
RC_BINSRC = winetest.rc RC_BINSRC = winetest.rc
RC_BINARIES = wine.ico RC_BINARIES = wine.ico
TESTS = \ TESTBINS = \
advapi32 \ advapi32_test.exe$(DLLEXT) \
comctl32 \ comctl32_test.exe$(DLLEXT) \
dsound \ dsound_test.exe$(DLLEXT) \
gdi32 \ gdi32_test.exe$(DLLEXT) \
iphlpapi \ iphlpapi_test.exe$(DLLEXT) \
kernel32 \ kernel32_test.exe$(DLLEXT) \
mapi32 \ mapi32_test.exe$(DLLEXT) \
mlang \ mlang_test.exe$(DLLEXT) \
msacm32 \ msacm32_test.exe$(DLLEXT) \
msvcrt \ msvcrt_test.exe$(DLLEXT) \
msvcrtd \ msvcrtd_test.exe$(DLLEXT) \
netapi32 \ netapi32_test.exe$(DLLEXT) \
ntdll \ ntdll_test.exe$(DLLEXT) \
oleaut32 \ oleaut32_test.exe$(DLLEXT) \
psapi \ psapi_test.exe$(DLLEXT) \
rpcrt4 \ rpcrt4_test.exe$(DLLEXT) \
shell32 \ shell32_test.exe$(DLLEXT) \
shlwapi \ shlwapi_test.exe$(DLLEXT) \
urlmon \ urlmon_test.exe$(DLLEXT) \
user32 \ user32_test.exe$(DLLEXT) \
version \ version_test.exe$(DLLEXT) \
wininet \ wininet_test.exe$(DLLEXT) \
winmm \ winmm_test.exe$(DLLEXT) \
winspool.drv \ winspool.drv_test.exe$(DLLEXT) \
ws2_32 ws2_32_test.exe$(DLLEXT)
@MAKE_PROG_RULES@ @MAKE_PROG_RULES@
# Special rules # Special rules
TESTBINS = $(TESTS:%=%_test.exe$(DLLEXT))
tests.rc: maketest Makefile.in tests.rc: maketest Makefile.in
$(SRCDIR)/maketest $(TOPSRCDIR) $(TESTBINS) > $@ || ( $(RM) $@ && exit 1 ) $(SRCDIR)/maketest $(TOPSRCDIR) $(TESTBINS) > $@ || ( $(RM) $@ && exit 1 )