From a82f1b0ebbf7960075c4b43968315f9b14b1cb47 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sat, 9 Sep 2006 22:28:53 +0200 Subject: [PATCH] makefiles: Avoid empty variables in substitutions, it's broken on BSD make. --- dlls/Makedll.rules.in | 25 +++++++++++++------------ programs/Makeprog.rules.in | 3 +-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in index b48e7101074..428d71752a1 100644 --- a/dlls/Makedll.rules.in +++ b/dlls/Makedll.rules.in @@ -19,10 +19,9 @@ SPEC_DEF = lib$(BASEMODULE).def WIN16_FILES = $(SPEC_SRCS16:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16) ALL_OBJS = @WIN16_FILES@ $(OBJS) $(RC_SRCS:.rc=.res) ALL_LIBS = $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS) -ALL_IMPORTS = $(DELAYIMPORTS) $(IMPORTS) IMPLIB_OBJS = $(IMPLIB_SRCS:.c=.o) STATICIMPLIB= $(IMPORTLIB:.def=.def.a) -DLL_LDPATH = -L$(DLLDIR) $(ALL_IMPORTS:%=-L$(DLLDIR)/%) +DLL_LDPATH = -L$(DLLDIR) $(DELAYIMPORTS:%=-L$(DLLDIR)/%) $(IMPORTS:%=-L$(DLLDIR)/%) INSTALLDIRS = $(DESTDIR)$(dlldir) $(DESTDIR)$(datadir)/wine all: $(MODULE)$(DLLEXT) $(SUBDIRS) @@ -32,20 +31,20 @@ all: $(MODULE)$(DLLEXT) $(SUBDIRS) # Rules for .so files $(MODULE).so: $(MAINSPEC) $(ALL_OBJS) Makefile.in - $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(SUBSYSTEM:%=-Wb,--subsystem,%) $(BASEADDRESS:%=-Wl,--image-base,%) -o $@ $(ALL_IMPORTS:%=-l%) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS) + $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(SUBSYSTEM:%=-Wb,--subsystem,%) $(BASEADDRESS:%=-Wl,--image-base,%) -o $@ $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS) # Rules for .dll files $(MODULE): $(RCOBJS) $(OBJS) $(SPEC_DEF) Makefile.in - $(DLLWRAP) -k --def $(SPEC_DEF) -o $@ $(RCOBJS) $(OBJS) $(DLL_LDPATH) $(ALL_IMPORTS:%=-l%) $(LIBWINE) $(ALL_LIBS) + $(DLLWRAP) -k --def $(SPEC_DEF) -o $@ $(RCOBJS) $(OBJS) $(DLL_LDPATH) $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(LIBWINE) $(ALL_LIBS) # Rules for import libraries -.PHONY: implib $(IMPLIB_OBJS:%=__static_implib__%) +.PHONY: implib $(IMPLIB_SRCS:%=__static_implib__%) -all implib: $(IMPORTLIB) $(IMPLIB_OBJS:%=__static_implib__%) +all implib: $(IMPORTLIB) $(IMPLIB_SRCS:%=__static_implib__%) -$(IMPLIB_OBJS:%=__static_implib__%): $(STATICIMPLIB) +$(IMPLIB_SRCS:%=__static_implib__%): $(STATICIMPLIB) lib$(BASEMODULE).def: $(MAINSPEC) $(WINEBUILD) -w --def -o $@ --export $(SRCDIR)/$(MAINSPEC) @@ -87,12 +86,14 @@ EXE_SPECS16 = $(SPEC_SRCS16:.exe.spec=.exe16) DRV_SPECS16 = $(EXE_SPECS16:.drv.spec=.drv16) ALL_SPECS16 = $(DRV_SPECS16:.spec=.dll16) -WIN16_INSTALL = $(ALL_SPECS16:%=_install_/%) +WIN16_INSTALL = $(SPEC_SRCS16:%=_install_/%) .PHONY: install_lib install_static_implib_def install_static_implib_a -.PHONY: $(ALL_SPECS16:%=_install_/%) $(IMPORTLIB:%=_install_/%) $(IMPLIB_OBJS:%=_install_static_implib_/%) +.PHONY: $(SPEC_SRCS16:%=_install_/%) $(ALL_SPECS16:%=_install_/%) $(IMPORTLIB:%=_install_/%) $(IMPLIB_SRCS:%=_install_static_implib_/%) -$(ALL_SPECS16:%=_install_/%): install_lib +$(SPEC_SRCS16:%=_install_/%): $(ALL_SPECS16:%=_install_/%) + +$(ALL_SPECS16:%=_install_/%): $(DESTDIR)$(dlldir) echo "$(MODULE)" > $(DESTDIR)$(dlldir)/`basename $@` install_lib: $(MODULE)$(DLLEXT) $(DESTDIR)$(dlldir) @@ -106,11 +107,11 @@ install_static_implib_def: $(STATICIMPLIB) $(DESTDIR)$(dlldir) install_static_implib_a: -$(IMPLIB_OBJS:%=_install_static_implib_/%): install_static_implib_$(IMPLIBEXT) +$(IMPLIB_SRCS:%=_install_static_implib_/%): install_static_implib_$(IMPLIBEXT) install install-lib:: install_lib @WIN16_INSTALL@ -install install-dev:: $(IMPORTLIB:%=_install_/%) $(IMPLIB_OBJS:%=_install_static_implib_/%) +install install-dev:: $(IMPORTLIB:%=_install_/%) $(IMPLIB_SRCS:%=_install_static_implib_/%) uninstall:: -cd $(DESTDIR)$(dlldir) && $(RM) $(MODULE)$(DLLEXT) $(IMPORTLIB) $(STATICIMPLIB) $(ALL_SPECS16) diff --git a/programs/Makeprog.rules.in b/programs/Makeprog.rules.in index 84cdd124780..f73498e7711 100644 --- a/programs/Makeprog.rules.in +++ b/programs/Makeprog.rules.in @@ -11,8 +11,7 @@ DLLFLAGS = @DLLFLAGS@ DEFS = $(EXTRADEFS) -ALL_IMPORTS = $(DELAYIMPORTS) $(IMPORTS) -ALL_LIBS = $(ALL_IMPORTS:%=-l%) $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS) +ALL_LIBS = $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS) BASEMODULE = $(MODULE:.exe=) RUNTESTFLAGS= -q -P wine -T $(TOPOBJDIR) INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(dlldir) $(DESTDIR)$(mandir)/man$(prog_manext) -- 2.11.4.GIT