Fossil SCM
merge trunk
Commit
46e1d4c812e2fefb17bc8c2a892070cc59f4d208
Parent
e5fef7982deff6b…
12 files changed
+52
+1
+31
-33
+29
-8
+16
-2
+72
-43
+2
-2
+5
-3
+22
-5
+22
-5
+20
-3
+9
-5
+52
| --- a/Makefile.Cygwin.in | ||
| +++ b/Makefile.Cygwin.in | ||
| @@ -0,0 +1,52 @@ | ||
| 1 | +#!/usr/bin/make | |
| 2 | +# | |
| 3 | +# This is the top-level makefile for Fossil when the build is occurring | |
| 4 | +# on the Cygwin platform. | |
| 5 | +# | |
| 6 | +#### The toplevel directory of the source tree. Fossil can be built | |
| 7 | +# in a directory that is separate from the source tree. Just change | |
| 8 | +# the following to point from the build directory to the src/ folder. | |
| 9 | +# | |
| 10 | +SRCDIR = @srcdir@/src | |
| 11 | + | |
| 12 | +#### The directory into which object code files should be written. | |
| 13 | +# Having a "./" prefix in the value of this variable breaks our use of the | |
| 14 | +# "makeheaders" tool when running make on the MinGW platform, apparently | |
| 15 | +# due to some command line argument manipulation performed automatically | |
| 16 | +# by the shell. | |
| 17 | +# | |
| 18 | +# | |
| 19 | +OBJDIR = bld | |
| 20 | + | |
| 21 | +#### C Compiler and options for use in building executables that | |
| 22 | +# will run on the platform that is doing the build. This is used | |
| 23 | +# to compile code-generator programs as part of the build process. | |
| 24 | +# See TCC below for the C compiler for building the finished binary. | |
| 25 | +# | |
| 26 | +BCC = @CC_FOR_BUILD@ | |
| 27 | + | |
| 28 | +#### The suffix to add to final executable file. When cross-compiling | |
| 29 | +# to windows, make this ".exe". Otherwise leave it blank. | |
| 30 | +# | |
| 31 | +E = @EXEEXT@ | |
| 32 | + | |
| 33 | +TCC = @CC@ | |
| 34 | + | |
| 35 | +#### Tcl shell for use in running the fossil testsuite. If you do not | |
| 36 | +# care about testing the end result, this can be blank. | |
| 37 | +# | |
| 38 | +TCLSH = tclsh | |
| 39 | + | |
| 40 | +LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ | |
| 41 | +TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @ | |
| 42 | +INSTALLDIR =$(DESTDIR)@prefix@/bin | |
| 43 | +USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ | |
| 44 | +FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@ | |
| 45 | +FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@ | |
| 46 | +FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@ | |
| 47 | +SQLITE_CFLAG -DSQLITE_WINNT_MAX_PATH_CHARS=4096BYTES=4096 | |
| 48 | +SQLITE_CFLAGS +=TE_MAX_MMAP_SIZE=0x7fff0000 | |
| 49 | + | |
| 50 | +include $(SRCDIR)/main.mk | |
| 51 | + | |
| 52 | +dis |
| --- a/Makefile.Cygwin.in | |
| +++ b/Makefile.Cygwin.in | |
| @@ -0,0 +1,52 @@ | |
| --- a/Makefile.Cygwin.in | |
| +++ b/Makefile.Cygwin.in | |
| @@ -0,0 +1,52 @@ | |
| 1 | #!/usr/bin/make |
| 2 | # |
| 3 | # This is the top-level makefile for Fossil when the build is occurring |
| 4 | # on the Cygwin platform. |
| 5 | # |
| 6 | #### The toplevel directory of the source tree. Fossil can be built |
| 7 | # in a directory that is separate from the source tree. Just change |
| 8 | # the following to point from the build directory to the src/ folder. |
| 9 | # |
| 10 | SRCDIR = @srcdir@/src |
| 11 | |
| 12 | #### The directory into which object code files should be written. |
| 13 | # Having a "./" prefix in the value of this variable breaks our use of the |
| 14 | # "makeheaders" tool when running make on the MinGW platform, apparently |
| 15 | # due to some command line argument manipulation performed automatically |
| 16 | # by the shell. |
| 17 | # |
| 18 | # |
| 19 | OBJDIR = bld |
| 20 | |
| 21 | #### C Compiler and options for use in building executables that |
| 22 | # will run on the platform that is doing the build. This is used |
| 23 | # to compile code-generator programs as part of the build process. |
| 24 | # See TCC below for the C compiler for building the finished binary. |
| 25 | # |
| 26 | BCC = @CC_FOR_BUILD@ |
| 27 | |
| 28 | #### The suffix to add to final executable file. When cross-compiling |
| 29 | # to windows, make this ".exe". Otherwise leave it blank. |
| 30 | # |
| 31 | E = @EXEEXT@ |
| 32 | |
| 33 | TCC = @CC@ |
| 34 | |
| 35 | #### Tcl shell for use in running the fossil testsuite. If you do not |
| 36 | # care about testing the end result, this can be blank. |
| 37 | # |
| 38 | TCLSH = tclsh |
| 39 | |
| 40 | LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ |
| 41 | TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @ |
| 42 | INSTALLDIR =$(DESTDIR)@prefix@/bin |
| 43 | USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ |
| 44 | FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@ |
| 45 | FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@ |
| 46 | FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@ |
| 47 | SQLITE_CFLAG -DSQLITE_WINNT_MAX_PATH_CHARS=4096BYTES=4096 |
| 48 | SQLITE_CFLAGS +=TE_MAX_MMAP_SIZE=0x7fff0000 |
| 49 | |
| 50 | include $(SRCDIR)/main.mk |
| 51 | |
| 52 | dis |
M
auto.def
+1
| --- auto.def | ||
| +++ auto.def | ||
| @@ -257,6 +257,7 @@ | ||
| 257 | 257 | cc-check-function-in-lib getpass bsd |
| 258 | 258 | } |
| 259 | 259 | cc-check-function-in-lib dlopen dl |
| 260 | 260 | |
| 261 | 261 | make-template Makefile.in |
| 262 | +make-template Makefile.Cygwin.in | |
| 262 | 263 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 263 | 264 |
| --- auto.def | |
| +++ auto.def | |
| @@ -257,6 +257,7 @@ | |
| 257 | cc-check-function-in-lib getpass bsd |
| 258 | } |
| 259 | cc-check-function-in-lib dlopen dl |
| 260 | |
| 261 | make-template Makefile.in |
| 262 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 263 |
| --- auto.def | |
| +++ auto.def | |
| @@ -257,6 +257,7 @@ | |
| 257 | cc-check-function-in-lib getpass bsd |
| 258 | } |
| 259 | cc-check-function-in-lib dlopen dl |
| 260 | |
| 261 | make-template Makefile.in |
| 262 | make-template Makefile.Cygwin.in |
| 263 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 264 |
+31
-33
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -329,40 +329,39 @@ | ||
| 329 | 329 | HANDLE hToken = NULL; |
| 330 | 330 | DWORD desiredAccess = 0, grantedAccess = 0; |
| 331 | 331 | BOOL accessYesNo = FALSE; |
| 332 | 332 | PRIVILEGE_SET privSet; |
| 333 | 333 | DWORD privSetSize = sizeof(PRIVILEGE_SET); |
| 334 | - int error, rc = 0; | |
| 334 | + int rc = 0; | |
| 335 | 335 | DWORD attr; |
| 336 | 336 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 337 | 337 | |
| 338 | 338 | attr = GetFileAttributesW(zMbcs); |
| 339 | 339 | |
| 340 | - if (attr == INVALID_FILE_ATTRIBUTES) { | |
| 340 | + if( attr==INVALID_FILE_ATTRIBUTES ){ | |
| 341 | 341 | /* |
| 342 | 342 | * File might not exist. |
| 343 | 343 | */ |
| 344 | 344 | |
| 345 | - DWORD lasterror = GetLastError(); | |
| 346 | - if (lasterror != ERROR_SHARING_VIOLATION) { | |
| 345 | + if( GetLastError()!=ERROR_SHARING_VIOLATION ){ | |
| 347 | 346 | fossil_filename_free(zMbcs); |
| 348 | 347 | return -1; |
| 349 | 348 | } |
| 350 | 349 | } |
| 351 | 350 | |
| 352 | - if (flags == F_OK) { | |
| 351 | + if( flags==F_OK ){ | |
| 353 | 352 | /* |
| 354 | 353 | * File exists, nothing else to check. |
| 355 | 354 | */ |
| 356 | 355 | |
| 357 | 356 | fossil_filename_free(zMbcs); |
| 358 | 357 | return 0; |
| 359 | 358 | } |
| 360 | 359 | |
| 361 | - if ((flags & W_OK) | |
| 360 | + if( (flags & W_OK) | |
| 362 | 361 | && (attr & FILE_ATTRIBUTE_READONLY) |
| 363 | - && !(attr & FILE_ATTRIBUTE_DIRECTORY)) { | |
| 362 | + && !(attr & FILE_ATTRIBUTE_DIRECTORY) ){ | |
| 364 | 363 | /* |
| 365 | 364 | * The attributes say the file is not writable. If the file is a |
| 366 | 365 | * regular file (i.e., not a directory), then the file is not |
| 367 | 366 | * writable, full stop. For directories, the read-only bit is |
| 368 | 367 | * (mostly) ignored by Windows, so we can't ascertain anything about |
| @@ -394,12 +393,11 @@ | ||
| 394 | 393 | |
| 395 | 394 | /* |
| 396 | 395 | * Should have failed with ERROR_INSUFFICIENT_BUFFER |
| 397 | 396 | */ |
| 398 | 397 | |
| 399 | - error = GetLastError(); | |
| 400 | - if (error != ERROR_INSUFFICIENT_BUFFER) { | |
| 398 | + if( GetLastError()!=ERROR_INSUFFICIENT_BUFFER ){ | |
| 401 | 399 | /* |
| 402 | 400 | * Most likely case is ERROR_ACCESS_DENIED, which we will convert |
| 403 | 401 | * to EACCES - just what we want! |
| 404 | 402 | */ |
| 405 | 403 | |
| @@ -411,27 +409,27 @@ | ||
| 411 | 409 | * Now size contains the size of buffer needed. |
| 412 | 410 | */ |
| 413 | 411 | |
| 414 | 412 | sdPtr = (SECURITY_DESCRIPTOR *) HeapAlloc(GetProcessHeap(), 0, size); |
| 415 | 413 | |
| 416 | - if (sdPtr == NULL) { | |
| 417 | - goto accessError; | |
| 414 | + if( sdPtr == NULL ){ | |
| 415 | + goto accessError; | |
| 418 | 416 | } |
| 419 | 417 | |
| 420 | 418 | /* |
| 421 | 419 | * Call GetFileSecurity() for real. |
| 422 | 420 | */ |
| 423 | 421 | |
| 424 | - if (!GetFileSecurityW(zMbcs, | |
| 422 | + if( !GetFileSecurityW(zMbcs, | |
| 425 | 423 | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
| 426 | 424 | | DACL_SECURITY_INFORMATION | LABEL_SECURITY_INFORMATION, |
| 427 | - sdPtr, size, &size)) { | |
| 428 | - /* | |
| 429 | - * Error getting owner SD | |
| 430 | - */ | |
| 425 | + sdPtr, size, &size) ){ | |
| 426 | + /* | |
| 427 | + * Error getting owner SD | |
| 428 | + */ | |
| 431 | 429 | |
| 432 | - goto accessError; | |
| 430 | + goto accessError; | |
| 433 | 431 | } |
| 434 | 432 | |
| 435 | 433 | /* |
| 436 | 434 | * As of Samba 3.0.23 (10-Jul-2006), unmapped users and groups are |
| 437 | 435 | * assigned to SID domains S-1-22-1 and S-1-22-2, where "22" is the |
| @@ -443,13 +441,13 @@ | ||
| 443 | 441 | * usually mapped to the Windows attributes, so if the user is the |
| 444 | 442 | * file owner then the attrib checks above are correct (as far as they |
| 445 | 443 | * go). |
| 446 | 444 | */ |
| 447 | 445 | |
| 448 | - if(!GetSecurityDescriptorOwner(sdPtr,&pSid,&SidDefaulted) || | |
| 446 | + if( !GetSecurityDescriptorOwner(sdPtr,&pSid,&SidDefaulted) || | |
| 449 | 447 | memcmp(GetSidIdentifierAuthority(pSid),&samba_unmapped, |
| 450 | - sizeof(SID_IDENTIFIER_AUTHORITY))==0) { | |
| 448 | + sizeof(SID_IDENTIFIER_AUTHORITY))==0 ){ | |
| 451 | 449 | HeapFree(GetProcessHeap(), 0, sdPtr); |
| 452 | 450 | fossil_filename_free(zMbcs); |
| 453 | 451 | return 0; /* Attrib tests say access allowed. */ |
| 454 | 452 | } |
| 455 | 453 | |
| @@ -456,19 +454,19 @@ | ||
| 456 | 454 | /* |
| 457 | 455 | * Perform security impersonation of the user and open the resulting |
| 458 | 456 | * thread token. |
| 459 | 457 | */ |
| 460 | 458 | |
| 461 | - if (!ImpersonateSelf(SecurityImpersonation)) { | |
| 459 | + if( !ImpersonateSelf(SecurityImpersonation) ){ | |
| 462 | 460 | /* |
| 463 | 461 | * Unable to perform security impersonation. |
| 464 | 462 | */ |
| 465 | 463 | |
| 466 | 464 | goto accessError; |
| 467 | 465 | } |
| 468 | - if (!OpenThreadToken(GetCurrentThread(), | |
| 469 | - TOKEN_DUPLICATE | TOKEN_QUERY, FALSE, &hToken)) { | |
| 466 | + if( !OpenThreadToken(GetCurrentThread(), | |
| 467 | + TOKEN_DUPLICATE | TOKEN_QUERY, FALSE, &hToken) ){ | |
| 470 | 468 | /* |
| 471 | 469 | * Unable to get current thread's token. |
| 472 | 470 | */ |
| 473 | 471 | |
| 474 | 472 | goto accessError; |
| @@ -479,14 +477,14 @@ | ||
| 479 | 477 | /* |
| 480 | 478 | * Setup desiredAccess according to the access priveleges we are |
| 481 | 479 | * checking. |
| 482 | 480 | */ |
| 483 | 481 | |
| 484 | - if (flags & R_OK) { | |
| 482 | + if( flags & R_OK ){ | |
| 485 | 483 | desiredAccess |= FILE_GENERIC_READ; |
| 486 | 484 | } |
| 487 | - if (flags & W_OK) { | |
| 485 | + if( flags & W_OK){ | |
| 488 | 486 | desiredAccess |= FILE_GENERIC_WRITE; |
| 489 | 487 | } |
| 490 | 488 | |
| 491 | 489 | memset(&genMap, 0x0, sizeof(GENERIC_MAPPING)); |
| 492 | 490 | genMap.GenericRead = FILE_GENERIC_READ; |
| @@ -496,22 +494,22 @@ | ||
| 496 | 494 | |
| 497 | 495 | /* |
| 498 | 496 | * Perform access check using the token. |
| 499 | 497 | */ |
| 500 | 498 | |
| 501 | - if (!AccessCheck(sdPtr, hToken, desiredAccess, | |
| 499 | + if( !AccessCheck(sdPtr, hToken, desiredAccess, | |
| 502 | 500 | &genMap, &privSet, &privSetSize, &grantedAccess, |
| 503 | - &accessYesNo)) { | |
| 501 | + &accessYesNo) ){ | |
| 504 | 502 | /* |
| 505 | 503 | * Unable to perform access check. |
| 506 | 504 | */ |
| 507 | 505 | |
| 508 | 506 | accessError: |
| 509 | - if (sdPtr != NULL) { | |
| 507 | + if( sdPtr != NULL ){ | |
| 510 | 508 | HeapFree(GetProcessHeap(), 0, sdPtr); |
| 511 | 509 | } |
| 512 | - if (hToken != NULL) { | |
| 510 | + if( hToken != NULL ){ | |
| 513 | 511 | CloseHandle(hToken); |
| 514 | 512 | } |
| 515 | 513 | fossil_filename_free(zMbcs); |
| 516 | 514 | return -1; |
| 517 | 515 | } |
| @@ -520,13 +518,12 @@ | ||
| 520 | 518 | * Clean up. |
| 521 | 519 | */ |
| 522 | 520 | |
| 523 | 521 | HeapFree(GetProcessHeap(), 0, sdPtr); |
| 524 | 522 | CloseHandle(hToken); |
| 525 | - if (!accessYesNo) { | |
| 526 | - fossil_filename_free(zMbcs); | |
| 527 | - return -1; | |
| 523 | + if( !accessYesNo ){ | |
| 524 | + rc = -1; | |
| 528 | 525 | } |
| 529 | 526 | #else |
| 530 | 527 | char *zMbcs = fossil_utf8_to_filename(zFilename); |
| 531 | 528 | int rc = access(zMbcs, flags); |
| 532 | 529 | #endif |
| @@ -639,15 +636,16 @@ | ||
| 639 | 636 | /* |
| 640 | 637 | ** Set the mtime for a file. |
| 641 | 638 | */ |
| 642 | 639 | void file_set_mtime(const char *zFilename, i64 newMTime){ |
| 643 | 640 | #if !defined(_WIN32) |
| 641 | + char *zMbcs; | |
| 644 | 642 | struct timeval tv[2]; |
| 645 | 643 | memset(tv, 0, sizeof(tv[0])*2); |
| 646 | 644 | tv[0].tv_sec = newMTime; |
| 647 | 645 | tv[1].tv_sec = newMTime; |
| 648 | - char *zMbcs = fossil_utf8_to_filename(zFilename); | |
| 646 | + zMbcs = fossil_utf8_to_filename(zFilename); | |
| 649 | 647 | utimes(zMbcs, tv); |
| 650 | 648 | #else |
| 651 | 649 | struct _utimbuf tb; |
| 652 | 650 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 653 | 651 | tb.actime = newMTime; |
| @@ -946,11 +944,11 @@ | ||
| 946 | 944 | #ifdef _WIN32 |
| 947 | 945 | char *zPwdUtf8; |
| 948 | 946 | int nPwd; |
| 949 | 947 | int i; |
| 950 | 948 | wchar_t zPwd[2000]; |
| 951 | - if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){ | |
| 949 | + if( GetCurrentDirectoryW(count(zPwd), zPwd)==0 ){ | |
| 952 | 950 | fossil_fatal("cannot find the current working directory."); |
| 953 | 951 | } |
| 954 | 952 | zPwdUtf8 = fossil_filename_to_utf8(zPwd); |
| 955 | 953 | nPwd = strlen(zPwdUtf8); |
| 956 | 954 | if( nPwd > nBuf-1 ){ |
| 957 | 955 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -329,40 +329,39 @@ | |
| 329 | HANDLE hToken = NULL; |
| 330 | DWORD desiredAccess = 0, grantedAccess = 0; |
| 331 | BOOL accessYesNo = FALSE; |
| 332 | PRIVILEGE_SET privSet; |
| 333 | DWORD privSetSize = sizeof(PRIVILEGE_SET); |
| 334 | int error, rc = 0; |
| 335 | DWORD attr; |
| 336 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 337 | |
| 338 | attr = GetFileAttributesW(zMbcs); |
| 339 | |
| 340 | if (attr == INVALID_FILE_ATTRIBUTES) { |
| 341 | /* |
| 342 | * File might not exist. |
| 343 | */ |
| 344 | |
| 345 | DWORD lasterror = GetLastError(); |
| 346 | if (lasterror != ERROR_SHARING_VIOLATION) { |
| 347 | fossil_filename_free(zMbcs); |
| 348 | return -1; |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | if (flags == F_OK) { |
| 353 | /* |
| 354 | * File exists, nothing else to check. |
| 355 | */ |
| 356 | |
| 357 | fossil_filename_free(zMbcs); |
| 358 | return 0; |
| 359 | } |
| 360 | |
| 361 | if ((flags & W_OK) |
| 362 | && (attr & FILE_ATTRIBUTE_READONLY) |
| 363 | && !(attr & FILE_ATTRIBUTE_DIRECTORY)) { |
| 364 | /* |
| 365 | * The attributes say the file is not writable. If the file is a |
| 366 | * regular file (i.e., not a directory), then the file is not |
| 367 | * writable, full stop. For directories, the read-only bit is |
| 368 | * (mostly) ignored by Windows, so we can't ascertain anything about |
| @@ -394,12 +393,11 @@ | |
| 394 | |
| 395 | /* |
| 396 | * Should have failed with ERROR_INSUFFICIENT_BUFFER |
| 397 | */ |
| 398 | |
| 399 | error = GetLastError(); |
| 400 | if (error != ERROR_INSUFFICIENT_BUFFER) { |
| 401 | /* |
| 402 | * Most likely case is ERROR_ACCESS_DENIED, which we will convert |
| 403 | * to EACCES - just what we want! |
| 404 | */ |
| 405 | |
| @@ -411,27 +409,27 @@ | |
| 411 | * Now size contains the size of buffer needed. |
| 412 | */ |
| 413 | |
| 414 | sdPtr = (SECURITY_DESCRIPTOR *) HeapAlloc(GetProcessHeap(), 0, size); |
| 415 | |
| 416 | if (sdPtr == NULL) { |
| 417 | goto accessError; |
| 418 | } |
| 419 | |
| 420 | /* |
| 421 | * Call GetFileSecurity() for real. |
| 422 | */ |
| 423 | |
| 424 | if (!GetFileSecurityW(zMbcs, |
| 425 | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
| 426 | | DACL_SECURITY_INFORMATION | LABEL_SECURITY_INFORMATION, |
| 427 | sdPtr, size, &size)) { |
| 428 | /* |
| 429 | * Error getting owner SD |
| 430 | */ |
| 431 | |
| 432 | goto accessError; |
| 433 | } |
| 434 | |
| 435 | /* |
| 436 | * As of Samba 3.0.23 (10-Jul-2006), unmapped users and groups are |
| 437 | * assigned to SID domains S-1-22-1 and S-1-22-2, where "22" is the |
| @@ -443,13 +441,13 @@ | |
| 443 | * usually mapped to the Windows attributes, so if the user is the |
| 444 | * file owner then the attrib checks above are correct (as far as they |
| 445 | * go). |
| 446 | */ |
| 447 | |
| 448 | if(!GetSecurityDescriptorOwner(sdPtr,&pSid,&SidDefaulted) || |
| 449 | memcmp(GetSidIdentifierAuthority(pSid),&samba_unmapped, |
| 450 | sizeof(SID_IDENTIFIER_AUTHORITY))==0) { |
| 451 | HeapFree(GetProcessHeap(), 0, sdPtr); |
| 452 | fossil_filename_free(zMbcs); |
| 453 | return 0; /* Attrib tests say access allowed. */ |
| 454 | } |
| 455 | |
| @@ -456,19 +454,19 @@ | |
| 456 | /* |
| 457 | * Perform security impersonation of the user and open the resulting |
| 458 | * thread token. |
| 459 | */ |
| 460 | |
| 461 | if (!ImpersonateSelf(SecurityImpersonation)) { |
| 462 | /* |
| 463 | * Unable to perform security impersonation. |
| 464 | */ |
| 465 | |
| 466 | goto accessError; |
| 467 | } |
| 468 | if (!OpenThreadToken(GetCurrentThread(), |
| 469 | TOKEN_DUPLICATE | TOKEN_QUERY, FALSE, &hToken)) { |
| 470 | /* |
| 471 | * Unable to get current thread's token. |
| 472 | */ |
| 473 | |
| 474 | goto accessError; |
| @@ -479,14 +477,14 @@ | |
| 479 | /* |
| 480 | * Setup desiredAccess according to the access priveleges we are |
| 481 | * checking. |
| 482 | */ |
| 483 | |
| 484 | if (flags & R_OK) { |
| 485 | desiredAccess |= FILE_GENERIC_READ; |
| 486 | } |
| 487 | if (flags & W_OK) { |
| 488 | desiredAccess |= FILE_GENERIC_WRITE; |
| 489 | } |
| 490 | |
| 491 | memset(&genMap, 0x0, sizeof(GENERIC_MAPPING)); |
| 492 | genMap.GenericRead = FILE_GENERIC_READ; |
| @@ -496,22 +494,22 @@ | |
| 496 | |
| 497 | /* |
| 498 | * Perform access check using the token. |
| 499 | */ |
| 500 | |
| 501 | if (!AccessCheck(sdPtr, hToken, desiredAccess, |
| 502 | &genMap, &privSet, &privSetSize, &grantedAccess, |
| 503 | &accessYesNo)) { |
| 504 | /* |
| 505 | * Unable to perform access check. |
| 506 | */ |
| 507 | |
| 508 | accessError: |
| 509 | if (sdPtr != NULL) { |
| 510 | HeapFree(GetProcessHeap(), 0, sdPtr); |
| 511 | } |
| 512 | if (hToken != NULL) { |
| 513 | CloseHandle(hToken); |
| 514 | } |
| 515 | fossil_filename_free(zMbcs); |
| 516 | return -1; |
| 517 | } |
| @@ -520,13 +518,12 @@ | |
| 520 | * Clean up. |
| 521 | */ |
| 522 | |
| 523 | HeapFree(GetProcessHeap(), 0, sdPtr); |
| 524 | CloseHandle(hToken); |
| 525 | if (!accessYesNo) { |
| 526 | fossil_filename_free(zMbcs); |
| 527 | return -1; |
| 528 | } |
| 529 | #else |
| 530 | char *zMbcs = fossil_utf8_to_filename(zFilename); |
| 531 | int rc = access(zMbcs, flags); |
| 532 | #endif |
| @@ -639,15 +636,16 @@ | |
| 639 | /* |
| 640 | ** Set the mtime for a file. |
| 641 | */ |
| 642 | void file_set_mtime(const char *zFilename, i64 newMTime){ |
| 643 | #if !defined(_WIN32) |
| 644 | struct timeval tv[2]; |
| 645 | memset(tv, 0, sizeof(tv[0])*2); |
| 646 | tv[0].tv_sec = newMTime; |
| 647 | tv[1].tv_sec = newMTime; |
| 648 | char *zMbcs = fossil_utf8_to_filename(zFilename); |
| 649 | utimes(zMbcs, tv); |
| 650 | #else |
| 651 | struct _utimbuf tb; |
| 652 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 653 | tb.actime = newMTime; |
| @@ -946,11 +944,11 @@ | |
| 946 | #ifdef _WIN32 |
| 947 | char *zPwdUtf8; |
| 948 | int nPwd; |
| 949 | int i; |
| 950 | wchar_t zPwd[2000]; |
| 951 | if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){ |
| 952 | fossil_fatal("cannot find the current working directory."); |
| 953 | } |
| 954 | zPwdUtf8 = fossil_filename_to_utf8(zPwd); |
| 955 | nPwd = strlen(zPwdUtf8); |
| 956 | if( nPwd > nBuf-1 ){ |
| 957 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -329,40 +329,39 @@ | |
| 329 | HANDLE hToken = NULL; |
| 330 | DWORD desiredAccess = 0, grantedAccess = 0; |
| 331 | BOOL accessYesNo = FALSE; |
| 332 | PRIVILEGE_SET privSet; |
| 333 | DWORD privSetSize = sizeof(PRIVILEGE_SET); |
| 334 | int rc = 0; |
| 335 | DWORD attr; |
| 336 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 337 | |
| 338 | attr = GetFileAttributesW(zMbcs); |
| 339 | |
| 340 | if( attr==INVALID_FILE_ATTRIBUTES ){ |
| 341 | /* |
| 342 | * File might not exist. |
| 343 | */ |
| 344 | |
| 345 | if( GetLastError()!=ERROR_SHARING_VIOLATION ){ |
| 346 | fossil_filename_free(zMbcs); |
| 347 | return -1; |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | if( flags==F_OK ){ |
| 352 | /* |
| 353 | * File exists, nothing else to check. |
| 354 | */ |
| 355 | |
| 356 | fossil_filename_free(zMbcs); |
| 357 | return 0; |
| 358 | } |
| 359 | |
| 360 | if( (flags & W_OK) |
| 361 | && (attr & FILE_ATTRIBUTE_READONLY) |
| 362 | && !(attr & FILE_ATTRIBUTE_DIRECTORY) ){ |
| 363 | /* |
| 364 | * The attributes say the file is not writable. If the file is a |
| 365 | * regular file (i.e., not a directory), then the file is not |
| 366 | * writable, full stop. For directories, the read-only bit is |
| 367 | * (mostly) ignored by Windows, so we can't ascertain anything about |
| @@ -394,12 +393,11 @@ | |
| 393 | |
| 394 | /* |
| 395 | * Should have failed with ERROR_INSUFFICIENT_BUFFER |
| 396 | */ |
| 397 | |
| 398 | if( GetLastError()!=ERROR_INSUFFICIENT_BUFFER ){ |
| 399 | /* |
| 400 | * Most likely case is ERROR_ACCESS_DENIED, which we will convert |
| 401 | * to EACCES - just what we want! |
| 402 | */ |
| 403 | |
| @@ -411,27 +409,27 @@ | |
| 409 | * Now size contains the size of buffer needed. |
| 410 | */ |
| 411 | |
| 412 | sdPtr = (SECURITY_DESCRIPTOR *) HeapAlloc(GetProcessHeap(), 0, size); |
| 413 | |
| 414 | if( sdPtr == NULL ){ |
| 415 | goto accessError; |
| 416 | } |
| 417 | |
| 418 | /* |
| 419 | * Call GetFileSecurity() for real. |
| 420 | */ |
| 421 | |
| 422 | if( !GetFileSecurityW(zMbcs, |
| 423 | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
| 424 | | DACL_SECURITY_INFORMATION | LABEL_SECURITY_INFORMATION, |
| 425 | sdPtr, size, &size) ){ |
| 426 | /* |
| 427 | * Error getting owner SD |
| 428 | */ |
| 429 | |
| 430 | goto accessError; |
| 431 | } |
| 432 | |
| 433 | /* |
| 434 | * As of Samba 3.0.23 (10-Jul-2006), unmapped users and groups are |
| 435 | * assigned to SID domains S-1-22-1 and S-1-22-2, where "22" is the |
| @@ -443,13 +441,13 @@ | |
| 441 | * usually mapped to the Windows attributes, so if the user is the |
| 442 | * file owner then the attrib checks above are correct (as far as they |
| 443 | * go). |
| 444 | */ |
| 445 | |
| 446 | if( !GetSecurityDescriptorOwner(sdPtr,&pSid,&SidDefaulted) || |
| 447 | memcmp(GetSidIdentifierAuthority(pSid),&samba_unmapped, |
| 448 | sizeof(SID_IDENTIFIER_AUTHORITY))==0 ){ |
| 449 | HeapFree(GetProcessHeap(), 0, sdPtr); |
| 450 | fossil_filename_free(zMbcs); |
| 451 | return 0; /* Attrib tests say access allowed. */ |
| 452 | } |
| 453 | |
| @@ -456,19 +454,19 @@ | |
| 454 | /* |
| 455 | * Perform security impersonation of the user and open the resulting |
| 456 | * thread token. |
| 457 | */ |
| 458 | |
| 459 | if( !ImpersonateSelf(SecurityImpersonation) ){ |
| 460 | /* |
| 461 | * Unable to perform security impersonation. |
| 462 | */ |
| 463 | |
| 464 | goto accessError; |
| 465 | } |
| 466 | if( !OpenThreadToken(GetCurrentThread(), |
| 467 | TOKEN_DUPLICATE | TOKEN_QUERY, FALSE, &hToken) ){ |
| 468 | /* |
| 469 | * Unable to get current thread's token. |
| 470 | */ |
| 471 | |
| 472 | goto accessError; |
| @@ -479,14 +477,14 @@ | |
| 477 | /* |
| 478 | * Setup desiredAccess according to the access priveleges we are |
| 479 | * checking. |
| 480 | */ |
| 481 | |
| 482 | if( flags & R_OK ){ |
| 483 | desiredAccess |= FILE_GENERIC_READ; |
| 484 | } |
| 485 | if( flags & W_OK){ |
| 486 | desiredAccess |= FILE_GENERIC_WRITE; |
| 487 | } |
| 488 | |
| 489 | memset(&genMap, 0x0, sizeof(GENERIC_MAPPING)); |
| 490 | genMap.GenericRead = FILE_GENERIC_READ; |
| @@ -496,22 +494,22 @@ | |
| 494 | |
| 495 | /* |
| 496 | * Perform access check using the token. |
| 497 | */ |
| 498 | |
| 499 | if( !AccessCheck(sdPtr, hToken, desiredAccess, |
| 500 | &genMap, &privSet, &privSetSize, &grantedAccess, |
| 501 | &accessYesNo) ){ |
| 502 | /* |
| 503 | * Unable to perform access check. |
| 504 | */ |
| 505 | |
| 506 | accessError: |
| 507 | if( sdPtr != NULL ){ |
| 508 | HeapFree(GetProcessHeap(), 0, sdPtr); |
| 509 | } |
| 510 | if( hToken != NULL ){ |
| 511 | CloseHandle(hToken); |
| 512 | } |
| 513 | fossil_filename_free(zMbcs); |
| 514 | return -1; |
| 515 | } |
| @@ -520,13 +518,12 @@ | |
| 518 | * Clean up. |
| 519 | */ |
| 520 | |
| 521 | HeapFree(GetProcessHeap(), 0, sdPtr); |
| 522 | CloseHandle(hToken); |
| 523 | if( !accessYesNo ){ |
| 524 | rc = -1; |
| 525 | } |
| 526 | #else |
| 527 | char *zMbcs = fossil_utf8_to_filename(zFilename); |
| 528 | int rc = access(zMbcs, flags); |
| 529 | #endif |
| @@ -639,15 +636,16 @@ | |
| 636 | /* |
| 637 | ** Set the mtime for a file. |
| 638 | */ |
| 639 | void file_set_mtime(const char *zFilename, i64 newMTime){ |
| 640 | #if !defined(_WIN32) |
| 641 | char *zMbcs; |
| 642 | struct timeval tv[2]; |
| 643 | memset(tv, 0, sizeof(tv[0])*2); |
| 644 | tv[0].tv_sec = newMTime; |
| 645 | tv[1].tv_sec = newMTime; |
| 646 | zMbcs = fossil_utf8_to_filename(zFilename); |
| 647 | utimes(zMbcs, tv); |
| 648 | #else |
| 649 | struct _utimbuf tb; |
| 650 | wchar_t *zMbcs = fossil_utf8_to_filename(zFilename); |
| 651 | tb.actime = newMTime; |
| @@ -946,11 +944,11 @@ | |
| 944 | #ifdef _WIN32 |
| 945 | char *zPwdUtf8; |
| 946 | int nPwd; |
| 947 | int i; |
| 948 | wchar_t zPwd[2000]; |
| 949 | if( GetCurrentDirectoryW(count(zPwd), zPwd)==0 ){ |
| 950 | fossil_fatal("cannot find the current working directory."); |
| 951 | } |
| 952 | zPwdUtf8 = fossil_filename_to_utf8(zPwd); |
| 953 | nPwd = strlen(zPwdUtf8); |
| 954 | if( nPwd > nBuf-1 ){ |
| 955 |
+29
-8
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -2198,10 +2198,28 @@ | ||
| 2198 | 2198 | } |
| 2199 | 2199 | blob_zero(&comment); |
| 2200 | 2200 | blob_append(&comment, zNewComment, -1); |
| 2201 | 2201 | zUuid[10] = 0; |
| 2202 | 2202 | style_header("Edit Check-in [%s]", zUuid); |
| 2203 | + /* | |
| 2204 | + ** chgcbn/chgbn: Handle change of (checkbox for) branch name in | |
| 2205 | + ** remaining of form. | |
| 2206 | + */ | |
| 2207 | + @ <script> | |
| 2208 | + @ function chgcbn(checked, branch){ | |
| 2209 | + @ val = gebi('brname').value; | |
| 2210 | + @ if( !val || !checked) val = branch; | |
| 2211 | + @ cidbrid = document.getElementById('cbranch'); | |
| 2212 | + @ if( cidbrid ) cidbrid.textContent = val; | |
| 2213 | + @ } | |
| 2214 | + @ function chgbn(val, branch){ | |
| 2215 | + @ if( !val ) val = branch; | |
| 2216 | + @ gebi('newbr').checked = (val!=branch); | |
| 2217 | + @ cidbrid = document.getElementById('cbranch'); | |
| 2218 | + @ if( cidbrid ) cidbrid.textContent = val; | |
| 2219 | + @ } | |
| 2220 | + @ </script> | |
| 2203 | 2221 | if( P("preview") ){ |
| 2204 | 2222 | Blob suffix; |
| 2205 | 2223 | int nTag = 0; |
| 2206 | 2224 | @ <b>Preview:</b> |
| 2207 | 2225 | @ <blockquote> |
| @@ -2317,21 +2335,24 @@ | ||
| 2317 | 2335 | } |
| 2318 | 2336 | } |
| 2319 | 2337 | db_finalize(&q); |
| 2320 | 2338 | @ </td></tr> |
| 2321 | 2339 | |
| 2340 | + if( !zBranchName ){ | |
| 2341 | + zBranchName = db_get("main-branch", "trunk"); | |
| 2342 | + } | |
| 2343 | + if( !zNewBranch || !zNewBranch[0]){ | |
| 2344 | + zNewBranch = zBranchName; | |
| 2345 | + } | |
| 2322 | 2346 | @ <tr><th align="right" valign="top">Branching:</th> |
| 2323 | 2347 | @ <td valign="top"> |
| 2324 | - @ <label><input id="newbr" type="checkbox" name="newbr"%s(zNewBrFlag) /> | |
| 2348 | + @ <label><input id="newbr" type="checkbox" name="newbr"%s(zNewBrFlag) | |
| 2349 | + @ onchange="chgcbn(this.checked,'%h(zBranchName)')" /> | |
| 2325 | 2350 | @ Make this check-in the start of a new branch named:</label> |
| 2326 | - @ <input type="text" style="width:15;" name="brname" value="%h(zNewBranch)" | |
| 2327 | - @ onkeyup="gebi('newbr').checked=!!this.value | |
| 2328 | - if( zBranchName ){ | |
| 2329 | - @ && this.value!='%h(zBranchName)' | |
| 2330 | - } | |
| 2331 | - @ " /></td></tr> | |
| 2332 | - | |
| 2351 | + @ <input id="brname" type="text" style="width:15;" name="brname" | |
| 2352 | + @ value="%h(zNewBranch)" | |
| 2353 | + @ onkeyup="chgbn(this.value,'%h(zBranchName)')" /></td></tr> | |
| 2333 | 2354 | if( !fHasClosed ){ |
| 2334 | 2355 | if( is_a_leaf(rid) ){ |
| 2335 | 2356 | @ <tr><th align="right" valign="top">Leaf Closure:</th> |
| 2336 | 2357 | @ <td valign="top"> |
| 2337 | 2358 | @ <label><input type="checkbox" name="close"%s(zCloseFlag) /> |
| 2338 | 2359 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2198,10 +2198,28 @@ | |
| 2198 | } |
| 2199 | blob_zero(&comment); |
| 2200 | blob_append(&comment, zNewComment, -1); |
| 2201 | zUuid[10] = 0; |
| 2202 | style_header("Edit Check-in [%s]", zUuid); |
| 2203 | if( P("preview") ){ |
| 2204 | Blob suffix; |
| 2205 | int nTag = 0; |
| 2206 | @ <b>Preview:</b> |
| 2207 | @ <blockquote> |
| @@ -2317,21 +2335,24 @@ | |
| 2317 | } |
| 2318 | } |
| 2319 | db_finalize(&q); |
| 2320 | @ </td></tr> |
| 2321 | |
| 2322 | @ <tr><th align="right" valign="top">Branching:</th> |
| 2323 | @ <td valign="top"> |
| 2324 | @ <label><input id="newbr" type="checkbox" name="newbr"%s(zNewBrFlag) /> |
| 2325 | @ Make this check-in the start of a new branch named:</label> |
| 2326 | @ <input type="text" style="width:15;" name="brname" value="%h(zNewBranch)" |
| 2327 | @ onkeyup="gebi('newbr').checked=!!this.value |
| 2328 | if( zBranchName ){ |
| 2329 | @ && this.value!='%h(zBranchName)' |
| 2330 | } |
| 2331 | @ " /></td></tr> |
| 2332 | |
| 2333 | if( !fHasClosed ){ |
| 2334 | if( is_a_leaf(rid) ){ |
| 2335 | @ <tr><th align="right" valign="top">Leaf Closure:</th> |
| 2336 | @ <td valign="top"> |
| 2337 | @ <label><input type="checkbox" name="close"%s(zCloseFlag) /> |
| 2338 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2198,10 +2198,28 @@ | |
| 2198 | } |
| 2199 | blob_zero(&comment); |
| 2200 | blob_append(&comment, zNewComment, -1); |
| 2201 | zUuid[10] = 0; |
| 2202 | style_header("Edit Check-in [%s]", zUuid); |
| 2203 | /* |
| 2204 | ** chgcbn/chgbn: Handle change of (checkbox for) branch name in |
| 2205 | ** remaining of form. |
| 2206 | */ |
| 2207 | @ <script> |
| 2208 | @ function chgcbn(checked, branch){ |
| 2209 | @ val = gebi('brname').value; |
| 2210 | @ if( !val || !checked) val = branch; |
| 2211 | @ cidbrid = document.getElementById('cbranch'); |
| 2212 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2213 | @ } |
| 2214 | @ function chgbn(val, branch){ |
| 2215 | @ if( !val ) val = branch; |
| 2216 | @ gebi('newbr').checked = (val!=branch); |
| 2217 | @ cidbrid = document.getElementById('cbranch'); |
| 2218 | @ if( cidbrid ) cidbrid.textContent = val; |
| 2219 | @ } |
| 2220 | @ </script> |
| 2221 | if( P("preview") ){ |
| 2222 | Blob suffix; |
| 2223 | int nTag = 0; |
| 2224 | @ <b>Preview:</b> |
| 2225 | @ <blockquote> |
| @@ -2317,21 +2335,24 @@ | |
| 2335 | } |
| 2336 | } |
| 2337 | db_finalize(&q); |
| 2338 | @ </td></tr> |
| 2339 | |
| 2340 | if( !zBranchName ){ |
| 2341 | zBranchName = db_get("main-branch", "trunk"); |
| 2342 | } |
| 2343 | if( !zNewBranch || !zNewBranch[0]){ |
| 2344 | zNewBranch = zBranchName; |
| 2345 | } |
| 2346 | @ <tr><th align="right" valign="top">Branching:</th> |
| 2347 | @ <td valign="top"> |
| 2348 | @ <label><input id="newbr" type="checkbox" name="newbr"%s(zNewBrFlag) |
| 2349 | @ onchange="chgcbn(this.checked,'%h(zBranchName)')" /> |
| 2350 | @ Make this check-in the start of a new branch named:</label> |
| 2351 | @ <input id="brname" type="text" style="width:15;" name="brname" |
| 2352 | @ value="%h(zNewBranch)" |
| 2353 | @ onkeyup="chgbn(this.value,'%h(zBranchName)')" /></td></tr> |
| 2354 | if( !fHasClosed ){ |
| 2355 | if( is_a_leaf(rid) ){ |
| 2356 | @ <tr><th align="right" valign="top">Leaf Closure:</th> |
| 2357 | @ <td valign="top"> |
| 2358 | @ <label><input type="checkbox" name="close"%s(zCloseFlag) /> |
| 2359 |
+16
-2
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -371,10 +371,24 @@ | ||
| 371 | 371 | test: $(OBJDIR) $(APPNAME) |
| 372 | 372 | $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) |
| 373 | 373 | |
| 374 | 374 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion |
| 375 | 375 | $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 376 | + | |
| 377 | +# Setup the options used to compile the included SQLite library. | |
| 378 | +SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \ | |
| 379 | + -DSQLITE_THREADSAFE=0 \ | |
| 380 | + -DSQLITE_DEFAULT_FILE_FORMAT=4 \ | |
| 381 | + -DSQLITE_OMIT_DEPRECATED \ | |
| 382 | + -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ | |
| 383 | + -Dlocaltime=fossil_localtime \ | |
| 384 | + -DSQLITE_ENABLE_LOCKING_STYLE=0 | |
| 385 | + | |
| 386 | +# Setup the options used to compile the included SQLite shell. | |
| 387 | +SHELL_OPTIONS = -Dmain=sqlite3_shell \ | |
| 388 | + -DSQLITE_OMIT_LOAD_EXTENSION=1 \ | |
| 389 | + -Dsqlite3_strglob=strglob | |
| 376 | 390 | |
| 377 | 391 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 378 | 392 | # to 1. If it is set to 1, then there is no need to build or link |
| 379 | 393 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 380 | 394 | # using -lsqlite3. |
| @@ -1160,14 +1174,14 @@ | ||
| 1160 | 1174 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1161 | 1175 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1162 | 1176 | |
| 1163 | 1177 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1164 | 1178 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1165 | - $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -DSQLITE_WINNT_MAX_PATH_CHARS=4096 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o | |
| 1179 | + $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o | |
| 1166 | 1180 | |
| 1167 | 1181 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1168 | - $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o | |
| 1182 | + $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o | |
| 1169 | 1183 | |
| 1170 | 1184 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1171 | 1185 | $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o |
| 1172 | 1186 | |
| 1173 | 1187 | $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c |
| 1174 | 1188 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -371,10 +371,24 @@ | |
| 371 | test: $(OBJDIR) $(APPNAME) |
| 372 | $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) |
| 373 | |
| 374 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion |
| 375 | $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 376 | |
| 377 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 378 | # to 1. If it is set to 1, then there is no need to build or link |
| 379 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 380 | # using -lsqlite3. |
| @@ -1160,14 +1174,14 @@ | |
| 1160 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1161 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1162 | |
| 1163 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1164 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1165 | $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -DSQLITE_WINNT_MAX_PATH_CHARS=4096 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1166 | |
| 1167 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1168 | $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o |
| 1169 | |
| 1170 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1171 | $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o |
| 1172 | |
| 1173 | $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c |
| 1174 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -371,10 +371,24 @@ | |
| 371 | test: $(OBJDIR) $(APPNAME) |
| 372 | $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME) |
| 373 | |
| 374 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion |
| 375 | $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 376 | |
| 377 | # Setup the options used to compile the included SQLite library. |
| 378 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 379 | -DSQLITE_THREADSAFE=0 \ |
| 380 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 381 | -DSQLITE_OMIT_DEPRECATED \ |
| 382 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 383 | -Dlocaltime=fossil_localtime \ |
| 384 | -DSQLITE_ENABLE_LOCKING_STYLE=0 |
| 385 | |
| 386 | # Setup the options used to compile the included SQLite shell. |
| 387 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 388 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 389 | -Dsqlite3_strglob=strglob |
| 390 | |
| 391 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 392 | # to 1. If it is set to 1, then there is no need to build or link |
| 393 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 394 | # using -lsqlite3. |
| @@ -1160,14 +1174,14 @@ | |
| 1174 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1175 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1176 | |
| 1177 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1178 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1179 | $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1180 | |
| 1181 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1182 | $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o |
| 1183 | |
| 1184 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1185 | $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o |
| 1186 | |
| 1187 | $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c |
| 1188 |
+72
-43
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -125,10 +125,40 @@ | ||
| 125 | 125 | xfersetup |
| 126 | 126 | zip |
| 127 | 127 | http_ssl |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | +# Options used to compile the included SQLite library. | |
| 131 | +# | |
| 132 | +set SQLITE_OPTIONS { | |
| 133 | + -DSQLITE_OMIT_LOAD_EXTENSION=1 | |
| 134 | + -DSQLITE_THREADSAFE=0 | |
| 135 | + -DSQLITE_DEFAULT_FILE_FORMAT=4 | |
| 136 | + -DSQLITE_OMIT_DEPRECATED | |
| 137 | + -DSQLITE_ENABLE_EXPLAIN_COMMENTS | |
| 138 | + -Dlocaltime=fossil_localtime | |
| 139 | + -DSQLITE_ENABLE_LOCKING_STYLE=0 | |
| 140 | +} | |
| 141 | +#lappend SQLITE_OPTIONS -DSQLITE_ENABLE_FTS3=1 | |
| 142 | +#lappend SQLITE_OPTIONS -DSQLITE_ENABLE_STAT4 | |
| 143 | +#lappend SQLITE_OPTIONS -DSQLITE_WIN32_NO_ANSI | |
| 144 | +#lappend SQLITE_OPTIONS -DSQLITE_WINNT_MAX_PATH_CHARS=4096 | |
| 145 | + | |
| 146 | +# Options used to compile the included SQLite shell. | |
| 147 | +# | |
| 148 | +set SHELL_OPTIONS { | |
| 149 | + -Dmain=sqlite3_shell | |
| 150 | + -DSQLITE_OMIT_LOAD_EXTENSION=1 | |
| 151 | + -Dsqlite3_strglob=strglob | |
| 152 | +} | |
| 153 | + | |
| 154 | +# Options used to compile the included SQLite shell on Windows. | |
| 155 | +# | |
| 156 | +set SHELL_WIN32_OPTIONS $SHELL_OPTIONS | |
| 157 | +lappend SHELL_WIN32_OPTIONS -Dgetenv=fossil_getenv | |
| 158 | +lappend SHELL_WIN32_OPTIONS -Dfopen=fossil_fopen | |
| 159 | + | |
| 130 | 160 | # Name of the final application |
| 131 | 161 | # |
| 132 | 162 | set name fossil |
| 133 | 163 | |
| 134 | 164 | # The "writeln" command sends output to the target makefile. |
| @@ -186,11 +216,13 @@ | ||
| 186 | 216 | } |
| 187 | 217 | writeln "\n" |
| 188 | 218 | writeln "APPNAME = $name\$(E)" |
| 189 | 219 | writeln "\n" |
| 190 | 220 | |
| 191 | -writeln { | |
| 221 | +writeln [string map [list \ | |
| 222 | + <<<SQLITE_OPTIONS>>> [join $SQLITE_OPTIONS " \\\n "] \ | |
| 223 | + <<<SHELL_OPTIONS>>> [join $SHELL_OPTIONS " \\\n "]] { | |
| 192 | 224 | all: $(OBJDIR) $(APPNAME) |
| 193 | 225 | |
| 194 | 226 | install: $(APPNAME) |
| 195 | 227 | mkdir -p $(INSTALLDIR) |
| 196 | 228 | mv $(APPNAME) $(INSTALLDIR) |
| @@ -218,10 +250,16 @@ | ||
| 218 | 250 | |
| 219 | 251 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion |
| 220 | 252 | $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid \ |
| 221 | 253 | $(SRCDIR)/../manifest \ |
| 222 | 254 | $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 255 | + | |
| 256 | +# Setup the options used to compile the included SQLite library. | |
| 257 | +SQLITE_OPTIONS = <<<SQLITE_OPTIONS>>> | |
| 258 | + | |
| 259 | +# Setup the options used to compile the included SQLite shell. | |
| 260 | +SHELL_OPTIONS = <<<SHELL_OPTIONS>>> | |
| 223 | 261 | |
| 224 | 262 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 225 | 263 | # to 1. If it is set to 1, then there is no need to build or link |
| 226 | 264 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 227 | 265 | # using -lsqlite3. |
| @@ -254,11 +292,11 @@ | ||
| 254 | 292 | # noop |
| 255 | 293 | |
| 256 | 294 | clean: |
| 257 | 295 | rm -rf $(OBJDIR)/* $(APPNAME) |
| 258 | 296 | |
| 259 | -} | |
| 297 | +}] | |
| 260 | 298 | |
| 261 | 299 | set mhargs {} |
| 262 | 300 | foreach s [lsort $src] { |
| 263 | 301 | append mhargs " \$(OBJDIR)/${s}_.c:\$(OBJDIR)/$s.h" |
| 264 | 302 | set extra_h($s) {} |
| @@ -283,29 +321,15 @@ | ||
| 283 | 321 | writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h $extra_h($s) \$(SRCDIR)/config.h" |
| 284 | 322 | writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n" |
| 285 | 323 | writeln "\$(OBJDIR)/$s.h:\t\$(OBJDIR)/headers" |
| 286 | 324 | } |
| 287 | 325 | |
| 288 | - | |
| 289 | 326 | writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c" |
| 290 | -set opt {-DSQLITE_OMIT_LOAD_EXTENSION=1} | |
| 291 | -append opt " -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4" | |
| 292 | -#append opt " -DSQLITE_ENABLE_FTS3=1" | |
| 293 | -#append opt " -DSQLITE_ENABLE_STAT4" | |
| 294 | -append opt " -DSQLITE_OMIT_DEPRECATED" | |
| 295 | -append opt " -DSQLITE_ENABLE_EXPLAIN_COMMENTS" | |
| 296 | -append opt " -Dlocaltime=fossil_localtime" | |
| 297 | -append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0" | |
| 298 | -append opt " -DSQLITE_WIN32_NO_ANSI" | |
| 299 | -set SQLITE_OPTIONS $opt | |
| 300 | -writeln "\t\$(XTCC) $opt -DSQLITE_WINNT_MAX_PATH_CHARS=4096 -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" | |
| 327 | +writeln "\t\$(XTCC) \$(SQLITE_OPTIONS) \$(SQLITE_CFLAGS) -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" | |
| 301 | 328 | |
| 302 | 329 | writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h" |
| 303 | -set opt {-Dmain=sqlite3_shell} | |
| 304 | -append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1" | |
| 305 | -append opt " -Dsqlite3_strglob=strglob" | |
| 306 | -writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n" | |
| 330 | +writeln "\t\$(XTCC) \$(SHELL_OPTIONS) \$(SHELL_CFLAGS) -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n" | |
| 307 | 331 | |
| 308 | 332 | writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c" |
| 309 | 333 | writeln "\t\$(XTCC) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n" |
| 310 | 334 | |
| 311 | 335 | writeln "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c" |
| @@ -312,11 +336,10 @@ | ||
| 312 | 336 | writeln "\t\$(XTCC) -c \$(SRCDIR)/th_lang.c -o \$(OBJDIR)/th_lang.o\n" |
| 313 | 337 | |
| 314 | 338 | writeln "\$(OBJDIR)/th_tcl.o:\t\$(SRCDIR)/th_tcl.c" |
| 315 | 339 | writeln "\t\$(XTCC) -c \$(SRCDIR)/th_tcl.c -o \$(OBJDIR)/th_tcl.o\n" |
| 316 | 340 | |
| 317 | -set opt {} | |
| 318 | 341 | writeln { |
| 319 | 342 | $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c |
| 320 | 343 | $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o |
| 321 | 344 | |
| 322 | 345 | # |
| @@ -772,30 +795,29 @@ | ||
| 772 | 795 | writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h $extra_h($s) \$(SRCDIR)/config.h" |
| 773 | 796 | writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n" |
| 774 | 797 | writeln "\$(OBJDIR)/${s}.h:\t\$(OBJDIR)/headers\n" |
| 775 | 798 | } |
| 776 | 799 | |
| 800 | +set MINGW_SQLITE_OPTIONS $SQLITE_OPTIONS | |
| 801 | +lappend MINGW_SQLITE_OPTIONS -D_HAVE_SQLITE_CONFIG_H | |
| 802 | +lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MALLOC_H | |
| 803 | +lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MSIZE | |
| 804 | + | |
| 805 | +set j " \\\n " | |
| 806 | +writeln "SQLITE_OPTIONS = [join $MINGW_SQLITE_OPTIONS $j]\n" | |
| 807 | +set j " \\\n " | |
| 808 | +writeln "SHELL_OPTIONS = [join $SHELL_WIN32_OPTIONS $j]\n" | |
| 777 | 809 | |
| 778 | 810 | writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c" |
| 779 | -set opt $SQLITE_OPTIONS | |
| 780 | -append opt " -D_HAVE_SQLITE_CONFIG_H" | |
| 781 | -append opt " -DSQLITE_USE_MALLOC_H" | |
| 782 | -append opt " -DSQLITE_USE_MSIZE" | |
| 783 | -writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" | |
| 811 | +writeln "\t\$(XTCC) \$(SQLITE_OPTIONS) \$(SQLITE_CFLAGS) -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" | |
| 784 | 812 | |
| 785 | -set opt {} | |
| 786 | 813 | writeln "\$(OBJDIR)/cson_amalgamation.o:\t\$(SRCDIR)/cson_amalgamation.c" |
| 787 | -writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/cson_amalgamation.c -o \$(OBJDIR)/cson_amalgamation.o\n" | |
| 814 | +writeln "\t\$(XTCC) -c \$(SRCDIR)/cson_amalgamation.c -o \$(OBJDIR)/cson_amalgamation.o\n" | |
| 788 | 815 | writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_artifact.o \$(OBJDIR)/json_branch.o \$(OBJDIR)/json_config.o \$(OBJDIR)/json_diff.o \$(OBJDIR)/json_dir.o \$(OBJDIR)/jsos_finfo.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_query.o \$(OBJDIR)/json_report.o \$(OBJDIR)/json_status.o \$(OBJDIR)/json_tag.o \$(OBJDIR)/json_timeline.o \$(OBJDIR)/json_user.o \$(OBJDIR)/json_wiki.o : \$(SRCDIR)/json_detail.h\n" |
| 789 | 816 | |
| 790 | 817 | writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h" |
| 791 | -set opt {-Dmain=sqlite3_shell} | |
| 792 | -append opt " -Dsqlite3_strglob=strglob" | |
| 793 | -append opt " -Dgetenv=fossil_getenv" | |
| 794 | -append opt " -Dfopen=fossil_fopen" | |
| 795 | -append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1" | |
| 796 | -writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n" | |
| 818 | +writeln "\t\$(XTCC) \$(SHELL_OPTIONS) \$(SHELL_CFLAGS) -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n" | |
| 797 | 819 | |
| 798 | 820 | writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c" |
| 799 | 821 | writeln "\t\$(XTCC) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n" |
| 800 | 822 | |
| 801 | 823 | writeln "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c" |
| @@ -844,11 +866,12 @@ | ||
| 844 | 866 | CFLAGS = -o |
| 845 | 867 | BCC = $(DMDIR)\bin\dmc $(CFLAGS) |
| 846 | 868 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) |
| 847 | 869 | LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 |
| 848 | 870 | } |
| 849 | -writeln "SQLITE_OPTIONS = $SQLITE_OPTIONS\n" | |
| 871 | +writeln "SQLITE_OPTIONS = [join $SQLITE_OPTIONS { }]\n" | |
| 872 | +writeln "SHELL_OPTIONS = [join $SHELL_WIN32_OPTIONS { }]\n" | |
| 850 | 873 | writeln -nonewline "SRC = " |
| 851 | 874 | foreach s [lsort $src] { |
| 852 | 875 | writeln -nonewline "${s}_.c " |
| 853 | 876 | } |
| 854 | 877 | writeln "\n" |
| @@ -897,14 +920,14 @@ | ||
| 897 | 920 | |
| 898 | 921 | version$E: $B\src\mkversion.c |
| 899 | 922 | $(BCC) -o$@ $** |
| 900 | 923 | |
| 901 | 924 | $(OBJDIR)\shell$O : $(SRCDIR)\shell.c |
| 902 | - $(TCC) -o$@ -c -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen $(SQLITE_OPTIONS) $** | |
| 925 | + $(TCC) -o$@ -c $(SHELL_OPTIONS) $(SQLITE_OPTIONS) $(SHELL_CFLAGS) $** | |
| 903 | 926 | |
| 904 | 927 | $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 905 | - $(TCC) -o$@ -c $(SQLITE_OPTIONS) $** | |
| 928 | + $(TCC) -o$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $** | |
| 906 | 929 | |
| 907 | 930 | $(OBJDIR)\th$O : $(SRCDIR)\th.c |
| 908 | 931 | $(TCC) -o$@ -c $** |
| 909 | 932 | |
| 910 | 933 | $(OBJDIR)\th_lang$O : $(SRCDIR)\th_lang.c |
| @@ -1036,13 +1059,18 @@ | ||
| 1036 | 1059 | RCC = $(RCC) -DFOSSIL_ENABLE_SSL=1 |
| 1037 | 1060 | LIBS = $(LIBS) $(SSLLIB) |
| 1038 | 1061 | LIBDIR = $(LIBDIR) -LIBPATH:$(SSLLIBDIR) |
| 1039 | 1062 | !endif |
| 1040 | 1063 | } |
| 1041 | -regsub -all {[-]D} $SQLITE_OPTIONS {/D} MSC_SQLITE_OPTIONS | |
| 1064 | +regsub -all {[-]D} [join $SQLITE_OPTIONS { }] {/D} MSC_SQLITE_OPTIONS | |
| 1042 | 1065 | set j " \\\n " |
| 1043 | 1066 | writeln "SQLITE_OPTIONS = [join $MSC_SQLITE_OPTIONS $j]\n" |
| 1067 | + | |
| 1068 | +regsub -all {[-]D} [join $SHELL_WIN32_OPTIONS { }] {/D} MSC_SHELL_OPTIONS | |
| 1069 | +set j " \\\n " | |
| 1070 | +writeln "SHELL_OPTIONS = [join $MSC_SHELL_OPTIONS $j]\n" | |
| 1071 | + | |
| 1044 | 1072 | writeln -nonewline "SRC = " |
| 1045 | 1073 | set i 0 |
| 1046 | 1074 | foreach s [lsort $src] { |
| 1047 | 1075 | if {$i > 0} { |
| 1048 | 1076 | writeln " \\" |
| @@ -1100,14 +1128,14 @@ | ||
| 1100 | 1128 | |
| 1101 | 1129 | mkversion$E: $B\src\mkversion.c |
| 1102 | 1130 | $(BCC) $** |
| 1103 | 1131 | |
| 1104 | 1132 | $(OX)\shell$O : $(SRCDIR)\shell.c |
| 1105 | - $(TCC) /Fo$@ /Dmain=sqlite3_shell /Dsqlite3_strglob=strglob /Dgetenv=fossil_getenv /Dfopen=fossil_fopen $(SQLITE_OPTIONS) -c $(SRCDIR)\shell.c | |
| 1133 | + $(TCC) /Fo$@ $(SHELL_OPTIONS) $(SQLITE_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)\shell.c | |
| 1106 | 1134 | |
| 1107 | 1135 | $(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 1108 | - $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $** | |
| 1136 | + $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $** | |
| 1109 | 1137 | |
| 1110 | 1138 | $(OX)\th$O : $(SRCDIR)\th.c |
| 1111 | 1139 | $(TCC) /Fo$@ -c $** |
| 1112 | 1140 | |
| 1113 | 1141 | $(OX)\th_lang$O : $(SRCDIR)\th_lang.c |
| @@ -1125,11 +1153,10 @@ | ||
| 1125 | 1153 | -del $(OX)\*.obj |
| 1126 | 1154 | -del *.obj |
| 1127 | 1155 | -del *_.c |
| 1128 | 1156 | -del *.h |
| 1129 | 1157 | -del *.map |
| 1130 | - -del *.manifest | |
| 1131 | 1158 | -del headers |
| 1132 | 1159 | -del linkopts |
| 1133 | 1160 | -del *.res |
| 1134 | 1161 | |
| 1135 | 1162 | realclean: clean |
| @@ -1193,11 +1220,13 @@ | ||
| 1193 | 1220 | # |
| 1194 | 1221 | puts "building ../win/Makefile.PellesCGMake" |
| 1195 | 1222 | set output_file [open ../win/Makefile.PellesCGMake w] |
| 1196 | 1223 | fconfigure $output_file -translation binary |
| 1197 | 1224 | |
| 1198 | -writeln {# | |
| 1225 | +writeln [string map [list \ | |
| 1226 | + <<<SQLITE_OPTIONS>>> [join $SQLITE_OPTIONS { }] \ | |
| 1227 | + <<<SHELL_OPTIONS>>> [join $SHELL_WIN32_OPTIONS { }]] {# | |
| 1199 | 1228 | ############################################################################## |
| 1200 | 1229 | # WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "src/makemake.tcl") |
| 1201 | 1230 | ############################################################################## |
| 1202 | 1231 | # |
| 1203 | 1232 | # This file is automatically generated. Instead of editing this |
| @@ -1280,17 +1309,17 @@ | ||
| 1280 | 1309 | |
| 1281 | 1310 | # define the sqlite files, which need special flags on compile |
| 1282 | 1311 | SQLITESRC=sqlite3.c |
| 1283 | 1312 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) |
| 1284 | 1313 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 1285 | -SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED=1 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI | |
| 1314 | +SQLITEDEFINES=<<<SQLITE_OPTIONS>>> | |
| 1286 | 1315 | |
| 1287 | 1316 | # define the sqlite shell files, which need special flags on compile |
| 1288 | 1317 | SQLITESHELLSRC=shell.c |
| 1289 | 1318 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) |
| 1290 | 1319 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 1291 | -SQLITESHELLDEFINES=-Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 | |
| 1320 | +SQLITESHELLDEFINES=<<<SHELL_OPTIONS>>> | |
| 1292 | 1321 | |
| 1293 | 1322 | # define the th scripting files, which need special flags on compile |
| 1294 | 1323 | THSRC=th.c th_lang.c |
| 1295 | 1324 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 1296 | 1325 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| @@ -1383,6 +1412,6 @@ | ||
| 1383 | 1412 | del /F $(RESOURCE) |
| 1384 | 1413 | |
| 1385 | 1414 | .PHONY: clobber |
| 1386 | 1415 | clobber: clean |
| 1387 | 1416 | del /F *.exe |
| 1388 | -} | |
| 1417 | +}] | |
| 1389 | 1418 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -125,10 +125,40 @@ | |
| 125 | xfersetup |
| 126 | zip |
| 127 | http_ssl |
| 128 | } |
| 129 | |
| 130 | # Name of the final application |
| 131 | # |
| 132 | set name fossil |
| 133 | |
| 134 | # The "writeln" command sends output to the target makefile. |
| @@ -186,11 +216,13 @@ | |
| 186 | } |
| 187 | writeln "\n" |
| 188 | writeln "APPNAME = $name\$(E)" |
| 189 | writeln "\n" |
| 190 | |
| 191 | writeln { |
| 192 | all: $(OBJDIR) $(APPNAME) |
| 193 | |
| 194 | install: $(APPNAME) |
| 195 | mkdir -p $(INSTALLDIR) |
| 196 | mv $(APPNAME) $(INSTALLDIR) |
| @@ -218,10 +250,16 @@ | |
| 218 | |
| 219 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion |
| 220 | $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid \ |
| 221 | $(SRCDIR)/../manifest \ |
| 222 | $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 223 | |
| 224 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 225 | # to 1. If it is set to 1, then there is no need to build or link |
| 226 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 227 | # using -lsqlite3. |
| @@ -254,11 +292,11 @@ | |
| 254 | # noop |
| 255 | |
| 256 | clean: |
| 257 | rm -rf $(OBJDIR)/* $(APPNAME) |
| 258 | |
| 259 | } |
| 260 | |
| 261 | set mhargs {} |
| 262 | foreach s [lsort $src] { |
| 263 | append mhargs " \$(OBJDIR)/${s}_.c:\$(OBJDIR)/$s.h" |
| 264 | set extra_h($s) {} |
| @@ -283,29 +321,15 @@ | |
| 283 | writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h $extra_h($s) \$(SRCDIR)/config.h" |
| 284 | writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n" |
| 285 | writeln "\$(OBJDIR)/$s.h:\t\$(OBJDIR)/headers" |
| 286 | } |
| 287 | |
| 288 | |
| 289 | writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c" |
| 290 | set opt {-DSQLITE_OMIT_LOAD_EXTENSION=1} |
| 291 | append opt " -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4" |
| 292 | #append opt " -DSQLITE_ENABLE_FTS3=1" |
| 293 | #append opt " -DSQLITE_ENABLE_STAT4" |
| 294 | append opt " -DSQLITE_OMIT_DEPRECATED" |
| 295 | append opt " -DSQLITE_ENABLE_EXPLAIN_COMMENTS" |
| 296 | append opt " -Dlocaltime=fossil_localtime" |
| 297 | append opt " -DSQLITE_ENABLE_LOCKING_STYLE=0" |
| 298 | append opt " -DSQLITE_WIN32_NO_ANSI" |
| 299 | set SQLITE_OPTIONS $opt |
| 300 | writeln "\t\$(XTCC) $opt -DSQLITE_WINNT_MAX_PATH_CHARS=4096 -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" |
| 301 | |
| 302 | writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h" |
| 303 | set opt {-Dmain=sqlite3_shell} |
| 304 | append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1" |
| 305 | append opt " -Dsqlite3_strglob=strglob" |
| 306 | writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n" |
| 307 | |
| 308 | writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c" |
| 309 | writeln "\t\$(XTCC) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n" |
| 310 | |
| 311 | writeln "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c" |
| @@ -312,11 +336,10 @@ | |
| 312 | writeln "\t\$(XTCC) -c \$(SRCDIR)/th_lang.c -o \$(OBJDIR)/th_lang.o\n" |
| 313 | |
| 314 | writeln "\$(OBJDIR)/th_tcl.o:\t\$(SRCDIR)/th_tcl.c" |
| 315 | writeln "\t\$(XTCC) -c \$(SRCDIR)/th_tcl.c -o \$(OBJDIR)/th_tcl.o\n" |
| 316 | |
| 317 | set opt {} |
| 318 | writeln { |
| 319 | $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c |
| 320 | $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o |
| 321 | |
| 322 | # |
| @@ -772,30 +795,29 @@ | |
| 772 | writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h $extra_h($s) \$(SRCDIR)/config.h" |
| 773 | writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n" |
| 774 | writeln "\$(OBJDIR)/${s}.h:\t\$(OBJDIR)/headers\n" |
| 775 | } |
| 776 | |
| 777 | |
| 778 | writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c" |
| 779 | set opt $SQLITE_OPTIONS |
| 780 | append opt " -D_HAVE_SQLITE_CONFIG_H" |
| 781 | append opt " -DSQLITE_USE_MALLOC_H" |
| 782 | append opt " -DSQLITE_USE_MSIZE" |
| 783 | writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" |
| 784 | |
| 785 | set opt {} |
| 786 | writeln "\$(OBJDIR)/cson_amalgamation.o:\t\$(SRCDIR)/cson_amalgamation.c" |
| 787 | writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/cson_amalgamation.c -o \$(OBJDIR)/cson_amalgamation.o\n" |
| 788 | writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_artifact.o \$(OBJDIR)/json_branch.o \$(OBJDIR)/json_config.o \$(OBJDIR)/json_diff.o \$(OBJDIR)/json_dir.o \$(OBJDIR)/jsos_finfo.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_query.o \$(OBJDIR)/json_report.o \$(OBJDIR)/json_status.o \$(OBJDIR)/json_tag.o \$(OBJDIR)/json_timeline.o \$(OBJDIR)/json_user.o \$(OBJDIR)/json_wiki.o : \$(SRCDIR)/json_detail.h\n" |
| 789 | |
| 790 | writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h" |
| 791 | set opt {-Dmain=sqlite3_shell} |
| 792 | append opt " -Dsqlite3_strglob=strglob" |
| 793 | append opt " -Dgetenv=fossil_getenv" |
| 794 | append opt " -Dfopen=fossil_fopen" |
| 795 | append opt " -DSQLITE_OMIT_LOAD_EXTENSION=1" |
| 796 | writeln "\t\$(XTCC) $opt -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n" |
| 797 | |
| 798 | writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c" |
| 799 | writeln "\t\$(XTCC) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n" |
| 800 | |
| 801 | writeln "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c" |
| @@ -844,11 +866,12 @@ | |
| 844 | CFLAGS = -o |
| 845 | BCC = $(DMDIR)\bin\dmc $(CFLAGS) |
| 846 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) |
| 847 | LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 |
| 848 | } |
| 849 | writeln "SQLITE_OPTIONS = $SQLITE_OPTIONS\n" |
| 850 | writeln -nonewline "SRC = " |
| 851 | foreach s [lsort $src] { |
| 852 | writeln -nonewline "${s}_.c " |
| 853 | } |
| 854 | writeln "\n" |
| @@ -897,14 +920,14 @@ | |
| 897 | |
| 898 | version$E: $B\src\mkversion.c |
| 899 | $(BCC) -o$@ $** |
| 900 | |
| 901 | $(OBJDIR)\shell$O : $(SRCDIR)\shell.c |
| 902 | $(TCC) -o$@ -c -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen $(SQLITE_OPTIONS) $** |
| 903 | |
| 904 | $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 905 | $(TCC) -o$@ -c $(SQLITE_OPTIONS) $** |
| 906 | |
| 907 | $(OBJDIR)\th$O : $(SRCDIR)\th.c |
| 908 | $(TCC) -o$@ -c $** |
| 909 | |
| 910 | $(OBJDIR)\th_lang$O : $(SRCDIR)\th_lang.c |
| @@ -1036,13 +1059,18 @@ | |
| 1036 | RCC = $(RCC) -DFOSSIL_ENABLE_SSL=1 |
| 1037 | LIBS = $(LIBS) $(SSLLIB) |
| 1038 | LIBDIR = $(LIBDIR) -LIBPATH:$(SSLLIBDIR) |
| 1039 | !endif |
| 1040 | } |
| 1041 | regsub -all {[-]D} $SQLITE_OPTIONS {/D} MSC_SQLITE_OPTIONS |
| 1042 | set j " \\\n " |
| 1043 | writeln "SQLITE_OPTIONS = [join $MSC_SQLITE_OPTIONS $j]\n" |
| 1044 | writeln -nonewline "SRC = " |
| 1045 | set i 0 |
| 1046 | foreach s [lsort $src] { |
| 1047 | if {$i > 0} { |
| 1048 | writeln " \\" |
| @@ -1100,14 +1128,14 @@ | |
| 1100 | |
| 1101 | mkversion$E: $B\src\mkversion.c |
| 1102 | $(BCC) $** |
| 1103 | |
| 1104 | $(OX)\shell$O : $(SRCDIR)\shell.c |
| 1105 | $(TCC) /Fo$@ /Dmain=sqlite3_shell /Dsqlite3_strglob=strglob /Dgetenv=fossil_getenv /Dfopen=fossil_fopen $(SQLITE_OPTIONS) -c $(SRCDIR)\shell.c |
| 1106 | |
| 1107 | $(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 1108 | $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $** |
| 1109 | |
| 1110 | $(OX)\th$O : $(SRCDIR)\th.c |
| 1111 | $(TCC) /Fo$@ -c $** |
| 1112 | |
| 1113 | $(OX)\th_lang$O : $(SRCDIR)\th_lang.c |
| @@ -1125,11 +1153,10 @@ | |
| 1125 | -del $(OX)\*.obj |
| 1126 | -del *.obj |
| 1127 | -del *_.c |
| 1128 | -del *.h |
| 1129 | -del *.map |
| 1130 | -del *.manifest |
| 1131 | -del headers |
| 1132 | -del linkopts |
| 1133 | -del *.res |
| 1134 | |
| 1135 | realclean: clean |
| @@ -1193,11 +1220,13 @@ | |
| 1193 | # |
| 1194 | puts "building ../win/Makefile.PellesCGMake" |
| 1195 | set output_file [open ../win/Makefile.PellesCGMake w] |
| 1196 | fconfigure $output_file -translation binary |
| 1197 | |
| 1198 | writeln {# |
| 1199 | ############################################################################## |
| 1200 | # WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "src/makemake.tcl") |
| 1201 | ############################################################################## |
| 1202 | # |
| 1203 | # This file is automatically generated. Instead of editing this |
| @@ -1280,17 +1309,17 @@ | |
| 1280 | |
| 1281 | # define the sqlite files, which need special flags on compile |
| 1282 | SQLITESRC=sqlite3.c |
| 1283 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) |
| 1284 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 1285 | SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED=1 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI |
| 1286 | |
| 1287 | # define the sqlite shell files, which need special flags on compile |
| 1288 | SQLITESHELLSRC=shell.c |
| 1289 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) |
| 1290 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 1291 | SQLITESHELLDEFINES=-Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 |
| 1292 | |
| 1293 | # define the th scripting files, which need special flags on compile |
| 1294 | THSRC=th.c th_lang.c |
| 1295 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 1296 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| @@ -1383,6 +1412,6 @@ | |
| 1383 | del /F $(RESOURCE) |
| 1384 | |
| 1385 | .PHONY: clobber |
| 1386 | clobber: clean |
| 1387 | del /F *.exe |
| 1388 | } |
| 1389 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -125,10 +125,40 @@ | |
| 125 | xfersetup |
| 126 | zip |
| 127 | http_ssl |
| 128 | } |
| 129 | |
| 130 | # Options used to compile the included SQLite library. |
| 131 | # |
| 132 | set SQLITE_OPTIONS { |
| 133 | -DSQLITE_OMIT_LOAD_EXTENSION=1 |
| 134 | -DSQLITE_THREADSAFE=0 |
| 135 | -DSQLITE_DEFAULT_FILE_FORMAT=4 |
| 136 | -DSQLITE_OMIT_DEPRECATED |
| 137 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 138 | -Dlocaltime=fossil_localtime |
| 139 | -DSQLITE_ENABLE_LOCKING_STYLE=0 |
| 140 | } |
| 141 | #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_FTS3=1 |
| 142 | #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_STAT4 |
| 143 | #lappend SQLITE_OPTIONS -DSQLITE_WIN32_NO_ANSI |
| 144 | #lappend SQLITE_OPTIONS -DSQLITE_WINNT_MAX_PATH_CHARS=4096 |
| 145 | |
| 146 | # Options used to compile the included SQLite shell. |
| 147 | # |
| 148 | set SHELL_OPTIONS { |
| 149 | -Dmain=sqlite3_shell |
| 150 | -DSQLITE_OMIT_LOAD_EXTENSION=1 |
| 151 | -Dsqlite3_strglob=strglob |
| 152 | } |
| 153 | |
| 154 | # Options used to compile the included SQLite shell on Windows. |
| 155 | # |
| 156 | set SHELL_WIN32_OPTIONS $SHELL_OPTIONS |
| 157 | lappend SHELL_WIN32_OPTIONS -Dgetenv=fossil_getenv |
| 158 | lappend SHELL_WIN32_OPTIONS -Dfopen=fossil_fopen |
| 159 | |
| 160 | # Name of the final application |
| 161 | # |
| 162 | set name fossil |
| 163 | |
| 164 | # The "writeln" command sends output to the target makefile. |
| @@ -186,11 +216,13 @@ | |
| 216 | } |
| 217 | writeln "\n" |
| 218 | writeln "APPNAME = $name\$(E)" |
| 219 | writeln "\n" |
| 220 | |
| 221 | writeln [string map [list \ |
| 222 | <<<SQLITE_OPTIONS>>> [join $SQLITE_OPTIONS " \\\n "] \ |
| 223 | <<<SHELL_OPTIONS>>> [join $SHELL_OPTIONS " \\\n "]] { |
| 224 | all: $(OBJDIR) $(APPNAME) |
| 225 | |
| 226 | install: $(APPNAME) |
| 227 | mkdir -p $(INSTALLDIR) |
| 228 | mv $(APPNAME) $(INSTALLDIR) |
| @@ -218,10 +250,16 @@ | |
| 250 | |
| 251 | $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion |
| 252 | $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid \ |
| 253 | $(SRCDIR)/../manifest \ |
| 254 | $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h |
| 255 | |
| 256 | # Setup the options used to compile the included SQLite library. |
| 257 | SQLITE_OPTIONS = <<<SQLITE_OPTIONS>>> |
| 258 | |
| 259 | # Setup the options used to compile the included SQLite shell. |
| 260 | SHELL_OPTIONS = <<<SHELL_OPTIONS>>> |
| 261 | |
| 262 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 263 | # to 1. If it is set to 1, then there is no need to build or link |
| 264 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 265 | # using -lsqlite3. |
| @@ -254,11 +292,11 @@ | |
| 292 | # noop |
| 293 | |
| 294 | clean: |
| 295 | rm -rf $(OBJDIR)/* $(APPNAME) |
| 296 | |
| 297 | }] |
| 298 | |
| 299 | set mhargs {} |
| 300 | foreach s [lsort $src] { |
| 301 | append mhargs " \$(OBJDIR)/${s}_.c:\$(OBJDIR)/$s.h" |
| 302 | set extra_h($s) {} |
| @@ -283,29 +321,15 @@ | |
| 321 | writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h $extra_h($s) \$(SRCDIR)/config.h" |
| 322 | writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n" |
| 323 | writeln "\$(OBJDIR)/$s.h:\t\$(OBJDIR)/headers" |
| 324 | } |
| 325 | |
| 326 | writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c" |
| 327 | writeln "\t\$(XTCC) \$(SQLITE_OPTIONS) \$(SQLITE_CFLAGS) -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" |
| 328 | |
| 329 | writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h" |
| 330 | writeln "\t\$(XTCC) \$(SHELL_OPTIONS) \$(SHELL_CFLAGS) -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n" |
| 331 | |
| 332 | writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c" |
| 333 | writeln "\t\$(XTCC) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n" |
| 334 | |
| 335 | writeln "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c" |
| @@ -312,11 +336,10 @@ | |
| 336 | writeln "\t\$(XTCC) -c \$(SRCDIR)/th_lang.c -o \$(OBJDIR)/th_lang.o\n" |
| 337 | |
| 338 | writeln "\$(OBJDIR)/th_tcl.o:\t\$(SRCDIR)/th_tcl.c" |
| 339 | writeln "\t\$(XTCC) -c \$(SRCDIR)/th_tcl.c -o \$(OBJDIR)/th_tcl.o\n" |
| 340 | |
| 341 | writeln { |
| 342 | $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c |
| 343 | $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o |
| 344 | |
| 345 | # |
| @@ -772,30 +795,29 @@ | |
| 795 | writeln "\$(OBJDIR)/$s.o:\t\$(OBJDIR)/${s}_.c \$(OBJDIR)/$s.h $extra_h($s) \$(SRCDIR)/config.h" |
| 796 | writeln "\t\$(XTCC) -o \$(OBJDIR)/$s.o -c \$(OBJDIR)/${s}_.c\n" |
| 797 | writeln "\$(OBJDIR)/${s}.h:\t\$(OBJDIR)/headers\n" |
| 798 | } |
| 799 | |
| 800 | set MINGW_SQLITE_OPTIONS $SQLITE_OPTIONS |
| 801 | lappend MINGW_SQLITE_OPTIONS -D_HAVE_SQLITE_CONFIG_H |
| 802 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MALLOC_H |
| 803 | lappend MINGW_SQLITE_OPTIONS -DSQLITE_USE_MSIZE |
| 804 | |
| 805 | set j " \\\n " |
| 806 | writeln "SQLITE_OPTIONS = [join $MINGW_SQLITE_OPTIONS $j]\n" |
| 807 | set j " \\\n " |
| 808 | writeln "SHELL_OPTIONS = [join $SHELL_WIN32_OPTIONS $j]\n" |
| 809 | |
| 810 | writeln "\$(OBJDIR)/sqlite3.o:\t\$(SRCDIR)/sqlite3.c" |
| 811 | writeln "\t\$(XTCC) \$(SQLITE_OPTIONS) \$(SQLITE_CFLAGS) -c \$(SRCDIR)/sqlite3.c -o \$(OBJDIR)/sqlite3.o\n" |
| 812 | |
| 813 | writeln "\$(OBJDIR)/cson_amalgamation.o:\t\$(SRCDIR)/cson_amalgamation.c" |
| 814 | writeln "\t\$(XTCC) -c \$(SRCDIR)/cson_amalgamation.c -o \$(OBJDIR)/cson_amalgamation.o\n" |
| 815 | writeln "\$(OBJDIR)/json.o \$(OBJDIR)/json_artifact.o \$(OBJDIR)/json_branch.o \$(OBJDIR)/json_config.o \$(OBJDIR)/json_diff.o \$(OBJDIR)/json_dir.o \$(OBJDIR)/jsos_finfo.o \$(OBJDIR)/json_login.o \$(OBJDIR)/json_query.o \$(OBJDIR)/json_report.o \$(OBJDIR)/json_status.o \$(OBJDIR)/json_tag.o \$(OBJDIR)/json_timeline.o \$(OBJDIR)/json_user.o \$(OBJDIR)/json_wiki.o : \$(SRCDIR)/json_detail.h\n" |
| 816 | |
| 817 | writeln "\$(OBJDIR)/shell.o:\t\$(SRCDIR)/shell.c \$(SRCDIR)/sqlite3.h" |
| 818 | writeln "\t\$(XTCC) \$(SHELL_OPTIONS) \$(SHELL_CFLAGS) -c \$(SRCDIR)/shell.c -o \$(OBJDIR)/shell.o\n" |
| 819 | |
| 820 | writeln "\$(OBJDIR)/th.o:\t\$(SRCDIR)/th.c" |
| 821 | writeln "\t\$(XTCC) -c \$(SRCDIR)/th.c -o \$(OBJDIR)/th.o\n" |
| 822 | |
| 823 | writeln "\$(OBJDIR)/th_lang.o:\t\$(SRCDIR)/th_lang.c" |
| @@ -844,11 +866,12 @@ | |
| 866 | CFLAGS = -o |
| 867 | BCC = $(DMDIR)\bin\dmc $(CFLAGS) |
| 868 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) |
| 869 | LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 |
| 870 | } |
| 871 | writeln "SQLITE_OPTIONS = [join $SQLITE_OPTIONS { }]\n" |
| 872 | writeln "SHELL_OPTIONS = [join $SHELL_WIN32_OPTIONS { }]\n" |
| 873 | writeln -nonewline "SRC = " |
| 874 | foreach s [lsort $src] { |
| 875 | writeln -nonewline "${s}_.c " |
| 876 | } |
| 877 | writeln "\n" |
| @@ -897,14 +920,14 @@ | |
| 920 | |
| 921 | version$E: $B\src\mkversion.c |
| 922 | $(BCC) -o$@ $** |
| 923 | |
| 924 | $(OBJDIR)\shell$O : $(SRCDIR)\shell.c |
| 925 | $(TCC) -o$@ -c $(SHELL_OPTIONS) $(SQLITE_OPTIONS) $(SHELL_CFLAGS) $** |
| 926 | |
| 927 | $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 928 | $(TCC) -o$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $** |
| 929 | |
| 930 | $(OBJDIR)\th$O : $(SRCDIR)\th.c |
| 931 | $(TCC) -o$@ -c $** |
| 932 | |
| 933 | $(OBJDIR)\th_lang$O : $(SRCDIR)\th_lang.c |
| @@ -1036,13 +1059,18 @@ | |
| 1059 | RCC = $(RCC) -DFOSSIL_ENABLE_SSL=1 |
| 1060 | LIBS = $(LIBS) $(SSLLIB) |
| 1061 | LIBDIR = $(LIBDIR) -LIBPATH:$(SSLLIBDIR) |
| 1062 | !endif |
| 1063 | } |
| 1064 | regsub -all {[-]D} [join $SQLITE_OPTIONS { }] {/D} MSC_SQLITE_OPTIONS |
| 1065 | set j " \\\n " |
| 1066 | writeln "SQLITE_OPTIONS = [join $MSC_SQLITE_OPTIONS $j]\n" |
| 1067 | |
| 1068 | regsub -all {[-]D} [join $SHELL_WIN32_OPTIONS { }] {/D} MSC_SHELL_OPTIONS |
| 1069 | set j " \\\n " |
| 1070 | writeln "SHELL_OPTIONS = [join $MSC_SHELL_OPTIONS $j]\n" |
| 1071 | |
| 1072 | writeln -nonewline "SRC = " |
| 1073 | set i 0 |
| 1074 | foreach s [lsort $src] { |
| 1075 | if {$i > 0} { |
| 1076 | writeln " \\" |
| @@ -1100,14 +1128,14 @@ | |
| 1128 | |
| 1129 | mkversion$E: $B\src\mkversion.c |
| 1130 | $(BCC) $** |
| 1131 | |
| 1132 | $(OX)\shell$O : $(SRCDIR)\shell.c |
| 1133 | $(TCC) /Fo$@ $(SHELL_OPTIONS) $(SQLITE_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)\shell.c |
| 1134 | |
| 1135 | $(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 1136 | $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $** |
| 1137 | |
| 1138 | $(OX)\th$O : $(SRCDIR)\th.c |
| 1139 | $(TCC) /Fo$@ -c $** |
| 1140 | |
| 1141 | $(OX)\th_lang$O : $(SRCDIR)\th_lang.c |
| @@ -1125,11 +1153,10 @@ | |
| 1153 | -del $(OX)\*.obj |
| 1154 | -del *.obj |
| 1155 | -del *_.c |
| 1156 | -del *.h |
| 1157 | -del *.map |
| 1158 | -del headers |
| 1159 | -del linkopts |
| 1160 | -del *.res |
| 1161 | |
| 1162 | realclean: clean |
| @@ -1193,11 +1220,13 @@ | |
| 1220 | # |
| 1221 | puts "building ../win/Makefile.PellesCGMake" |
| 1222 | set output_file [open ../win/Makefile.PellesCGMake w] |
| 1223 | fconfigure $output_file -translation binary |
| 1224 | |
| 1225 | writeln [string map [list \ |
| 1226 | <<<SQLITE_OPTIONS>>> [join $SQLITE_OPTIONS { }] \ |
| 1227 | <<<SHELL_OPTIONS>>> [join $SHELL_WIN32_OPTIONS { }]] {# |
| 1228 | ############################################################################## |
| 1229 | # WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "src/makemake.tcl") |
| 1230 | ############################################################################## |
| 1231 | # |
| 1232 | # This file is automatically generated. Instead of editing this |
| @@ -1280,17 +1309,17 @@ | |
| 1309 | |
| 1310 | # define the sqlite files, which need special flags on compile |
| 1311 | SQLITESRC=sqlite3.c |
| 1312 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) |
| 1313 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 1314 | SQLITEDEFINES=<<<SQLITE_OPTIONS>>> |
| 1315 | |
| 1316 | # define the sqlite shell files, which need special flags on compile |
| 1317 | SQLITESHELLSRC=shell.c |
| 1318 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) |
| 1319 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 1320 | SQLITESHELLDEFINES=<<<SHELL_OPTIONS>>> |
| 1321 | |
| 1322 | # define the th scripting files, which need special flags on compile |
| 1323 | THSRC=th.c th_lang.c |
| 1324 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 1325 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| @@ -1383,6 +1412,6 @@ | |
| 1412 | del /F $(RESOURCE) |
| 1413 | |
| 1414 | .PHONY: clobber |
| 1415 | clobber: clean |
| 1416 | del /F *.exe |
| 1417 | }] |
| 1418 |
+2
-2
| --- win/Makefile.PellesCGMake | ||
| +++ win/Makefile.PellesCGMake | ||
| @@ -83,17 +83,17 @@ | ||
| 83 | 83 | |
| 84 | 84 | # define the sqlite files, which need special flags on compile |
| 85 | 85 | SQLITESRC=sqlite3.c |
| 86 | 86 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) |
| 87 | 87 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 88 | -SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED=1 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI | |
| 88 | +SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 | |
| 89 | 89 | |
| 90 | 90 | # define the sqlite shell files, which need special flags on compile |
| 91 | 91 | SQLITESHELLSRC=shell.c |
| 92 | 92 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) |
| 93 | 93 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 94 | -SQLITESHELLDEFINES=-Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 | |
| 94 | +SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen | |
| 95 | 95 | |
| 96 | 96 | # define the th scripting files, which need special flags on compile |
| 97 | 97 | THSRC=th.c th_lang.c |
| 98 | 98 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 99 | 99 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| 100 | 100 |
| --- win/Makefile.PellesCGMake | |
| +++ win/Makefile.PellesCGMake | |
| @@ -83,17 +83,17 @@ | |
| 83 | |
| 84 | # define the sqlite files, which need special flags on compile |
| 85 | SQLITESRC=sqlite3.c |
| 86 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) |
| 87 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 88 | SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED=1 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI |
| 89 | |
| 90 | # define the sqlite shell files, which need special flags on compile |
| 91 | SQLITESHELLSRC=shell.c |
| 92 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) |
| 93 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 94 | SQLITESHELLDEFINES=-Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 |
| 95 | |
| 96 | # define the th scripting files, which need special flags on compile |
| 97 | THSRC=th.c th_lang.c |
| 98 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 99 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| 100 |
| --- win/Makefile.PellesCGMake | |
| +++ win/Makefile.PellesCGMake | |
| @@ -83,17 +83,17 @@ | |
| 83 | |
| 84 | # define the sqlite files, which need special flags on compile |
| 85 | SQLITESRC=sqlite3.c |
| 86 | ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) |
| 87 | SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) |
| 88 | SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 |
| 89 | |
| 90 | # define the sqlite shell files, which need special flags on compile |
| 91 | SQLITESHELLSRC=shell.c |
| 92 | ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) |
| 93 | SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) |
| 94 | SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 95 | |
| 96 | # define the th scripting files, which need special flags on compile |
| 97 | THSRC=th.c th_lang.c |
| 98 | ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf)) |
| 99 | THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj)) |
| 100 |
+5
-3
| --- win/Makefile.dmc | ||
| +++ win/Makefile.dmc | ||
| @@ -24,11 +24,13 @@ | ||
| 24 | 24 | CFLAGS = -o |
| 25 | 25 | BCC = $(DMDIR)\bin\dmc $(CFLAGS) |
| 26 | 26 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) |
| 27 | 27 | LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 |
| 28 | 28 | |
| 29 | -SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI | |
| 29 | +SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 | |
| 30 | + | |
| 31 | +SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen | |
| 30 | 32 | |
| 31 | 33 | SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c |
| 32 | 34 | |
| 33 | 35 | OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O |
| 34 | 36 | |
| @@ -66,14 +68,14 @@ | ||
| 66 | 68 | |
| 67 | 69 | version$E: $B\src\mkversion.c |
| 68 | 70 | $(BCC) -o$@ $** |
| 69 | 71 | |
| 70 | 72 | $(OBJDIR)\shell$O : $(SRCDIR)\shell.c |
| 71 | - $(TCC) -o$@ -c -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen $(SQLITE_OPTIONS) $** | |
| 73 | + $(TCC) -o$@ -c $(SHELL_OPTIONS) $(SQLITE_OPTIONS) $(SHELL_CFLAGS) $** | |
| 72 | 74 | |
| 73 | 75 | $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 74 | - $(TCC) -o$@ -c $(SQLITE_OPTIONS) $** | |
| 76 | + $(TCC) -o$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $** | |
| 75 | 77 | |
| 76 | 78 | $(OBJDIR)\th$O : $(SRCDIR)\th.c |
| 77 | 79 | $(TCC) -o$@ -c $** |
| 78 | 80 | |
| 79 | 81 | $(OBJDIR)\th_lang$O : $(SRCDIR)\th_lang.c |
| 80 | 82 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -24,11 +24,13 @@ | |
| 24 | CFLAGS = -o |
| 25 | BCC = $(DMDIR)\bin\dmc $(CFLAGS) |
| 26 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) |
| 27 | LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 |
| 28 | |
| 29 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI |
| 30 | |
| 31 | SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c |
| 32 | |
| 33 | OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O |
| 34 | |
| @@ -66,14 +68,14 @@ | |
| 66 | |
| 67 | version$E: $B\src\mkversion.c |
| 68 | $(BCC) -o$@ $** |
| 69 | |
| 70 | $(OBJDIR)\shell$O : $(SRCDIR)\shell.c |
| 71 | $(TCC) -o$@ -c -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen $(SQLITE_OPTIONS) $** |
| 72 | |
| 73 | $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 74 | $(TCC) -o$@ -c $(SQLITE_OPTIONS) $** |
| 75 | |
| 76 | $(OBJDIR)\th$O : $(SRCDIR)\th.c |
| 77 | $(TCC) -o$@ -c $** |
| 78 | |
| 79 | $(OBJDIR)\th_lang$O : $(SRCDIR)\th_lang.c |
| 80 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -24,11 +24,13 @@ | |
| 24 | CFLAGS = -o |
| 25 | BCC = $(DMDIR)\bin\dmc $(CFLAGS) |
| 26 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) |
| 27 | LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 |
| 28 | |
| 29 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 |
| 30 | |
| 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | |
| 33 | SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c |
| 34 | |
| 35 | OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O |
| 36 | |
| @@ -66,14 +68,14 @@ | |
| 68 | |
| 69 | version$E: $B\src\mkversion.c |
| 70 | $(BCC) -o$@ $** |
| 71 | |
| 72 | $(OBJDIR)\shell$O : $(SRCDIR)\shell.c |
| 73 | $(TCC) -o$@ -c $(SHELL_OPTIONS) $(SQLITE_OPTIONS) $(SHELL_CFLAGS) $** |
| 74 | |
| 75 | $(OBJDIR)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 76 | $(TCC) -o$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $** |
| 77 | |
| 78 | $(OBJDIR)\th$O : $(SRCDIR)\th.c |
| 79 | $(TCC) -o$@ -c $** |
| 80 | |
| 81 | $(OBJDIR)\th_lang$O : $(SRCDIR)\th_lang.c |
| 82 |
+22
-5
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -13,15 +13,15 @@ | ||
| 13 | 13 | # |
| 14 | 14 | |
| 15 | 15 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | 17 | # |
| 18 | -PREFIX = | |
| 18 | +# PREFIX = | |
| 19 | 19 | # PREFIX = mingw32- |
| 20 | 20 | # PREFIX = i686-pc-mingw32- |
| 21 | 21 | # PREFIX = i686-w64-mingw32- |
| 22 | -# PREFIX = x86_64-w64-mingw32- | |
| 22 | +PREFIX = x86_64-w64-mingw32- | |
| 23 | 23 | |
| 24 | 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | 25 | # in a directory that is separate from the source tree. Just change |
| 26 | 26 | # the following to point from the build directory to the src/ folder. |
| 27 | 27 | # |
| @@ -1685,21 +1685,38 @@ | ||
| 1685 | 1685 | |
| 1686 | 1686 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1687 | 1687 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1688 | 1688 | |
| 1689 | 1689 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1690 | + | |
| 1691 | +SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \ | |
| 1692 | + -DSQLITE_THREADSAFE=0 \ | |
| 1693 | + -DSQLITE_DEFAULT_FILE_FORMAT=4 \ | |
| 1694 | + -DSQLITE_OMIT_DEPRECATED \ | |
| 1695 | + -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ | |
| 1696 | + -Dlocaltime=fossil_localtime \ | |
| 1697 | + -DSQLITE_ENABLE_LOCKING_STYLE=0 \ | |
| 1698 | + -D_HAVE_SQLITE_CONFIG_H \ | |
| 1699 | + -DSQLITE_USE_MALLOC_H \ | |
| 1700 | + -DSQLITE_USE_MSIZE | |
| 1701 | + | |
| 1702 | +SHELL_OPTIONS = -Dmain=sqlite3_shell \ | |
| 1703 | + -DSQLITE_OMIT_LOAD_EXTENSION=1 \ | |
| 1704 | + -Dsqlite3_strglob=strglob \ | |
| 1705 | + -Dgetenv=fossil_getenv \ | |
| 1706 | + -Dfopen=fossil_fopen | |
| 1690 | 1707 | |
| 1691 | 1708 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1692 | - $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -D_HAVE_SQLITE_CONFIG_H -DSQLITE_USE_MALLOC_H -DSQLITE_USE_MSIZE -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o | |
| 1709 | + $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o | |
| 1693 | 1710 | |
| 1694 | 1711 | $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c |
| 1695 | - $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o | |
| 1712 | + $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o | |
| 1696 | 1713 | |
| 1697 | 1714 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h |
| 1698 | 1715 | |
| 1699 | 1716 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1700 | - $(XTCC) -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o | |
| 1717 | + $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o | |
| 1701 | 1718 | |
| 1702 | 1719 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1703 | 1720 | $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o |
| 1704 | 1721 | |
| 1705 | 1722 | $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c |
| 1706 | 1723 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -13,15 +13,15 @@ | |
| 13 | # |
| 14 | |
| 15 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | # |
| 18 | PREFIX = |
| 19 | # PREFIX = mingw32- |
| 20 | # PREFIX = i686-pc-mingw32- |
| 21 | # PREFIX = i686-w64-mingw32- |
| 22 | # PREFIX = x86_64-w64-mingw32- |
| 23 | |
| 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | # in a directory that is separate from the source tree. Just change |
| 26 | # the following to point from the build directory to the src/ folder. |
| 27 | # |
| @@ -1685,21 +1685,38 @@ | |
| 1685 | |
| 1686 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1687 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1688 | |
| 1689 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1690 | |
| 1691 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1692 | $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -D_HAVE_SQLITE_CONFIG_H -DSQLITE_USE_MALLOC_H -DSQLITE_USE_MSIZE -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1693 | |
| 1694 | $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c |
| 1695 | $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o |
| 1696 | |
| 1697 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h |
| 1698 | |
| 1699 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1700 | $(XTCC) -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o |
| 1701 | |
| 1702 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1703 | $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o |
| 1704 | |
| 1705 | $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c |
| 1706 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -13,15 +13,15 @@ | |
| 13 | # |
| 14 | |
| 15 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | # |
| 18 | # PREFIX = |
| 19 | # PREFIX = mingw32- |
| 20 | # PREFIX = i686-pc-mingw32- |
| 21 | # PREFIX = i686-w64-mingw32- |
| 22 | PREFIX = x86_64-w64-mingw32- |
| 23 | |
| 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | # in a directory that is separate from the source tree. Just change |
| 26 | # the following to point from the build directory to the src/ folder. |
| 27 | # |
| @@ -1685,21 +1685,38 @@ | |
| 1685 | |
| 1686 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1687 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1688 | |
| 1689 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1690 | |
| 1691 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1692 | -DSQLITE_THREADSAFE=0 \ |
| 1693 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1694 | -DSQLITE_OMIT_DEPRECATED \ |
| 1695 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1696 | -Dlocaltime=fossil_localtime \ |
| 1697 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1698 | -D_HAVE_SQLITE_CONFIG_H \ |
| 1699 | -DSQLITE_USE_MALLOC_H \ |
| 1700 | -DSQLITE_USE_MSIZE |
| 1701 | |
| 1702 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1703 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1704 | -Dsqlite3_strglob=strglob \ |
| 1705 | -Dgetenv=fossil_getenv \ |
| 1706 | -Dfopen=fossil_fopen |
| 1707 | |
| 1708 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1709 | $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1710 | |
| 1711 | $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c |
| 1712 | $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o |
| 1713 | |
| 1714 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h |
| 1715 | |
| 1716 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1717 | $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o |
| 1718 | |
| 1719 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1720 | $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o |
| 1721 | |
| 1722 | $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c |
| 1723 |
+22
-5
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -13,15 +13,15 @@ | ||
| 13 | 13 | # |
| 14 | 14 | |
| 15 | 15 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | 17 | # |
| 18 | -PREFIX = | |
| 18 | +# PREFIX = | |
| 19 | 19 | # PREFIX = mingw32- |
| 20 | 20 | # PREFIX = i686-pc-mingw32- |
| 21 | 21 | # PREFIX = i686-w64-mingw32- |
| 22 | -# PREFIX = x86_64-w64-mingw32- | |
| 22 | +PREFIX = x86_64-w64-mingw32- | |
| 23 | 23 | |
| 24 | 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | 25 | # in a directory that is separate from the source tree. Just change |
| 26 | 26 | # the following to point from the build directory to the src/ folder. |
| 27 | 27 | # |
| @@ -1685,21 +1685,38 @@ | ||
| 1685 | 1685 | |
| 1686 | 1686 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1687 | 1687 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1688 | 1688 | |
| 1689 | 1689 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1690 | + | |
| 1691 | +SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \ | |
| 1692 | + -DSQLITE_THREADSAFE=0 \ | |
| 1693 | + -DSQLITE_DEFAULT_FILE_FORMAT=4 \ | |
| 1694 | + -DSQLITE_OMIT_DEPRECATED \ | |
| 1695 | + -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ | |
| 1696 | + -Dlocaltime=fossil_localtime \ | |
| 1697 | + -DSQLITE_ENABLE_LOCKING_STYLE=0 \ | |
| 1698 | + -D_HAVE_SQLITE_CONFIG_H \ | |
| 1699 | + -DSQLITE_USE_MALLOC_H \ | |
| 1700 | + -DSQLITE_USE_MSIZE | |
| 1701 | + | |
| 1702 | +SHELL_OPTIONS = -Dmain=sqlite3_shell \ | |
| 1703 | + -DSQLITE_OMIT_LOAD_EXTENSION=1 \ | |
| 1704 | + -Dsqlite3_strglob=strglob \ | |
| 1705 | + -Dgetenv=fossil_getenv \ | |
| 1706 | + -Dfopen=fossil_fopen | |
| 1690 | 1707 | |
| 1691 | 1708 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1692 | - $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -D_HAVE_SQLITE_CONFIG_H -DSQLITE_USE_MALLOC_H -DSQLITE_USE_MSIZE -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o | |
| 1709 | + $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o | |
| 1693 | 1710 | |
| 1694 | 1711 | $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c |
| 1695 | - $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o | |
| 1712 | + $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o | |
| 1696 | 1713 | |
| 1697 | 1714 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h |
| 1698 | 1715 | |
| 1699 | 1716 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1700 | - $(XTCC) -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o | |
| 1717 | + $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o | |
| 1701 | 1718 | |
| 1702 | 1719 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1703 | 1720 | $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o |
| 1704 | 1721 | |
| 1705 | 1722 | $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c |
| 1706 | 1723 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -13,15 +13,15 @@ | |
| 13 | # |
| 14 | |
| 15 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | # |
| 18 | PREFIX = |
| 19 | # PREFIX = mingw32- |
| 20 | # PREFIX = i686-pc-mingw32- |
| 21 | # PREFIX = i686-w64-mingw32- |
| 22 | # PREFIX = x86_64-w64-mingw32- |
| 23 | |
| 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | # in a directory that is separate from the source tree. Just change |
| 26 | # the following to point from the build directory to the src/ folder. |
| 27 | # |
| @@ -1685,21 +1685,38 @@ | |
| 1685 | |
| 1686 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1687 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1688 | |
| 1689 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1690 | |
| 1691 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1692 | $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -D_HAVE_SQLITE_CONFIG_H -DSQLITE_USE_MALLOC_H -DSQLITE_USE_MSIZE -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1693 | |
| 1694 | $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c |
| 1695 | $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o |
| 1696 | |
| 1697 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h |
| 1698 | |
| 1699 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1700 | $(XTCC) -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o |
| 1701 | |
| 1702 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1703 | $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o |
| 1704 | |
| 1705 | $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c |
| 1706 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -13,15 +13,15 @@ | |
| 13 | # |
| 14 | |
| 15 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | # |
| 18 | # PREFIX = |
| 19 | # PREFIX = mingw32- |
| 20 | # PREFIX = i686-pc-mingw32- |
| 21 | # PREFIX = i686-w64-mingw32- |
| 22 | PREFIX = x86_64-w64-mingw32- |
| 23 | |
| 24 | #### The toplevel directory of the source tree. Fossil can be built |
| 25 | # in a directory that is separate from the source tree. Just change |
| 26 | # the following to point from the build directory to the src/ folder. |
| 27 | # |
| @@ -1685,21 +1685,38 @@ | |
| 1685 | |
| 1686 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1687 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1688 | |
| 1689 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1690 | |
| 1691 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1692 | -DSQLITE_THREADSAFE=0 \ |
| 1693 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1694 | -DSQLITE_OMIT_DEPRECATED \ |
| 1695 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1696 | -Dlocaltime=fossil_localtime \ |
| 1697 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1698 | -D_HAVE_SQLITE_CONFIG_H \ |
| 1699 | -DSQLITE_USE_MALLOC_H \ |
| 1700 | -DSQLITE_USE_MSIZE |
| 1701 | |
| 1702 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1703 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1704 | -Dsqlite3_strglob=strglob \ |
| 1705 | -Dgetenv=fossil_getenv \ |
| 1706 | -Dfopen=fossil_fopen |
| 1707 | |
| 1708 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1709 | $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1710 | |
| 1711 | $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c |
| 1712 | $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o |
| 1713 | |
| 1714 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h |
| 1715 | |
| 1716 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1717 | $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o |
| 1718 | |
| 1719 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1720 | $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o |
| 1721 | |
| 1722 | $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c |
| 1723 |
+20
-3
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -1685,21 +1685,38 @@ | ||
| 1685 | 1685 | |
| 1686 | 1686 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1687 | 1687 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1688 | 1688 | |
| 1689 | 1689 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1690 | + | |
| 1691 | +SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \ | |
| 1692 | + -DSQLITE_THREADSAFE=0 \ | |
| 1693 | + -DSQLITE_DEFAULT_FILE_FORMAT=4 \ | |
| 1694 | + -DSQLITE_OMIT_DEPRECATED \ | |
| 1695 | + -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ | |
| 1696 | + -Dlocaltime=fossil_localtime \ | |
| 1697 | + -DSQLITE_ENABLE_LOCKING_STYLE=0 \ | |
| 1698 | + -D_HAVE_SQLITE_CONFIG_H \ | |
| 1699 | + -DSQLITE_USE_MALLOC_H \ | |
| 1700 | + -DSQLITE_USE_MSIZE | |
| 1701 | + | |
| 1702 | +SHELL_OPTIONS = -Dmain=sqlite3_shell \ | |
| 1703 | + -DSQLITE_OMIT_LOAD_EXTENSION=1 \ | |
| 1704 | + -Dsqlite3_strglob=strglob \ | |
| 1705 | + -Dgetenv=fossil_getenv \ | |
| 1706 | + -Dfopen=fossil_fopen | |
| 1690 | 1707 | |
| 1691 | 1708 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1692 | - $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -D_HAVE_SQLITE_CONFIG_H -DSQLITE_USE_MALLOC_H -DSQLITE_USE_MSIZE -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o | |
| 1709 | + $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o | |
| 1693 | 1710 | |
| 1694 | 1711 | $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c |
| 1695 | - $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o | |
| 1712 | + $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o | |
| 1696 | 1713 | |
| 1697 | 1714 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h |
| 1698 | 1715 | |
| 1699 | 1716 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1700 | - $(XTCC) -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o | |
| 1717 | + $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o | |
| 1701 | 1718 | |
| 1702 | 1719 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1703 | 1720 | $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o |
| 1704 | 1721 | |
| 1705 | 1722 | $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c |
| 1706 | 1723 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -1685,21 +1685,38 @@ | |
| 1685 | |
| 1686 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1687 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1688 | |
| 1689 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1690 | |
| 1691 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1692 | $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WIN32_NO_ANSI -D_HAVE_SQLITE_CONFIG_H -DSQLITE_USE_MALLOC_H -DSQLITE_USE_MSIZE -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1693 | |
| 1694 | $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c |
| 1695 | $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o |
| 1696 | |
| 1697 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h |
| 1698 | |
| 1699 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1700 | $(XTCC) -Dmain=sqlite3_shell -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o |
| 1701 | |
| 1702 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1703 | $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o |
| 1704 | |
| 1705 | $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c |
| 1706 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -1685,21 +1685,38 @@ | |
| 1685 | |
| 1686 | $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h |
| 1687 | $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c |
| 1688 | |
| 1689 | $(OBJDIR)/zip.h: $(OBJDIR)/headers |
| 1690 | |
| 1691 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1692 | -DSQLITE_THREADSAFE=0 \ |
| 1693 | -DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 1694 | -DSQLITE_OMIT_DEPRECATED \ |
| 1695 | -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 1696 | -Dlocaltime=fossil_localtime \ |
| 1697 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 1698 | -D_HAVE_SQLITE_CONFIG_H \ |
| 1699 | -DSQLITE_USE_MALLOC_H \ |
| 1700 | -DSQLITE_USE_MSIZE |
| 1701 | |
| 1702 | SHELL_OPTIONS = -Dmain=sqlite3_shell \ |
| 1703 | -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 1704 | -Dsqlite3_strglob=strglob \ |
| 1705 | -Dgetenv=fossil_getenv \ |
| 1706 | -Dfopen=fossil_fopen |
| 1707 | |
| 1708 | $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c |
| 1709 | $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o |
| 1710 | |
| 1711 | $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c |
| 1712 | $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o |
| 1713 | |
| 1714 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/jsos_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h |
| 1715 | |
| 1716 | $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h |
| 1717 | $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o |
| 1718 | |
| 1719 | $(OBJDIR)/th.o: $(SRCDIR)/th.c |
| 1720 | $(XTCC) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o |
| 1721 | |
| 1722 | $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c |
| 1723 |
+9
-5
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -70,12 +70,17 @@ | ||
| 70 | 70 | /DSQLITE_THREADSAFE=0 \ |
| 71 | 71 | /DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 72 | 72 | /DSQLITE_OMIT_DEPRECATED \ |
| 73 | 73 | /DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 74 | 74 | /Dlocaltime=fossil_localtime \ |
| 75 | - /DSQLITE_ENABLE_LOCKING_STYLE=0 \ | |
| 76 | - /DSQLITE_WIN32_NO_ANSI | |
| 75 | + /DSQLITE_ENABLE_LOCKING_STYLE=0 | |
| 76 | + | |
| 77 | +SHELL_OPTIONS = /Dmain=sqlite3_shell \ | |
| 78 | + /DSQLITE_OMIT_LOAD_EXTENSION=1 \ | |
| 79 | + /Dsqlite3_strglob=strglob \ | |
| 80 | + /Dgetenv=fossil_getenv \ | |
| 81 | + /Dfopen=fossil_fopen | |
| 77 | 82 | |
| 78 | 83 | SRC = add_.c \ |
| 79 | 84 | allrepo_.c \ |
| 80 | 85 | attach_.c \ |
| 81 | 86 | bag_.c \ |
| @@ -441,14 +446,14 @@ | ||
| 441 | 446 | |
| 442 | 447 | mkversion$E: $B\src\mkversion.c |
| 443 | 448 | $(BCC) $** |
| 444 | 449 | |
| 445 | 450 | $(OX)\shell$O : $(SRCDIR)\shell.c |
| 446 | - $(TCC) /Fo$@ /Dmain=sqlite3_shell /Dsqlite3_strglob=strglob /Dgetenv=fossil_getenv /Dfopen=fossil_fopen $(SQLITE_OPTIONS) -c $(SRCDIR)\shell.c | |
| 451 | + $(TCC) /Fo$@ $(SHELL_OPTIONS) $(SQLITE_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)\shell.c | |
| 447 | 452 | |
| 448 | 453 | $(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 449 | - $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $** | |
| 454 | + $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $** | |
| 450 | 455 | |
| 451 | 456 | $(OX)\th$O : $(SRCDIR)\th.c |
| 452 | 457 | $(TCC) /Fo$@ -c $** |
| 453 | 458 | |
| 454 | 459 | $(OX)\th_lang$O : $(SRCDIR)\th_lang.c |
| @@ -466,11 +471,10 @@ | ||
| 466 | 471 | -del $(OX)\*.obj |
| 467 | 472 | -del *.obj |
| 468 | 473 | -del *_.c |
| 469 | 474 | -del *.h |
| 470 | 475 | -del *.map |
| 471 | - -del *.manifest | |
| 472 | 476 | -del headers |
| 473 | 477 | -del linkopts |
| 474 | 478 | -del *.res |
| 475 | 479 | |
| 476 | 480 | realclean: clean |
| 477 | 481 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -70,12 +70,17 @@ | |
| 70 | /DSQLITE_THREADSAFE=0 \ |
| 71 | /DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 72 | /DSQLITE_OMIT_DEPRECATED \ |
| 73 | /DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 74 | /Dlocaltime=fossil_localtime \ |
| 75 | /DSQLITE_ENABLE_LOCKING_STYLE=0 \ |
| 76 | /DSQLITE_WIN32_NO_ANSI |
| 77 | |
| 78 | SRC = add_.c \ |
| 79 | allrepo_.c \ |
| 80 | attach_.c \ |
| 81 | bag_.c \ |
| @@ -441,14 +446,14 @@ | |
| 441 | |
| 442 | mkversion$E: $B\src\mkversion.c |
| 443 | $(BCC) $** |
| 444 | |
| 445 | $(OX)\shell$O : $(SRCDIR)\shell.c |
| 446 | $(TCC) /Fo$@ /Dmain=sqlite3_shell /Dsqlite3_strglob=strglob /Dgetenv=fossil_getenv /Dfopen=fossil_fopen $(SQLITE_OPTIONS) -c $(SRCDIR)\shell.c |
| 447 | |
| 448 | $(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 449 | $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $** |
| 450 | |
| 451 | $(OX)\th$O : $(SRCDIR)\th.c |
| 452 | $(TCC) /Fo$@ -c $** |
| 453 | |
| 454 | $(OX)\th_lang$O : $(SRCDIR)\th_lang.c |
| @@ -466,11 +471,10 @@ | |
| 466 | -del $(OX)\*.obj |
| 467 | -del *.obj |
| 468 | -del *_.c |
| 469 | -del *.h |
| 470 | -del *.map |
| 471 | -del *.manifest |
| 472 | -del headers |
| 473 | -del linkopts |
| 474 | -del *.res |
| 475 | |
| 476 | realclean: clean |
| 477 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -70,12 +70,17 @@ | |
| 70 | /DSQLITE_THREADSAFE=0 \ |
| 71 | /DSQLITE_DEFAULT_FILE_FORMAT=4 \ |
| 72 | /DSQLITE_OMIT_DEPRECATED \ |
| 73 | /DSQLITE_ENABLE_EXPLAIN_COMMENTS \ |
| 74 | /Dlocaltime=fossil_localtime \ |
| 75 | /DSQLITE_ENABLE_LOCKING_STYLE=0 |
| 76 | |
| 77 | SHELL_OPTIONS = /Dmain=sqlite3_shell \ |
| 78 | /DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
| 79 | /Dsqlite3_strglob=strglob \ |
| 80 | /Dgetenv=fossil_getenv \ |
| 81 | /Dfopen=fossil_fopen |
| 82 | |
| 83 | SRC = add_.c \ |
| 84 | allrepo_.c \ |
| 85 | attach_.c \ |
| 86 | bag_.c \ |
| @@ -441,14 +446,14 @@ | |
| 446 | |
| 447 | mkversion$E: $B\src\mkversion.c |
| 448 | $(BCC) $** |
| 449 | |
| 450 | $(OX)\shell$O : $(SRCDIR)\shell.c |
| 451 | $(TCC) /Fo$@ $(SHELL_OPTIONS) $(SQLITE_OPTIONS) $(SHELL_CFLAGS) -c $(SRCDIR)\shell.c |
| 452 | |
| 453 | $(OX)\sqlite3$O : $(SRCDIR)\sqlite3.c |
| 454 | $(TCC) /Fo$@ -c $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) $** |
| 455 | |
| 456 | $(OX)\th$O : $(SRCDIR)\th.c |
| 457 | $(TCC) /Fo$@ -c $** |
| 458 | |
| 459 | $(OX)\th_lang$O : $(SRCDIR)\th_lang.c |
| @@ -466,11 +471,10 @@ | |
| 471 | -del $(OX)\*.obj |
| 472 | -del *.obj |
| 473 | -del *_.c |
| 474 | -del *.h |
| 475 | -del *.map |
| 476 | -del headers |
| 477 | -del linkopts |
| 478 | -del *.res |
| 479 | |
| 480 | realclean: clean |
| 481 |