Fossil SCM
Allow CFLAGS override without duplicating compile options by default
Commit
09f41885d67708c8534cdc863184272e93f1d5211c3209b8fc9a4663c39900ea
Parent
d216ea9a8466de3…
5 files changed
+3
+2
-2
+2
+2
-2
+2
-2
+3
| --- Makefile.classic | ||
| +++ Makefile.classic | ||
| @@ -19,10 +19,11 @@ | ||
| 19 | 19 | # will run on the platform that is doing the build. This is used |
| 20 | 20 | # to compile code-generator programs as part of the build process. |
| 21 | 21 | # See TCC below for the C compiler for building the finished binary. |
| 22 | 22 | # |
| 23 | 23 | BCC = gcc |
| 24 | +BCCFLAGS = $(CFLAGS) | |
| 24 | 25 | |
| 25 | 26 | #### The suffix to add to final executable file. When cross-compiling |
| 26 | 27 | # to windows, make this ".exe". Otherwise leave it blank. |
| 27 | 28 | # |
| 28 | 29 | E = |
| @@ -49,10 +50,12 @@ | ||
| 49 | 50 | |
| 50 | 51 | #### We sometimes add the -static option here so that we can build a |
| 51 | 52 | # static executable that will run in a chroot jail. |
| 52 | 53 | #LIB = -static |
| 53 | 54 | TCC += -DFOSSIL_DYNAMIC_BUILD=1 |
| 55 | + | |
| 56 | +TCCFLAGS = $(CFLAGS) | |
| 54 | 57 | |
| 55 | 58 | #### Extra arguments for linking the finished binary. Fossil needs |
| 56 | 59 | # to link against the Z-Lib compression library unless the miniz |
| 57 | 60 | # library in the source tree is being used. There are no other |
| 58 | 61 | # required dependencies. |
| 59 | 62 |
| --- Makefile.classic | |
| +++ Makefile.classic | |
| @@ -19,10 +19,11 @@ | |
| 19 | # will run on the platform that is doing the build. This is used |
| 20 | # to compile code-generator programs as part of the build process. |
| 21 | # See TCC below for the C compiler for building the finished binary. |
| 22 | # |
| 23 | BCC = gcc |
| 24 | |
| 25 | #### The suffix to add to final executable file. When cross-compiling |
| 26 | # to windows, make this ".exe". Otherwise leave it blank. |
| 27 | # |
| 28 | E = |
| @@ -49,10 +50,12 @@ | |
| 49 | |
| 50 | #### We sometimes add the -static option here so that we can build a |
| 51 | # static executable that will run in a chroot jail. |
| 52 | #LIB = -static |
| 53 | TCC += -DFOSSIL_DYNAMIC_BUILD=1 |
| 54 | |
| 55 | #### Extra arguments for linking the finished binary. Fossil needs |
| 56 | # to link against the Z-Lib compression library unless the miniz |
| 57 | # library in the source tree is being used. There are no other |
| 58 | # required dependencies. |
| 59 |
| --- Makefile.classic | |
| +++ Makefile.classic | |
| @@ -19,10 +19,11 @@ | |
| 19 | # will run on the platform that is doing the build. This is used |
| 20 | # to compile code-generator programs as part of the build process. |
| 21 | # See TCC below for the C compiler for building the finished binary. |
| 22 | # |
| 23 | BCC = gcc |
| 24 | BCCFLAGS = $(CFLAGS) |
| 25 | |
| 26 | #### The suffix to add to final executable file. When cross-compiling |
| 27 | # to windows, make this ".exe". Otherwise leave it blank. |
| 28 | # |
| 29 | E = |
| @@ -49,10 +50,12 @@ | |
| 50 | |
| 51 | #### We sometimes add the -static option here so that we can build a |
| 52 | # static executable that will run in a chroot jail. |
| 53 | #LIB = -static |
| 54 | TCC += -DFOSSIL_DYNAMIC_BUILD=1 |
| 55 | |
| 56 | TCCFLAGS = $(CFLAGS) |
| 57 | |
| 58 | #### Extra arguments for linking the finished binary. Fossil needs |
| 59 | # to link against the Z-Lib compression library unless the miniz |
| 60 | # library in the source tree is being used. There are no other |
| 61 | # required dependencies. |
| 62 |
+2
-2
| --- Makefile.in | ||
| +++ Makefile.in | ||
| @@ -38,12 +38,12 @@ | ||
| 38 | 38 | # |
| 39 | 39 | TCLSH = tclsh |
| 40 | 40 | |
| 41 | 41 | CFLAGS = @CFLAGS@ |
| 42 | 42 | LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ |
| 43 | -BCCFLAGS = @CPPFLAGS@ @CFLAGS@ | |
| 44 | -TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 43 | +BCCFLAGS = @CPPFLAGS@ $(CFLAGS) | |
| 44 | +TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ $(CFLAGS) -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 45 | 45 | INSTALLDIR = $(DESTDIR)@prefix@/bin |
| 46 | 46 | USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ |
| 47 | 47 | USE_LINENOISE = @USE_LINENOISE@ |
| 48 | 48 | USE_MMAN_H = @USE_MMAN_H@ |
| 49 | 49 | USE_SEE = @USE_SEE@ |
| 50 | 50 |
| --- Makefile.in | |
| +++ Makefile.in | |
| @@ -38,12 +38,12 @@ | |
| 38 | # |
| 39 | TCLSH = tclsh |
| 40 | |
| 41 | CFLAGS = @CFLAGS@ |
| 42 | LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ |
| 43 | BCCFLAGS = @CPPFLAGS@ @CFLAGS@ |
| 44 | TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 45 | INSTALLDIR = $(DESTDIR)@prefix@/bin |
| 46 | USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ |
| 47 | USE_LINENOISE = @USE_LINENOISE@ |
| 48 | USE_MMAN_H = @USE_MMAN_H@ |
| 49 | USE_SEE = @USE_SEE@ |
| 50 |
| --- Makefile.in | |
| +++ Makefile.in | |
| @@ -38,12 +38,12 @@ | |
| 38 | # |
| 39 | TCLSH = tclsh |
| 40 | |
| 41 | CFLAGS = @CFLAGS@ |
| 42 | LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ |
| 43 | BCCFLAGS = @CPPFLAGS@ $(CFLAGS) |
| 44 | TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ $(CFLAGS) -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 45 | INSTALLDIR = $(DESTDIR)@prefix@/bin |
| 46 | USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ |
| 47 | USE_LINENOISE = @USE_LINENOISE@ |
| 48 | USE_MMAN_H = @USE_MMAN_H@ |
| 49 | USE_SEE = @USE_SEE@ |
| 50 |
+2
| --- Makefile.osx-jaguar | ||
| +++ Makefile.osx-jaguar | ||
| @@ -33,17 +33,19 @@ | ||
| 33 | 33 | # will run on the platform that is doing the build. This is used |
| 34 | 34 | # to compile code-generator programs as part of the build process. |
| 35 | 35 | # See TCC below for the C compiler for building the finished binary. |
| 36 | 36 | # |
| 37 | 37 | BCC = cc |
| 38 | +BCCFLAGS = $(CFLAGS) | |
| 38 | 39 | |
| 39 | 40 | #### The suffix to add to final executable file. When cross-compiling |
| 40 | 41 | # to windows, make this ".exe". Otherwise leave it blank. |
| 41 | 42 | # |
| 42 | 43 | E = |
| 43 | 44 | |
| 44 | 45 | TCC = cc |
| 46 | +TCCFLAGS = $(CFLAGS) | |
| 45 | 47 | |
| 46 | 48 | #### Tcl shell for use in running the fossil testsuite. If you do not |
| 47 | 49 | # care about testing the end result, this can be blank. |
| 48 | 50 | # |
| 49 | 51 | TCLSH = tclsh |
| 50 | 52 |
| --- Makefile.osx-jaguar | |
| +++ Makefile.osx-jaguar | |
| @@ -33,17 +33,19 @@ | |
| 33 | # will run on the platform that is doing the build. This is used |
| 34 | # to compile code-generator programs as part of the build process. |
| 35 | # See TCC below for the C compiler for building the finished binary. |
| 36 | # |
| 37 | BCC = cc |
| 38 | |
| 39 | #### The suffix to add to final executable file. When cross-compiling |
| 40 | # to windows, make this ".exe". Otherwise leave it blank. |
| 41 | # |
| 42 | E = |
| 43 | |
| 44 | TCC = cc |
| 45 | |
| 46 | #### Tcl shell for use in running the fossil testsuite. If you do not |
| 47 | # care about testing the end result, this can be blank. |
| 48 | # |
| 49 | TCLSH = tclsh |
| 50 |
| --- Makefile.osx-jaguar | |
| +++ Makefile.osx-jaguar | |
| @@ -33,17 +33,19 @@ | |
| 33 | # will run on the platform that is doing the build. This is used |
| 34 | # to compile code-generator programs as part of the build process. |
| 35 | # See TCC below for the C compiler for building the finished binary. |
| 36 | # |
| 37 | BCC = cc |
| 38 | BCCFLAGS = $(CFLAGS) |
| 39 | |
| 40 | #### The suffix to add to final executable file. When cross-compiling |
| 41 | # to windows, make this ".exe". Otherwise leave it blank. |
| 42 | # |
| 43 | E = |
| 44 | |
| 45 | TCC = cc |
| 46 | TCCFLAGS = $(CFLAGS) |
| 47 | |
| 48 | #### Tcl shell for use in running the fossil testsuite. If you do not |
| 49 | # care about testing the end result, this can be blank. |
| 50 | # |
| 51 | TCLSH = tclsh |
| 52 |
+2
-2
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -8,12 +8,12 @@ | ||
| 8 | 8 | # to regenerate this file. |
| 9 | 9 | # |
| 10 | 10 | # This file is included by primary Makefile. |
| 11 | 11 | # |
| 12 | 12 | |
| 13 | -XBCC = $(BCC) $(BCCFLAGS) $(CFLAGS) | |
| 14 | -XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS) $(CFLAGS) | |
| 13 | +XBCC = $(BCC) $(BCCFLAGS) | |
| 14 | +XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS) | |
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | SRC = \ |
| 18 | 18 | $(SRCDIR)/add.c \ |
| 19 | 19 | $(SRCDIR)/allrepo.c \ |
| 20 | 20 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -8,12 +8,12 @@ | |
| 8 | # to regenerate this file. |
| 9 | # |
| 10 | # This file is included by primary Makefile. |
| 11 | # |
| 12 | |
| 13 | XBCC = $(BCC) $(BCCFLAGS) $(CFLAGS) |
| 14 | XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS) $(CFLAGS) |
| 15 | |
| 16 | |
| 17 | SRC = \ |
| 18 | $(SRCDIR)/add.c \ |
| 19 | $(SRCDIR)/allrepo.c \ |
| 20 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -8,12 +8,12 @@ | |
| 8 | # to regenerate this file. |
| 9 | # |
| 10 | # This file is included by primary Makefile. |
| 11 | # |
| 12 | |
| 13 | XBCC = $(BCC) $(BCCFLAGS) |
| 14 | XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS) |
| 15 | |
| 16 | |
| 17 | SRC = \ |
| 18 | $(SRCDIR)/add.c \ |
| 19 | $(SRCDIR)/allrepo.c \ |
| 20 |
+2
-2
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -281,12 +281,12 @@ | ||
| 281 | 281 | # to regenerate this file. |
| 282 | 282 | # |
| 283 | 283 | # This file is included by primary Makefile. |
| 284 | 284 | # |
| 285 | 285 | |
| 286 | -XBCC = $(BCC) $(BCCFLAGS) $(CFLAGS) | |
| 287 | -XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS) $(CFLAGS) | |
| 286 | +XBCC = $(BCC) $(BCCFLAGS) | |
| 287 | +XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS) | |
| 288 | 288 | |
| 289 | 289 | } |
| 290 | 290 | writeln -nonewline "SRC =" |
| 291 | 291 | foreach s [lsort $src] { |
| 292 | 292 | writeln -nonewline " \\\n \$(SRCDIR)/$s.c" |
| 293 | 293 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -281,12 +281,12 @@ | |
| 281 | # to regenerate this file. |
| 282 | # |
| 283 | # This file is included by primary Makefile. |
| 284 | # |
| 285 | |
| 286 | XBCC = $(BCC) $(BCCFLAGS) $(CFLAGS) |
| 287 | XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS) $(CFLAGS) |
| 288 | |
| 289 | } |
| 290 | writeln -nonewline "SRC =" |
| 291 | foreach s [lsort $src] { |
| 292 | writeln -nonewline " \\\n \$(SRCDIR)/$s.c" |
| 293 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -281,12 +281,12 @@ | |
| 281 | # to regenerate this file. |
| 282 | # |
| 283 | # This file is included by primary Makefile. |
| 284 | # |
| 285 | |
| 286 | XBCC = $(BCC) $(BCCFLAGS) |
| 287 | XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS) |
| 288 | |
| 289 | } |
| 290 | writeln -nonewline "SRC =" |
| 291 | foreach s [lsort $src] { |
| 292 | writeln -nonewline " \\\n \$(SRCDIR)/$s.c" |
| 293 |