Fossil SCM
Add deploy (only) target, better directory definition and creation.
Commit
6095d54ee746bfb4fdcda80bce21d94ab93c397c09019fe90675130f3b64713b
Parent
06c74be78b9e0a9…
2 files changed
+14
-11
+13
-10
+14
-11
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -1462,15 +1462,15 @@ | ||
| 1462 | 1462 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 1463 | 1463 | # to regenerate this file. |
| 1464 | 1464 | # |
| 1465 | 1465 | B = .. |
| 1466 | 1466 | 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) | |
| 1471 | 1470 | !endif |
| 1471 | +T = $(BUILDDIR) | |
| 1472 | 1472 | OBJDIR = $(T) |
| 1473 | 1473 | OX = $(OBJDIR) |
| 1474 | 1474 | O = .obj |
| 1475 | 1475 | E = .exe |
| 1476 | 1476 | P = .pdb |
| @@ -1490,10 +1490,14 @@ | ||
| 1490 | 1490 | # NOTE: Make sure B path has no trailing backslash, UNIX-style path is OK too. |
| 1491 | 1491 | # |
| 1492 | 1492 | !if !exist("$(B)\.fossil-settings") |
| 1493 | 1493 | !error Please specify path to project base directory: B="path/to/fossil" |
| 1494 | 1494 | !endif |
| 1495 | + | |
| 1496 | +# Create build directory during preprocessing if needed. | |
| 1497 | +!if [if not exist $(BUILDDIR)\. ( echo Creating $(BUILDDIR) && mkdir $(BUILDDIR) )] | |
| 1498 | +!endif | |
| 1495 | 1499 | |
| 1496 | 1500 | # Perl is only necessary if OpenSSL support is enabled and it is built from |
| 1497 | 1501 | # source code. The PERLDIR environment variable, if it exists, should point |
| 1498 | 1502 | # to the directory containing the main Perl executable specified here (i.e. |
| 1499 | 1503 | # "perl.exe"). |
| @@ -1567,15 +1571,10 @@ | ||
| 1567 | 1571 | # Enable support for the SQLite Encryption Extension? |
| 1568 | 1572 | !ifndef USE_SEE |
| 1569 | 1573 | USE_SEE = 0 |
| 1570 | 1574 | !endif |
| 1571 | 1575 | |
| 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 | 1576 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 1578 | 1577 | SSLDIR = $(B)\compat\openssl |
| 1579 | 1578 | SSLINCDIR = $(SSLDIR)\include |
| 1580 | 1579 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 1581 | 1580 | SSLLIBDIR = $(SSLDIR) |
| @@ -1814,11 +1813,15 @@ | ||
| 1814 | 1813 | |
| 1815 | 1814 | $(BASEAPPNAME): "$(APPNAME)" |
| 1816 | 1815 | |
| 1817 | 1816 | $(BASEAPPNAME)$(E): "$(APPNAME)" |
| 1818 | 1817 | |
| 1819 | -install: "$(APPNAME)" | |
| 1818 | +# Install with version rebuild. | |
| 1819 | +install: "$(APPNAME)" deploy | |
| 1820 | + | |
| 1821 | +# Just deploy final build result. | |
| 1822 | +deploy: | |
| 1820 | 1823 | echo F | xcopy /Y "$(APPNAME)" "$(INSTALLDIR)" |
| 1821 | 1824 | !if $(DEBUG)!=0 |
| 1822 | 1825 | echo F | xcopy /Y "$(PDBNAME)" "$(INSTALLDIR)" |
| 1823 | 1826 | !endif |
| 1824 | 1827 | |
| @@ -2023,11 +2026,11 @@ | ||
| 2023 | 2026 | writeln "" |
| 2024 | 2027 | writeln "{\$(SRCDIR)\\}.c{\$(OX)\\}.c:" |
| 2025 | 2028 | writeln "\t\"\$(OBJDIR)\\translate\$E\" \$** > \$@\n" |
| 2026 | 2029 | |
| 2027 | 2030 | writeln "{\$(OX)}.c{\$(OX)}.h :" |
| 2028 | -writeln "\t\"\$(OBJDIR)\\makeheaders\$E\" \$**:$@" | |
| 2031 | +writeln "\t\"\$(OBJDIR)\\makeheaders\$E\" \$**:\$@" | |
| 2029 | 2032 | |
| 2030 | 2033 | writeln "" |
| 2031 | 2034 | foreach s [lsort $src] { |
| 2032 | 2035 | writeln "\"\$(OX)\\$s\$O\" : \"\$(OX)\\${s}.c\" \"\$(OX)\\${s}.h\"" |
| 2033 | 2036 | writeln "\t\$(TCC) /Fo\$@ /Fd\$(@D)\\ -c \"\$(OX)\\${s}.c\"\n" |
| 2034 | 2037 |
| --- 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 @@ | ||
| 8 | 8 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 9 | 9 | # to regenerate this file. |
| 10 | 10 | # |
| 11 | 11 | B = .. |
| 12 | 12 | 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) | |
| 17 | 16 | !endif |
| 17 | +T = $(BUILDDIR) | |
| 18 | 18 | OBJDIR = $(T) |
| 19 | 19 | OX = $(OBJDIR) |
| 20 | 20 | O = .obj |
| 21 | 21 | E = .exe |
| 22 | 22 | P = .pdb |
| @@ -36,10 +36,14 @@ | ||
| 36 | 36 | # NOTE: Make sure B path has no trailing backslash, UNIX-style path is OK too. |
| 37 | 37 | # |
| 38 | 38 | !if !exist("$(B)\.fossil-settings") |
| 39 | 39 | !error Please specify path to project base directory: B="path/to/fossil" |
| 40 | 40 | !endif |
| 41 | + | |
| 42 | +# Create build directory during preprocessing if needed. | |
| 43 | +!if [if not exist $(BUILDDIR)\. ( echo Creating $(BUILDDIR) && mkdir $(BUILDDIR) )] | |
| 44 | +!endif | |
| 41 | 45 | |
| 42 | 46 | # Perl is only necessary if OpenSSL support is enabled and it is built from |
| 43 | 47 | # source code. The PERLDIR environment variable, if it exists, should point |
| 44 | 48 | # to the directory containing the main Perl executable specified here (i.e. |
| 45 | 49 | # "perl.exe"). |
| @@ -113,15 +117,10 @@ | ||
| 113 | 117 | # Enable support for the SQLite Encryption Extension? |
| 114 | 118 | !ifndef USE_SEE |
| 115 | 119 | USE_SEE = 0 |
| 116 | 120 | !endif |
| 117 | 121 | |
| 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 | 122 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 124 | 123 | SSLDIR = $(B)\compat\openssl |
| 125 | 124 | SSLINCDIR = $(SSLDIR)\include |
| 126 | 125 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 127 | 126 | SSLLIBDIR = $(SSLDIR) |
| @@ -788,11 +787,15 @@ | ||
| 788 | 787 | |
| 789 | 788 | $(BASEAPPNAME): "$(APPNAME)" |
| 790 | 789 | |
| 791 | 790 | $(BASEAPPNAME)$(E): "$(APPNAME)" |
| 792 | 791 | |
| 793 | -install: "$(APPNAME)" | |
| 792 | +# Install with version rebuild. | |
| 793 | +install: "$(APPNAME)" deploy | |
| 794 | + | |
| 795 | +# Just deploy final build result. | |
| 796 | +deploy: | |
| 794 | 797 | echo F | xcopy /Y "$(APPNAME)" "$(INSTALLDIR)" |
| 795 | 798 | !if $(DEBUG)!=0 |
| 796 | 799 | echo F | xcopy /Y "$(PDBNAME)" "$(INSTALLDIR)" |
| 797 | 800 | !endif |
| 798 | 801 | |
| 799 | 802 |
| --- 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 |