#
#-------------------------------------------------------------------------
+PGFILEDESC = "snowball - natural language stemmers"
+PGAPPICON = win32
+
subdir = src/backend/snowball
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -I$(top_srcdir)/src/include/snowball \
-I$(top_srcdir)/src/include/snowball/libstemmer $(CPPFLAGS)
-OBJS= dict_snowball.o api.o utilities.o \
+OBJS= $(WIN32RES) dict_snowball.o api.o utilities.o \
stem_ISO_8859_1_danish.o \
stem_ISO_8859_1_dutch.o \
stem_ISO_8859_1_english.o \
# src/interfaces/ecpg/test/Makefile
+PGFILEDESC = "ECPG Test - regression tests for ECPG"
+PGAPPICON = win32
+
subdir = src/interfaces/ecpg/test
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
'-DDLSUFFIX="$(DLSUFFIX)"' \
$(CPPFLAGS)
-PGFILEDESC = "ECPG Test - regression tests for ECPG"
-
# where to find psql for testing an existing installation
PSQLDIR = $(bindir)
# Makefile for isolation tests
#
+PGFILEDESC = "pg_isolation_regress/isolationtester - multi-client test driver"
+PGAPPICON = win32
+
subdir = src/test/isolation
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) -I$(srcdir)/../regress $(CPPFLAGS)
-OBJS = specparse.o isolationtester.o
+OBJS = specparse.o isolationtester.o $(WIN32RES)
all: isolationtester$(X) pg_isolation_regress$(X)
pg_regress.o: | submake-regress
rm -f $@ && $(LN_S) $(top_builddir)/src/test/regress/pg_regress.o .
-pg_isolation_regress$(X): isolation_main.o pg_regress.o
+pg_isolation_regress$(X): isolation_main.o pg_regress.o $(WIN32RES)
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
isolationtester$(X): $(OBJS) | submake-libpq submake-libpgport
#
#-------------------------------------------------------------------------
+PGFILEDESC = "pg_regress - test driver"
+PGAPPICON = win32
+
subdir = src/test/regress
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
all: pg_regress$(X)
-pg_regress$(X): pg_regress.o pg_regress_main.o | submake-libpgport
+pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
# dependencies ensure that path changes propagate
# Build dynamically-loaded object file for CREATE FUNCTION ... LANGUAGE C.
NAME = regress
-OBJS = regress.o
+OBJS = $(WIN32RES) regress.o
include $(top_srcdir)/src/Makefile.shlib
#
#-------------------------------------------------------------------------
+PGFILEDESC = "zic - time zone compiler"
+PGAPPICON = win32
+
subdir = src/timezone
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
OBJS= localtime.o strftime.o pgtz.o
# files needed to build zic utility program
-ZICOBJS= zic.o ialloc.o scheck.o localtime.o
+ZICOBJS= zic.o ialloc.o scheck.o localtime.o $(WIN32RES)
# timezone data files
TZDATA = africa antarctica asia australasia europe northamerica southamerica \
$postgres->AddFiles('src\port', @pgportfiles);
$postgres->AddFiles('src\common', @pgcommonbkndfiles);
$postgres->AddDir('src\timezone');
+ # We need source files from src\timezone, but that directory's resource
+ # file pertains to "zic", not to the backend.
+ $postgres->RemoveFile('src\timezone\win32ver.rc');
$postgres->AddFiles('src\backend\parser', 'scan.l', 'gram.y');
$postgres->AddFiles('src\backend\bootstrap', 'bootscanner.l',
'bootparse.y');
my $snowball = $solution->AddProject('dict_snowball', 'dll', '',
'src\backend\snowball');
+ # This Makefile uses VPATH to find most source files in a subdirectory.
$snowball->RelocateFiles(
'src\backend\snowball\libstemmer',
sub {
- return shift !~ /dict_snowball.c$/;
+ return shift !~ /(dict_snowball.c|win32ver.rc)$/;
});
$snowball->AddIncludeDir('src\include\snowball');
$snowball->AddReference($postgres);
$pgregress_ecpg->AddIncludeDir('src\test\regress');
$pgregress_ecpg->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
$pgregress_ecpg->AddDefine('FRONTEND');
+ $pgregress_ecpg->AddDirResourceFile('src\interfaces\ecpg\test');
$pgregress_ecpg->AddReference($libpgcommon, $libpgport);
my $isolation_tester =
$isolation_tester->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
$isolation_tester->AddDefine('FRONTEND');
$isolation_tester->AddLibrary('ws2_32.lib');
+ $isolation_tester->AddDirResourceFile('src\test\isolation');
$isolation_tester->AddReference($libpq, $libpgcommon, $libpgport);
my $pgregress_isolation =
$pgregress_isolation->AddIncludeDir('src\test\regress');
$pgregress_isolation->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
$pgregress_isolation->AddDefine('FRONTEND');
+ $pgregress_isolation->AddDirResourceFile('src\test\isolation');
$pgregress_isolation->AddReference($libpgcommon, $libpgport);
# src/bin
my $zic = $solution->AddProject('zic', 'exe', 'utils');
$zic->AddFiles('src\timezone', 'zic.c', 'ialloc.c', 'scheck.c',
'localtime.c');
+ $zic->AddDirResourceFile('src\timezone');
$zic->AddReference($libpgcommon, $libpgport);
if ($solution->{options}->{xml})
$proj->AddIncludeDir('src\bin\pg_dump');
$proj->AddIncludeDir('src\bin\psql');
$proj->AddReference($libpq, $libpgcommon, $libpgport);
- $proj->AddResourceFile('src\bin\scripts', 'PostgreSQL Utility',
- 'win32');
+ $proj->AddDirResourceFile('src\bin\scripts');
$proj->AddLibrary('ws2_32.lib');
}
# Regression DLL and EXE
my $regress = $solution->AddProject('regress', 'dll', 'misc');
$regress->AddFile('src\test\regress\regress.c');
+ $regress->AddDirResourceFile('src\test\regress');
$regress->AddReference($postgres);
my $pgregress = $solution->AddProject('pg_regress', 'exe', 'misc');
$pgregress->AddFile('src\test\regress\pg_regress_main.c');
$pgregress->AddIncludeDir('src\port');
$pgregress->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
+ $pgregress->AddDirResourceFile('src\test\regress');
$pgregress->AddReference($libpgcommon, $libpgport);
# fix up pg_xlogdump once it's been set up
sub AddDir
{
my ($self, $reldir) = @_;
- my $MF;
-
- my $t = $/;
- undef $/;
- open($MF, "$reldir\\Makefile")
- || open($MF, "$reldir\\GNUMakefile")
- || croak "Could not open $reldir\\Makefile\n";
- my $mf = <$MF>;
- close($MF);
+ my $mf = read_makefile($reldir);
$mf =~ s{\\\r?\n}{}g;
if ($mf =~ m{^(?:SUB)?DIRS[^=]*=\s*(.*)$}mg)
$mf =~ s{$replace_re}{}m;
}
- # See if this Makefile contains a description, and should have a RC file
+ $self->AddDirResourceFile($reldir);
+}
+
+# If the directory's Makefile bears a description string, add a resource file.
+sub AddDirResourceFile
+{
+ my ($self, $reldir) = @_;
+ my $mf = read_makefile($reldir);
+
if ($mf =~ /^PGFILEDESC\s*=\s*\"([^\"]+)\"/m)
{
my $desc = $1;
if ($mf =~ /^PGAPPICON\s*=\s*(.*)$/m) { $ico = $1; }
$self->AddResourceFile($reldir, $desc, $ico);
}
- $/ = $t;
}
sub AddResourceFile
return $txt;
}
+sub read_makefile
+{
+ my $reldir = shift;
+ my $F;
+ my $t = $/;
+
+ undef $/;
+ open($F, "$reldir\\GNUmakefile")
+ || open($F, "$reldir\\Makefile")
+ || croak "Could not open $reldir\\Makefile\n";
+ my $txt = <$F>;
+ close($F);
+ $/ = $t;
+
+ return $txt;
+}
+
1;
del /s /q src\interfaces\win32ver.rc 2> NUL
if exist src\backend\win32ver.rc del /q src\backend\win32ver.rc
if exist src\backend\replication\libpqwalreceiver\win32ver.rc del /q src\backend\replication\libpqwalreceiver\win32ver.rc
+if exist src\backend\snowball\win32ver.rc del /q src\backend\snowball\win32ver.rc
+if exist src\interfaces\ecpg\test\win32ver.rc del /q src\interfaces\ecpg\test\win32ver.rc
if exist src\pl\plperl\win32ver.rc del /q src\pl\plperl\win32ver.rc
if exist src\pl\plpgsql\src\win32ver.rc del /q src\pl\plpgsql\src\win32ver.rc
if exist src\pl\plpython\win32ver.rc del /q src\pl\plpython\win32ver.rc
if exist src\pl\tcl\win32ver.rc del /q src\pl\tcl\win32ver.rc
+if exist src\test\isolation\win32ver.rc del /q src\test\isolation\win32ver.rc
+if exist src\test\regress\win32ver.rc del /q src\test\regress\win32ver.rc
+if exist src\timezone\win32ver.rc del /q src\timezone\win32ver.rc
+
for /d %%f in (src\interfaces\ecpg\*) do if exist %%f\win32ver.rc del /q %%f\win32ver.rc
for /d %%f in (contrib\*) do if exist %%f\win32ver.rc del /q %%f\win32ver.rc
for /d %%f in (src\backend\utils\mb\conversion_procs\*) do if exist %%f\win32ver.rc del /q %%f\win32ver.rc