Fossil SCM

Allow CFLAGS override without duplicating compile options by default

ashepilko 2018-07-22 16:22 trunk
Commit 09f41885d67708c8534cdc863184272e93f1d5211c3209b8fc9a4663c39900ea
--- Makefile.classic
+++ Makefile.classic
@@ -19,10 +19,11 @@
1919
# will run on the platform that is doing the build. This is used
2020
# to compile code-generator programs as part of the build process.
2121
# See TCC below for the C compiler for building the finished binary.
2222
#
2323
BCC = gcc
24
+BCCFLAGS = $(CFLAGS)
2425
2526
#### The suffix to add to final executable file. When cross-compiling
2627
# to windows, make this ".exe". Otherwise leave it blank.
2728
#
2829
E =
@@ -49,10 +50,12 @@
4950
5051
#### We sometimes add the -static option here so that we can build a
5152
# static executable that will run in a chroot jail.
5253
#LIB = -static
5354
TCC += -DFOSSIL_DYNAMIC_BUILD=1
55
+
56
+TCCFLAGS = $(CFLAGS)
5457
5558
#### Extra arguments for linking the finished binary. Fossil needs
5659
# to link against the Z-Lib compression library unless the miniz
5760
# library in the source tree is being used. There are no other
5861
# required dependencies.
5962
--- 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 @@
3838
#
3939
TCLSH = tclsh
4040
4141
CFLAGS = @CFLAGS@
4242
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
4545
INSTALLDIR = $(DESTDIR)@prefix@/bin
4646
USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
4747
USE_LINENOISE = @USE_LINENOISE@
4848
USE_MMAN_H = @USE_MMAN_H@
4949
USE_SEE = @USE_SEE@
5050
--- 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
--- Makefile.osx-jaguar
+++ Makefile.osx-jaguar
@@ -33,17 +33,19 @@
3333
# will run on the platform that is doing the build. This is used
3434
# to compile code-generator programs as part of the build process.
3535
# See TCC below for the C compiler for building the finished binary.
3636
#
3737
BCC = cc
38
+BCCFLAGS = $(CFLAGS)
3839
3940
#### The suffix to add to final executable file. When cross-compiling
4041
# to windows, make this ".exe". Otherwise leave it blank.
4142
#
4243
E =
4344
4445
TCC = cc
46
+TCCFLAGS = $(CFLAGS)
4547
4648
#### Tcl shell for use in running the fossil testsuite. If you do not
4749
# care about testing the end result, this can be blank.
4850
#
4951
TCLSH = tclsh
5052
--- 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 @@
88
# to regenerate this file.
99
#
1010
# This file is included by primary Makefile.
1111
#
1212
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)
1515
1616
1717
SRC = \
1818
$(SRCDIR)/add.c \
1919
$(SRCDIR)/allrepo.c \
2020
--- 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
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -281,12 +281,12 @@
281281
# to regenerate this file.
282282
#
283283
# This file is included by primary Makefile.
284284
#
285285
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)
288288
289289
}
290290
writeln -nonewline "SRC ="
291291
foreach s [lsort $src] {
292292
writeln -nonewline " \\\n \$(SRCDIR)/$s.c"
293293
--- 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

Keyboard Shortcuts

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