Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
eac0b29c by Ahmed Sobhy at 2026-02-13T07:04:36+00:00
qt: Makefile.am: fix make clean deleting tracked shader source files
When running make clean, 20 shader files were deleted that were tracked
by the repo, and trying to run the build afterwards fails because of
those missing files.
Make's suffix substitution $(var:.frag=.frag.qsb) only replaces entries
ending in .frag, while .vert remain unchanged (and vice versa), which
caused all .frag and .vert files to be included in BUILT_SOURCES, and
get deleted.
Fixed by defining separate .frag and .vert lists (libqt_plugin_la_SHADER_FRAG
and libqt_plugin_la_SHADER_VERT) and
applying the suffix substitution on each independently. Also removed
shaders/shaders.qrc from BUILT_SOURCES since it is a tracked source
file, not a generated one, and added it to CLEANFILES so its build
directory copy is cleaned up during distclean.
- - - - -
1 changed file:
- modules/gui/qt/Makefile.am
Changes:
=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -1347,25 +1347,29 @@ libqt_plugin_la_ALL_QML = \
$(libqml_module_widgets_a_QML)
# Shaders:
-libqt_plugin_la_SHADER := shaders/FadingEdge.frag \
- shaders/FadingEdgeX.vert \
- shaders/FadingEdgeY.vert \
- shaders/Noise.frag \
- shaders/RectFilter.frag \
- shaders/SubTexture.vert \
- shaders/SDFAARoundedTexture.frag \
-
shaders/SDFAARoundedTexture_cropsupport_bordersupport.frag \
- shaders/DitheredTexture.frag \
- shaders/FastBlend.frag \
- shaders/FastBlend_additive.frag \
- shaders/FastBlend_multiply.frag \
- shaders/FastBlend_screen.frag \
- shaders/RoundedRectangleShadow.frag \
- shaders/RoundedRectangleShadow_hollow.frag \
- shaders/VoronoiSnow.frag \
- shaders/DualKawaseBlur_upsample.frag \
- shaders/DualKawaseBlur_downsample.frag \
- shaders/DualKawaseBlur_upsample_postprocess.frag
+libqt_plugin_la_SHADER_FRAG = shaders/FadingEdge.frag \
+ shaders/Noise.frag \
+ shaders/RectFilter.frag \
+ shaders/SDFAARoundedTexture.frag \
+
shaders/SDFAARoundedTexture_cropsupport_bordersupport.frag \
+ shaders/DitheredTexture.frag \
+ shaders/FastBlend.frag \
+ shaders/FastBlend_additive.frag \
+ shaders/FastBlend_multiply.frag \
+ shaders/FastBlend_screen.frag \
+ shaders/RoundedRectangleShadow.frag \
+ shaders/RoundedRectangleShadow_hollow.frag \
+ shaders/VoronoiSnow.frag \
+ shaders/DualKawaseBlur_upsample.frag \
+ shaders/DualKawaseBlur_downsample.frag \
+ shaders/DualKawaseBlur_upsample_postprocess.frag
+
+libqt_plugin_la_SHADER_VERT = shaders/FadingEdgeX.vert \
+ shaders/FadingEdgeY.vert \
+ shaders/SubTexture.vert
+
+libqt_plugin_la_SHADER = $(libqt_plugin_la_SHADER_FRAG)
$(libqt_plugin_la_SHADER_VERT)
+
if ENABLE_QT
libqt_plugin_la_LIBADD += libqml_module_dialogs.a \
@@ -1393,8 +1397,8 @@ noinst_LIBRARIES = libqml_module_dialogs.a \
libqml_module_widgets.a
BUILT_SOURCES += \
- $(libqt_plugin_la_SHADER:.frag=.frag.qsb) \
- $(libqt_plugin_la_SHADER:.vert=.vert.qsb)
+ $(libqt_plugin_la_SHADER_FRAG:.frag=.frag.qsb) \
+ $(libqt_plugin_la_SHADER_VERT:.vert=.vert.qsb)
QSB_PARAMS = --glsl="100 es,120,150" --batchable -O
if HAVE_WIN32
@@ -1427,12 +1431,12 @@ EXTRA_DIST += shaders/Common.glsl
%.vert.qsb: %.vert shaders/Common.glsl
$(qsb_verbose)PATH="$(QSB_EXTRA_PATH)$$PATH" $(QSB) $(QSB_PARAMS)
$(QSB_PARAMS_VERBOSE) -o $@ $<
-shaders/shaders.cpp: $(srcdir)/shaders/shaders.qrc
$(libqt_plugin_la_SHADER:.frag=.frag.qsb)
$(libqt_plugin_la_SHADER:.vert=.vert.qsb)
+shaders/shaders.cpp: $(srcdir)/shaders/shaders.qrc
$(libqt_plugin_la_SHADER_FRAG:.frag=.frag.qsb)
$(libqt_plugin_la_SHADER_VERT:.vert=.vert.qsb)
$(AM_V_GEN) cp -f $(filter %.qrc, $^) $(builddir)/shaders/shaders.qrc
|| true
$(AM_V_GEN) $(RCC) $(RCC_EXTRA_PARAMS) --name shaders -o $@
$(builddir)/shaders/$(notdir $(filter %.qrc, $^))
libqt_plugin_la_SOURCES += shaders/shaders.qrc $(libqt_plugin_la_SHADER)
-BUILT_SOURCES += shaders/shaders.qrc
+CLEANFILES += shaders/shaders.qrc
lib_qt_plugin_la_QRC = assets.qrc
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/eac0b29c8eb65ab13c6f555051c2bb2e0497878d
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/eac0b29c8eb65ab13c6f555051c2bb2e0497878d
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits