further tweaking of dll creation to deal with msys shell issues

git-svn-id: svn+q:///qpdf/trunk@1008 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2010-08-08 22:29:49 +00:00
parent bc91aa2945
commit b282fd818d
2 changed files with 10 additions and 12 deletions

View File

@ -62,9 +62,8 @@ endef
# 1 2 3 4 5 6 7
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
define makelib
major=$$(( $(5) - $(7) )); \
dlltool -l $(2) -D $$(basename `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`)$${major}.dll $(1) && \
$(CXX) -shared -o `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$${major}.dll \
dlltool -l $(2) -D $$(basename `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(shell expr $(5) - $(7)).dll) $(1); \
$(CXX) -shared -o `echo $(2) | sed -e 's,/lib\(.*\).a,/\1,'`$(shell expr $(5) - $(7)).dll \
$(1) $(3) $(4)
endef

View File

@ -65,16 +65,15 @@ endef
# 1 2 3 4 5 6 7
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
define makelib
major=$$(( $(5) - $(7) )); \
cl /nologo /O2 /Zi /Gy /EHsc /MD /LD /Fe$(basename $(2))$${major}.dll \
$(1) /link /incremental:no \
cl /nologo /O2 /Zi /Gy /EHsc /MD /LD /Fe$(basename $(2))$(shell expr $(5) - $(7)).dll $(1) \
/link /incremental:no \
$(foreach L,$(subst -L,,$(3)),/LIBPATH:$(L)) \
$(foreach L,$(subst -l,,$(4)),$(L).lib) && \
if [ -f $(basename $(2))$${major}.dll.manifest ]; then \
mt.exe -nologo -manifest $(basename $(2))$${major}.dll.manifest \
-outputresource:$(basename $(2))$${major}.dll\;2; \
fi && \
mv $(basename $(2))$${major}.lib $(2)
$(foreach L,$(subst -l,,$(4)),$(L).lib)
if [ -f $(basename $(2))$(shell expr $(5) - $(7)).dll.manifest ]; then \
mt.exe -nologo -manifest $(basename $(2))$(shell expr $(5) - $(7)).dll.manifest \
-outputresource:$(basename $(2))$(shell expr $(5) - $(7)).dll\;2; \
fi
mv $(basename $(2))$(shell expr $(5) - $(7)).lib $(2)
endef
# 1 2 3 4