Simplify glsl -> C stringification

This commit is contained in:
Tim Angus 2020-08-29 20:58:47 +01:00
parent 2b42f0bdab
commit c0d797f308

View file

@ -1223,7 +1223,7 @@ define DO_REF_STR
$(echo_cmd) "REF_STR $<" $(echo_cmd) "REF_STR $<"
$(Q)rm -f $@ $(Q)rm -f $@
$(Q)echo "const char *fallbackShader_$(notdir $(basename $<)) =" >> $@ $(Q)echo "const char *fallbackShader_$(notdir $(basename $<)) =" >> $@
$(Q)cat $< | sed -e 's/^/\"/;s/$$/\\n\"/' | tr -d '\r' >> $@ $(Q)cat $< | sed -e 's/^\(.*\)$$/\"\1\"/' >> $@
$(Q)echo ";" >> $@ $(Q)echo ";" >> $@
endef endef