Fossil SCM

Add deploy (only) target, better directory definition and creation.

Larry 2021-02-13 20:43 msvc_make_fixup
Commit 6095d54ee746bfb4fdcda80bce21d94ab93c397c09019fe90675130f3b64713b
2 files changed +14 -11 +13 -10
+14 -11
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -1462,15 +1462,15 @@
14621462
# file, edit "makemake.tcl" then run "tclsh makemake.tcl"
14631463
# to regenerate this file.
14641464
#
14651465
B = ..
14661466
SRCDIR = $(B)\src
1467
-!ifndef BUILDDIR
1468
-T = .
1469
-!else
1470
-T = $(BUILDDIR)
1467
+!if !defined(BUILDDIR) || "$(BUILDDIR)"==""
1468
+BUILDDIR = Build
1469
+!message Using default build directory, $(BUILDDIR)
14711470
!endif
1471
+T = $(BUILDDIR)
14721472
OBJDIR = $(T)
14731473
OX = $(OBJDIR)
14741474
O = .obj
14751475
E = .exe
14761476
P = .pdb
@@ -1490,10 +1490,14 @@
14901490
# NOTE: Make sure B path has no trailing backslash, UNIX-style path is OK too.
14911491
#
14921492
!if !exist("$(B)\.fossil-settings")
14931493
!error Please specify path to project base directory: B="path/to/fossil"
14941494
!endif
1495
+
1496
+# Create build directory during preprocessing if needed.
1497
+!if [if not exist $(BUILDDIR)\. ( echo Creating $(BUILDDIR) && mkdir $(BUILDDIR) )]
1498
+!endif
14951499
14961500
# Perl is only necessary if OpenSSL support is enabled and it is built from
14971501
# source code. The PERLDIR environment variable, if it exists, should point
14981502
# to the directory containing the main Perl executable specified here (i.e.
14991503
# "perl.exe").
@@ -1567,15 +1571,10 @@
15671571
# Enable support for the SQLite Encryption Extension?
15681572
!ifndef USE_SEE
15691573
USE_SEE = 0
15701574
!endif
15711575
1572
-# Make sure build is not about to clobber sources (or worse.)
1573
-!if "$(OBJDIR)"=="$(SRCDIR)" || "$(OX)"=="$(SRCDIR)"
1574
-!error Please choose staging and object directories other than "$(SRCDIR)".
1575
-!endif
1576
-
15771576
!if $(FOSSIL_ENABLE_SSL)!=0
15781577
SSLDIR = $(B)\compat\openssl
15791578
SSLINCDIR = $(SSLDIR)\include
15801579
!if $(FOSSIL_DYNAMIC_BUILD)!=0
15811580
SSLLIBDIR = $(SSLDIR)
@@ -1814,11 +1813,15 @@
18141813
18151814
$(BASEAPPNAME): "$(APPNAME)"
18161815
18171816
$(BASEAPPNAME)$(E): "$(APPNAME)"
18181817
1819
-install: "$(APPNAME)"
1818
+# Install with version rebuild.
1819
+install: "$(APPNAME)" deploy
1820
+
1821
+# Just deploy final build result.
1822
+deploy:
18201823
echo F | xcopy /Y "$(APPNAME)" "$(INSTALLDIR)"
18211824
!if $(DEBUG)!=0
18221825
echo F | xcopy /Y "$(PDBNAME)" "$(INSTALLDIR)"
18231826
!endif
18241827
@@ -2023,11 +2026,11 @@
20232026
writeln ""
20242027
writeln "{\$(SRCDIR)\\}.c{\$(OX)\\}.c:"
20252028
writeln "\t\"\$(OBJDIR)\\translate\$E\" \$** > \$@\n"
20262029
20272030
writeln "{\$(OX)}.c{\$(OX)}.h :"
2028
-writeln "\t\"\$(OBJDIR)\\makeheaders\$E\" \$**:$@"
2031
+writeln "\t\"\$(OBJDIR)\\makeheaders\$E\" \$**:\$@"
20292032
20302033
writeln ""
20312034
foreach s [lsort $src] {
20322035
writeln "\"\$(OX)\\$s\$O\" : \"\$(OX)\\${s}.c\" \"\$(OX)\\${s}.h\""
20332036
writeln "\t\$(TCC) /Fo\$@ /Fd\$(@D)\\ -c \"\$(OX)\\${s}.c\"\n"
20342037
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -1462,15 +1462,15 @@
1462 # file, edit "makemake.tcl" then run "tclsh makemake.tcl"
1463 # to regenerate this file.
1464 #
1465 B = ..
1466 SRCDIR = $(B)\src
1467 !ifndef BUILDDIR
1468 T = .
1469 !else
1470 T = $(BUILDDIR)
1471 !endif
 
1472 OBJDIR = $(T)
1473 OX = $(OBJDIR)
1474 O = .obj
1475 E = .exe
1476 P = .pdb
@@ -1490,10 +1490,14 @@
1490 # NOTE: Make sure B path has no trailing backslash, UNIX-style path is OK too.
1491 #
1492 !if !exist("$(B)\.fossil-settings")
1493 !error Please specify path to project base directory: B="path/to/fossil"
1494 !endif
 
 
 
 
1495
1496 # Perl is only necessary if OpenSSL support is enabled and it is built from
1497 # source code. The PERLDIR environment variable, if it exists, should point
1498 # to the directory containing the main Perl executable specified here (i.e.
1499 # "perl.exe").
@@ -1567,15 +1571,10 @@
1567 # Enable support for the SQLite Encryption Extension?
1568 !ifndef USE_SEE
1569 USE_SEE = 0
1570 !endif
1571
1572 # Make sure build is not about to clobber sources (or worse.)
1573 !if "$(OBJDIR)"=="$(SRCDIR)" || "$(OX)"=="$(SRCDIR)"
1574 !error Please choose staging and object directories other than "$(SRCDIR)".
1575 !endif
1576
1577 !if $(FOSSIL_ENABLE_SSL)!=0
1578 SSLDIR = $(B)\compat\openssl
1579 SSLINCDIR = $(SSLDIR)\include
1580 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1581 SSLLIBDIR = $(SSLDIR)
@@ -1814,11 +1813,15 @@
1814
1815 $(BASEAPPNAME): "$(APPNAME)"
1816
1817 $(BASEAPPNAME)$(E): "$(APPNAME)"
1818
1819 install: "$(APPNAME)"
 
 
 
 
1820 echo F | xcopy /Y "$(APPNAME)" "$(INSTALLDIR)"
1821 !if $(DEBUG)!=0
1822 echo F | xcopy /Y "$(PDBNAME)" "$(INSTALLDIR)"
1823 !endif
1824
@@ -2023,11 +2026,11 @@
2023 writeln ""
2024 writeln "{\$(SRCDIR)\\}.c{\$(OX)\\}.c:"
2025 writeln "\t\"\$(OBJDIR)\\translate\$E\" \$** > \$@\n"
2026
2027 writeln "{\$(OX)}.c{\$(OX)}.h :"
2028 writeln "\t\"\$(OBJDIR)\\makeheaders\$E\" \$**:$@"
2029
2030 writeln ""
2031 foreach s [lsort $src] {
2032 writeln "\"\$(OX)\\$s\$O\" : \"\$(OX)\\${s}.c\" \"\$(OX)\\${s}.h\""
2033 writeln "\t\$(TCC) /Fo\$@ /Fd\$(@D)\\ -c \"\$(OX)\\${s}.c\"\n"
2034
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -1462,15 +1462,15 @@
1462 # file, edit "makemake.tcl" then run "tclsh makemake.tcl"
1463 # to regenerate this file.
1464 #
1465 B = ..
1466 SRCDIR = $(B)\src
1467 !if !defined(BUILDDIR) || "$(BUILDDIR)"==""
1468 BUILDDIR = Build
1469 !message Using default build directory, $(BUILDDIR)
 
1470 !endif
1471 T = $(BUILDDIR)
1472 OBJDIR = $(T)
1473 OX = $(OBJDIR)
1474 O = .obj
1475 E = .exe
1476 P = .pdb
@@ -1490,10 +1490,14 @@
1490 # NOTE: Make sure B path has no trailing backslash, UNIX-style path is OK too.
1491 #
1492 !if !exist("$(B)\.fossil-settings")
1493 !error Please specify path to project base directory: B="path/to/fossil"
1494 !endif
1495
1496 # Create build directory during preprocessing if needed.
1497 !if [if not exist $(BUILDDIR)\. ( echo Creating $(BUILDDIR) && mkdir $(BUILDDIR) )]
1498 !endif
1499
1500 # Perl is only necessary if OpenSSL support is enabled and it is built from
1501 # source code. The PERLDIR environment variable, if it exists, should point
1502 # to the directory containing the main Perl executable specified here (i.e.
1503 # "perl.exe").
@@ -1567,15 +1571,10 @@
1571 # Enable support for the SQLite Encryption Extension?
1572 !ifndef USE_SEE
1573 USE_SEE = 0
1574 !endif
1575
 
 
 
 
 
1576 !if $(FOSSIL_ENABLE_SSL)!=0
1577 SSLDIR = $(B)\compat\openssl
1578 SSLINCDIR = $(SSLDIR)\include
1579 !if $(FOSSIL_DYNAMIC_BUILD)!=0
1580 SSLLIBDIR = $(SSLDIR)
@@ -1814,11 +1813,15 @@
1813
1814 $(BASEAPPNAME): "$(APPNAME)"
1815
1816 $(BASEAPPNAME)$(E): "$(APPNAME)"
1817
1818 # Install with version rebuild.
1819 install: "$(APPNAME)" deploy
1820
1821 # Just deploy final build result.
1822 deploy:
1823 echo F | xcopy /Y "$(APPNAME)" "$(INSTALLDIR)"
1824 !if $(DEBUG)!=0
1825 echo F | xcopy /Y "$(PDBNAME)" "$(INSTALLDIR)"
1826 !endif
1827
@@ -2023,11 +2026,11 @@
2026 writeln ""
2027 writeln "{\$(SRCDIR)\\}.c{\$(OX)\\}.c:"
2028 writeln "\t\"\$(OBJDIR)\\translate\$E\" \$** > \$@\n"
2029
2030 writeln "{\$(OX)}.c{\$(OX)}.h :"
2031 writeln "\t\"\$(OBJDIR)\\makeheaders\$E\" \$**:\$@"
2032
2033 writeln ""
2034 foreach s [lsort $src] {
2035 writeln "\"\$(OX)\\$s\$O\" : \"\$(OX)\\${s}.c\" \"\$(OX)\\${s}.h\""
2036 writeln "\t\$(TCC) /Fo\$@ /Fd\$(@D)\\ -c \"\$(OX)\\${s}.c\"\n"
2037
+13 -10
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -8,15 +8,15 @@
88
# file, edit "makemake.tcl" then run "tclsh makemake.tcl"
99
# to regenerate this file.
1010
#
1111
B = ..
1212
SRCDIR = $(B)\src
13
-!ifndef BUILDDIR
14
-T = .
15
-!else
16
-T = $(BUILDDIR)
13
+!if !defined(BUILDDIR) || "$(BUILDDIR)"==""
14
+BUILDDIR = Build
15
+!message Using default build directory, $(BUILDDIR)
1716
!endif
17
+T = $(BUILDDIR)
1818
OBJDIR = $(T)
1919
OX = $(OBJDIR)
2020
O = .obj
2121
E = .exe
2222
P = .pdb
@@ -36,10 +36,14 @@
3636
# NOTE: Make sure B path has no trailing backslash, UNIX-style path is OK too.
3737
#
3838
!if !exist("$(B)\.fossil-settings")
3939
!error Please specify path to project base directory: B="path/to/fossil"
4040
!endif
41
+
42
+# Create build directory during preprocessing if needed.
43
+!if [if not exist $(BUILDDIR)\. ( echo Creating $(BUILDDIR) && mkdir $(BUILDDIR) )]
44
+!endif
4145
4246
# Perl is only necessary if OpenSSL support is enabled and it is built from
4347
# source code. The PERLDIR environment variable, if it exists, should point
4448
# to the directory containing the main Perl executable specified here (i.e.
4549
# "perl.exe").
@@ -113,15 +117,10 @@
113117
# Enable support for the SQLite Encryption Extension?
114118
!ifndef USE_SEE
115119
USE_SEE = 0
116120
!endif
117121
118
-# Make sure build is not about to clobber sources (or worse.)
119
-!if "$(OBJDIR)"=="$(SRCDIR)" || "$(OX)"=="$(SRCDIR)"
120
-!error Please choose staging and object directories other than "$(SRCDIR)".
121
-!endif
122
-
123122
!if $(FOSSIL_ENABLE_SSL)!=0
124123
SSLDIR = $(B)\compat\openssl
125124
SSLINCDIR = $(SSLDIR)\include
126125
!if $(FOSSIL_DYNAMIC_BUILD)!=0
127126
SSLLIBDIR = $(SSLDIR)
@@ -788,11 +787,15 @@
788787
789788
$(BASEAPPNAME): "$(APPNAME)"
790789
791790
$(BASEAPPNAME)$(E): "$(APPNAME)"
792791
793
-install: "$(APPNAME)"
792
+# Install with version rebuild.
793
+install: "$(APPNAME)" deploy
794
+
795
+# Just deploy final build result.
796
+deploy:
794797
echo F | xcopy /Y "$(APPNAME)" "$(INSTALLDIR)"
795798
!if $(DEBUG)!=0
796799
echo F | xcopy /Y "$(PDBNAME)" "$(INSTALLDIR)"
797800
!endif
798801
799802
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -8,15 +8,15 @@
8 # file, edit "makemake.tcl" then run "tclsh makemake.tcl"
9 # to regenerate this file.
10 #
11 B = ..
12 SRCDIR = $(B)\src
13 !ifndef BUILDDIR
14 T = .
15 !else
16 T = $(BUILDDIR)
17 !endif
 
18 OBJDIR = $(T)
19 OX = $(OBJDIR)
20 O = .obj
21 E = .exe
22 P = .pdb
@@ -36,10 +36,14 @@
36 # NOTE: Make sure B path has no trailing backslash, UNIX-style path is OK too.
37 #
38 !if !exist("$(B)\.fossil-settings")
39 !error Please specify path to project base directory: B="path/to/fossil"
40 !endif
 
 
 
 
41
42 # Perl is only necessary if OpenSSL support is enabled and it is built from
43 # source code. The PERLDIR environment variable, if it exists, should point
44 # to the directory containing the main Perl executable specified here (i.e.
45 # "perl.exe").
@@ -113,15 +117,10 @@
113 # Enable support for the SQLite Encryption Extension?
114 !ifndef USE_SEE
115 USE_SEE = 0
116 !endif
117
118 # Make sure build is not about to clobber sources (or worse.)
119 !if "$(OBJDIR)"=="$(SRCDIR)" || "$(OX)"=="$(SRCDIR)"
120 !error Please choose staging and object directories other than "$(SRCDIR)".
121 !endif
122
123 !if $(FOSSIL_ENABLE_SSL)!=0
124 SSLDIR = $(B)\compat\openssl
125 SSLINCDIR = $(SSLDIR)\include
126 !if $(FOSSIL_DYNAMIC_BUILD)!=0
127 SSLLIBDIR = $(SSLDIR)
@@ -788,11 +787,15 @@
788
789 $(BASEAPPNAME): "$(APPNAME)"
790
791 $(BASEAPPNAME)$(E): "$(APPNAME)"
792
793 install: "$(APPNAME)"
 
 
 
 
794 echo F | xcopy /Y "$(APPNAME)" "$(INSTALLDIR)"
795 !if $(DEBUG)!=0
796 echo F | xcopy /Y "$(PDBNAME)" "$(INSTALLDIR)"
797 !endif
798
799
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -8,15 +8,15 @@
8 # file, edit "makemake.tcl" then run "tclsh makemake.tcl"
9 # to regenerate this file.
10 #
11 B = ..
12 SRCDIR = $(B)\src
13 !if !defined(BUILDDIR) || "$(BUILDDIR)"==""
14 BUILDDIR = Build
15 !message Using default build directory, $(BUILDDIR)
 
16 !endif
17 T = $(BUILDDIR)
18 OBJDIR = $(T)
19 OX = $(OBJDIR)
20 O = .obj
21 E = .exe
22 P = .pdb
@@ -36,10 +36,14 @@
36 # NOTE: Make sure B path has no trailing backslash, UNIX-style path is OK too.
37 #
38 !if !exist("$(B)\.fossil-settings")
39 !error Please specify path to project base directory: B="path/to/fossil"
40 !endif
41
42 # Create build directory during preprocessing if needed.
43 !if [if not exist $(BUILDDIR)\. ( echo Creating $(BUILDDIR) && mkdir $(BUILDDIR) )]
44 !endif
45
46 # Perl is only necessary if OpenSSL support is enabled and it is built from
47 # source code. The PERLDIR environment variable, if it exists, should point
48 # to the directory containing the main Perl executable specified here (i.e.
49 # "perl.exe").
@@ -113,15 +117,10 @@
117 # Enable support for the SQLite Encryption Extension?
118 !ifndef USE_SEE
119 USE_SEE = 0
120 !endif
121
 
 
 
 
 
122 !if $(FOSSIL_ENABLE_SSL)!=0
123 SSLDIR = $(B)\compat\openssl
124 SSLINCDIR = $(SSLDIR)\include
125 !if $(FOSSIL_DYNAMIC_BUILD)!=0
126 SSLLIBDIR = $(SSLDIR)
@@ -788,11 +787,15 @@
787
788 $(BASEAPPNAME): "$(APPNAME)"
789
790 $(BASEAPPNAME)$(E): "$(APPNAME)"
791
792 # Install with version rebuild.
793 install: "$(APPNAME)" deploy
794
795 # Just deploy final build result.
796 deploy:
797 echo F | xcopy /Y "$(APPNAME)" "$(INSTALLDIR)"
798 !if $(DEBUG)!=0
799 echo F | xcopy /Y "$(PDBNAME)" "$(INSTALLDIR)"
800 !endif
801
802

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button