File tree 2 files changed +21
-7
lines changed
2 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -73,14 +73,20 @@ NULL := # useful for terminating lists of files
73
73
# The optional third parameter $(3) is any additional options compiler options.
74
74
define run-cc
75
75
@GCCWARN=$$( $(PRAGMAS ) -q GCCWARN $(2 ) ) ; \
76
- if [ $$GCCWARN -eq 5 ]; then \
76
+ case $$GCCWARN in \
77
+ 0) \
78
+ echo $(CC ) $(CFLAGS_BASE ) $(3 ) -c -o $(1 ) $(2 ) ; \
79
+ $(CC ) $(CFLAGS_BASE ) $(3 ) -c -o $(1 ) $(2 ) ; \
80
+ ;; \
81
+ 5) \
77
82
echo $(CC ) $(CFLAGS_NOWERROR ) $(3 ) -c -o $(1 ) $(2 ) ; \
78
83
$(CC ) $(CFLAGS_NOWERROR ) $(3 ) -c -o $(1 ) $(2 ) ; \
79
- else \
84
+ ;; \
85
+ 9) \
80
86
echo $(CC ) $(CFLAGS ) $(3 ) -c -o $(1 ) $(2 ) ; \
81
87
$(CC ) $(CFLAGS ) $(3 ) -c -o $(1 ) $(2 ) ; \
82
- fi
83
-
88
+ ;; \
89
+ esac
84
90
endef
85
91
86
92
# run-cxx:
@@ -91,13 +97,20 @@ endef
91
97
# The optional third parameter $(3) is any additional options compiler options.
92
98
define run-cxx
93
99
@GCCWARN=$$( $(PRAGMAS ) -q GCCWARN $(2 ) ) ; \
94
- if [ $$GCCWARN -eq 5 ]; then \
100
+ case $$GCCWARN in \
101
+ 0) \
102
+ echo $(CXX ) $(CXXFLAGS_BASE ) $(3 ) -c -o $(1 ) $(2 ) ; \
103
+ $(CXX ) $(CXXFLAGS_BASE ) $(3 ) -c -o $(1 ) $(2 ) ; \
104
+ ;; \
105
+ 5) \
95
106
echo $(CXX ) $(CXXFLAGS_NOWERROR ) $(3 ) -c -o $(1 ) $(2 ) ; \
96
107
$(CXX ) $(CXXFLAGS_NOWERROR ) $(3 ) -c -o $(1 ) $(2 ) ; \
97
- else \
108
+ ;; \
109
+ 9) \
98
110
echo $(CXX ) $(CXXFLAGS ) $(3 ) -c -o $(1 ) $(2 ) ; \
99
111
$(CXX ) $(CXXFLAGS ) $(3 ) -c -o $(1 ) $(2 ) ; \
100
- fi
112
+ ;; \
113
+ esac
101
114
endef
102
115
103
116
define filter-pragma
Original file line number Diff line number Diff line change 5
5
magic_pattern = 'RAMCloud[\s_-]+pragma.*\[(.*)\]'
6
6
7
7
gccwarn = PragmaDefinition ('GCC warnings' , default = 9 )
8
+ gccwarn [0 ] = 'no warnings'
8
9
gccwarn [5 ] = 'non-fatal warnings'
9
10
gccwarn [9 ] = 'fatal, pedantic warnings'
10
11
definitions ['GCCWARN' ] = gccwarn
You can’t perform that action at this time.
0 commit comments