makefiles: Avoid empty variables in substitutions, it's broken on BSD make.

oldstable
Alexandre Julliard 2006-09-09 22:28:53 +02:00
parent 9f8eb41e77
commit a82f1b0ebb
2 changed files with 14 additions and 14 deletions

View File

@ -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)

View File

@ -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)