Skip site navigation (1) Skip section navigation (2)

Need for DLLINIT in Makefile.shlib

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Cc: PostgreSQL Cygwin mailing list <pgsql-cygwin(at)postgreSQL(dot)org>,PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgreSQL(dot)org>
Subject: Need for DLLINIT in Makefile.shlib
Date: 2004-10-11 22:22:57
Message-ID: 200410112222.i9BMMvN01175@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-cygwinpgsql-hackerspgsql-hackers-win32
I am curious why Cygwin needs DLLINIT in Makefile.shlib, and Win32
doesn't:

	# Cygwin case
	$(shlib) lib$(NAME).a: $(OBJS) $(DLLINIT)
	        $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
	        $(DLLWRAP) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(DLLINIT) $(SHLIB_LINK)
	        $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
	
	$(DLLINIT): $(DLLINIT:%.o=%.c)
	        $(MAKE) -C $(@D) $(@F)
	
	endif # PORTNAME == cygwin
	
	else # PORTNAME == win32
	
	# win32 case
	$(shlib) lib$(NAME).a: $(OBJS)
	        $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
	        $(DLLWRAP) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
	        $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
	
	endif # PORTNAME == win32

The only difference I see is that Cygwin uses $(DLLINIT) while Win32 does
not.  Is that correct?  Why?

Both set DLLINIT in their makefiles:

	DLLINIT = $(top_builddir)/src/utils/dllinit.o

Could they be merged into a single snipped of code?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Responses

pgsql-cygwin by date

Next:From: Bruce MomjianDate: 2004-10-11 22:49:38
Subject: Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore
Previous:From: Leeuw van der, TimDate: 2004-10-11 07:26:02
Subject: Re: initdb failed

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2004-10-11 22:49:38
Subject: Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore
Previous:From: Bin LiuDate: 2004-10-11 22:13:43
Subject: Question about Parser()

pgsql-hackers-win32 by date

Next:From: Bruce MomjianDate: 2004-10-11 22:49:38
Subject: Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore
Previous:From: Magnus HaganderDate: 2004-10-11 07:58:56
Subject: Re: build error in initdb on win32

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group