OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/base.git] / util / src / TclTk / tcl8.6.12 / pkgs / tdbcpostgres1.1.3 / win / makefile.vc
1 #------------------------------------------------------------- -*- makefile -*-\r
2 #\r
3 # Makefile for TBDC Postgres interface\r
4 #\r
5 # Basic build, test and install\r
6 #   nmake /s /nologo /f makefile.vc INSTALLDIR=c:\path\to\installdir TCLDIR=c:\path\to\tcl\source\r
7 #   nmake /s /nologo /f makefile.vc INSTALLDIR=c:\path\to\installdir TCLDIR=c:\path\to\tcl\source test\r
8 #   nmake /s /nologo /f makefile.vc INSTALLDIR=c:\path\to\installdir TCLDIR=c:\path\to\tcl\source install\r
9 #\r
10 # For other build options (debug, static etc.)\r
11 # See TIP 477 (https://core.tcl-lang.org/tips/doc/trunk/tip/477.md) for\r
12 # detailed documentation.\r
13 #\r
14 # See the file "license.terms" for information on usage and redistribution\r
15 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.\r
16 #\r
17 #------------------------------------------------------------------------------\r
18 \r
19 PROJECT = tdbcpostgres\r
20 # Tcl 8.6 etc. compile with /DUNICODE. TDBC pre-nmake reform compiled\r
21 # without -DUNICODE. Keep that behaviour.\r
22 USE_WIDECHAR_API  = 0\r
23 \r
24 !include "rules-ext.vc"\r
25 \r
26 # nmakehelp -V <file> <tag> will search the file for tag, skips until a\r
27 #       number and returns all character until a character not in [0-9.ab]\r
28 #       is read.\r
29 !if [echo REM = This file is generated from Makefile.vc > versions.vc]\r
30 !endif\r
31 !if [echo TCL_VERSION_REQ = \>> versions.vc] \\r
32    && [nmakehlp -V ..\configure.ac TCL_VERSION_REQ >> versions.vc]\r
33 !endif\r
34 !include "versions.vc"\r
35 \r
36 PRJ_OBJS = \\r
37         $(TMP_DIR)\tdbcpostgres.obj \\r
38         $(TMP_DIR)\pqStubInit.obj\r
39 \r
40 # Uncomment the following line if you want to build and install stubs\r
41 # PRJ_STUBOBJS = $(TMP_DIR)\pqStubInit.obj\r
42 \r
43 PRJ_HEADERS = \\r
44         $(GENERICDIR)\fakepq.h \\r
45         $(GENERICDIR)\pqStubs.h\r
46 \r
47 # Locate TDBC headers and libraries.\r
48 # In principle, we don't need the TDBC source directory, and an installed\r
49 # TDBC should suffice. But that needs additional machinery not implemented\r
50 # yet.\r
51 !if [echo TDBC_DIR = \> nmakehlp.out] \\r
52    || [nmakehlp -L generic\tdbcInt.h >> nmakehlp.out]\r
53 !error Could not locate TDBC source directory.\r
54 !endif\r
55 !include nmakehlp.out\r
56 \r
57 # Get the TDBC version from its configure.ac\r
58 !if [echo TDBC_DOTVERSION = \> versions.vc] \\r
59    && [nmakehlp -V "$(TDBC_DIR)\configure.ac" tdbc >> versions.vc]\r
60 !error Could not retrieve TDBC version.\r
61 !endif\r
62 !include versions.vc\r
63 \r
64 TDBC_VERSION     = $(TDBC_DOTVERSION:.=)\r
65 TDBC_GENERIC_DIR = $(TDBC_DIR)\generic\r
66 TDBCSTUBLIBNAME  = tdbcstub$(TDBC_VERSION).lib\r
67 TDBCSTUBLIB      = $(TDBC_DIR)\win\$(BUILDDIRTOP)\$(TDBCSTUBLIBNAME)\r
68 TDBC_LIB_FILE    = tdbc$(TDBC_VERSION).dll\r
69 TDBC_BIN_DIR     = $(TDBC_DIR)/win/$(BUILDDIRTOP)\r
70 \r
71 PRJ_INCLUDES    = -I"$(TDBC_GENERIC_DIR)"\r
72 \r
73 !if !$(STATIC_BUILD)\r
74 PRJ_LIBS  = $(TDBCSTUBLIB)\r
75 !endif\r
76 \r
77 # Disable standard test target because we have a custom one\r
78 DISABLE_TARGET_test = 1\r
79 !include "$(_RULESDIR)\targets.vc"\r
80 \r
81 # Additional default actions for install\r
82 install: default-install-docs-n\r
83 \r
84 # The TIP 477 generation of pkgIndex.tcl from pkgIndex.tcl.in does not include\r
85 # all replacements below so define our own target.\r
86 pkgindex:   $(OUT_DIR)\pkgIndex.tcl\r
87 $(OUT_DIR)\pkgIndex.tcl: $(ROOT)\pkgIndex.tcl.in\r
88         @nmakehlp -s << $** > $@\r
89 @PACKAGE_NAME@        $(PROJECT)\r
90 @PACKAGE_VERSION@     $(DOTVERSION)\r
91 @TCL_VERSION_REQ@     $(TCL_VERSION_REQ)\r
92 @PKG_LIB_FILE@        $(PRJLIBNAME)\r
93 @PKG_LIB_FILE8@       $(PRJLIBNAME8)\r
94 @PKG_LIB_FILE9@       $(PRJLIBNAME9)\r
95 <<\r
96 \r
97 test: setup $(PROJECT)\r
98         @set TCL_LIBRARY=$(TCL_LIBRARY:\=/)\r
99         @set TCLLIBPATH=$(OUT_DIR:\=/)\r
100         @set TDBC_LIBRARY=$(LIBDIR:\=/)\r
101         @$(CPY) $(LIBDIR)\*.tcl $(OUT_DIR)\r
102 !if $(TCLINSTALL)\r
103         @set PATH=$(_TCLDIR)\bin;$(PATH)\r
104         $(DEBUGGER) $(TCLSH) "$(ROOT:\=/)/tests/all.tcl" $(TESTFLAGS)\r
105 !else\r
106         @set PATH=$(_TCLDIR)\win\$(BUILDDIRTOP);$(PATH)\r
107         $(DEBUGGER) $(TCLSH) "$(ROOT:\=/)/tests/all.tcl" $(TESTFLAGS) \\r
108                 -load "package ifneeded tdbc::postgres $(DOTVERSION) \\r
109                         {source {$(LIBDIR:\=/)/tdbcpostgres.tcl};load {$(PRJLIB:\=/)} $(PROJECT)};\\r
110                 package ifneeded tdbc $(TDBC_DOTVERSION) \\r
111                         {source {$(TDBC_BIN_DIR:\=/)/tdbc.tcl};load {$(TDBC_BIN_DIR:\=/)/$(TDBC_LIB_FILE)} tdbc}"\r
112 !endif\r
113 \r