(2014/02/12 15:31), Inoue, Hiroshi wrote:
> (2014/02/12 3:03), Tom Lane wrote:
>> Hiroshi Inoue <in...@tpf.co.jp> writes:
>>> (2014/02/09 8:06), Andrew Dunstan wrote:
>>>> Yeah. Incidentally, we didn't quite get rid of dlltool for Cygwin. We
>>>> did get rid of dllwrap. But I agree this is worth trying for Mingw.
>>
>>> I tried MINGW port with the attached change and successfully built
>>> src and contrib and all pararell regression tests were OK.
>>
>> I cleaned this up a bit (the if-nesting in Makefile.shlib was making
>> my head hurt, not to mention that it left a bunch of dead code) and
>> committed it.
> 
> Thanks.
> 
>> By my count, the only remaining usage of dlltool is in plpython's
>> Makefile.  Can we get rid of that?
> 
> Maybe this is one of the few use cases of dlltool.
> Because python doesn't ship with its MINGW import library, the
> Makefile uses dlltool to generate an import library from the python
> DLL.
> 
>> Also, the only remaining usage of dllwrap is in src/bin/pgevent/Makefile.
>> Do we need that either?
> 
> Maybe this can be removed.
> I would make a patch later.

Sorry for the late reply.
Attached is a patch to remove dllwarp from pgevent/Makefile.

regards,
Hiroshi Inoue



diff --git a/src/bin/pgevent/Makefile b/src/bin/pgevent/Makefile
index 1d90276..0a7c16d 100644
--- a/src/bin/pgevent/Makefile
+++ b/src/bin/pgevent/Makefile
@@ -17,30 +17,21 @@ include $(top_builddir)/src/Makefile.global
 ifeq ($(PORTNAME), win32)
 
 OBJS=pgevent.o pgmsgevent.o
-NAME=pgevent.dll
+NAME=pgevent
+SHLIB_LINK = 
+SHLIB_EXPORTS = exports.txt
 
-all: $(NAME)
+all: all-lib
 
-install: all install-lib
+include $(top_srcdir)/src/Makefile.shlib
 
-pgevent.dll: pgevent.def $(OBJS)
-	$(DLLWRAP) --def $< -o $(NAME) $(OBJS)
+install: all install-lib
 
 pgmsgevent.o: pgmsgevent.rc win32ver.rc
 	$(WINDRES) $< -o $@ --include-dir=$(top_builddir)/src/include --include-dir=$(top_srcdir)/src/include --include-dir=$(srcdir) --include-dir=.
 
-all-lib: $(NAME)
-
-install-lib: $(NAME)
-	$(INSTALL_STLIB) $< '$(DESTDIR)$(libdir)/$<'
-
-uninstall-lib:
-	rm -f '$(DESTDIR)$(libdir)/$(NAME)'
-
-clean distclean:
-	rm -f $(OBJS) $(NAME) win32ver.rc
 
-clean-lib:
-	rm -f $(NAME)
+clean distclean: clean-lib
+	rm -f $(OBJS) win32ver.rc $(DLL_DEFFILE)
 
 endif
diff --git a/src/bin/pgevent/exports.txt b/src/bin/pgevent/exports.txt
new file mode 100644
index 0000000..70dcd25
--- /dev/null
+++ b/src/bin/pgevent/exports.txt
@@ -0,0 +1,5 @@
+; dlltool --output-def pgevent.def pgevent.o pgmsgevent.o
+EXPORTS
+	DllUnregisterServer@0 ;
+	DllRegisterServer@0 ;
+	DllInstall ;
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to