Skip to content

Commit 7baacb5

Browse files
committed
Try fix CLang build on Windows
1 parent e6fb8f3 commit 7baacb5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

ffbuild/common.mak

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,41 +142,41 @@ endif
142142
# 1) Preprocess CSS to a minified version
143143
%.css.min: TAG = SED
144144
%.css.min: %.css
145-
$(M)sed 's!/\\*.*\\*/!!g' $< \
145+
$(M)sed 's!/\\*.*\\*/!!g' $(subst \,/,$<) \
146146
| tr '\n' ' ' \
147147
| tr -s ' ' \
148148
| sed 's/^ //; s/ $$//' \
149-
> $@
149+
> $(subst \,/,$@)
150150

151151
ifdef CONFIG_RESOURCE_COMPRESSION
152152

153153
# 2) Gzip the minified CSS
154154
%.css.min.gz: TAG = GZIP
155155
%.css.min.gz: %.css.min
156-
$(M)gzip -nc9 $< > $@
156+
$(M)gzip -nc9 $(subst \,/,$<) > $(subst \,/,$@)
157157

158158
# 3) Convert the gzipped CSS to a .c array
159159
%.css.c: %.css.min.gz $(BIN2CEXE)
160-
$(BIN2C) $< $@ $(subst .,_,$(basename $(notdir $@)))
160+
$(BIN2C) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%, $(subst \,/,$<)) $(subst \,/,$@) $(subst .,_,$(basename $(notdir $@)))
161161

162162
# 4) Gzip the HTML file (no minification needed)
163163
%.html.gz: TAG = GZIP
164164
%.html.gz: %.html
165-
$(M)gzip -nc9 $< > $@
165+
$(M)gzip -nc9 $(subst \,/,$<) > $(subst \,/,$@)
166166

167167
# 5) Convert the gzipped HTML to a .c array
168168
%.html.c: %.html.gz $(BIN2CEXE)
169-
$(BIN2C) $< $@ $(subst .,_,$(basename $(notdir $@)))
169+
$(BIN2C) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%, $(subst \,/,$<)) $(subst \,/,$@) $(subst .,_,$(basename $(notdir $@)))
170170

171171
else # NO COMPRESSION
172172

173173
# 2) Convert the minified CSS to a .c array
174174
%.css.c: %.css.min $(BIN2CEXE)
175-
$(BIN2C) $< $@ $(subst .,_,$(basename $(notdir $@)))
175+
$(BIN2C) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%, $(subst \,/,$<)) $(subst \,/,$@) $(subst .,_,$(basename $(notdir $@)))
176176

177177
# 3) Convert the plain HTML to a .c array
178178
%.html.c: %.html $(BIN2CEXE)
179-
$(BIN2C) $< $@ $(subst .,_,$(basename $(notdir $@)))
179+
$(BIN2C) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%, $(subst \,/,$<)) $(subst \,/,$@) $(subst .,_,$(basename $(notdir $@)))
180180
endif
181181

182182
clean::

0 commit comments

Comments
 (0)