FS#72527 - [make] not expand internal variables

Attached to Project: Arch Linux
Opened by Gustavo Alvarez (sl1pkn07) - Saturday, 23 October 2021, 18:35 GMT
Last edited by Jonas Witschel (diabonas) - Tuesday, 02 November 2021, 09:56 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

try to build any handcrafted makefiles wich involve expand internal variables

for example: https://github.com/sekrit-twc/znedi3

makefile:

https://github.com/sekrit-twc/znedi3/blob/master/Makefile

see the variables MY_CPPFLAGS, MY_LDFLAGS, etc

then run make, these variables not expanded and fail to build

Steps to reproduce:

- download the code with handcrafted makefile with internal variables
- run make and see the output. the internal variables is not expanded

prereqisites:

export CXXFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection" $(pkg-config --cflags vapoursynth)"
export CPPFLAGS="-DNNEDI3_WEIGHTS_PATH=\"/usr/lib/vapoursynth/nnedi3_weights.bin\""

expected:

make
--snip--
g++ -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -I/usr/include/vapoursynth -DNNEDI3_WEIGHTS_PATH=\"/usr/lib/vapoursynth/nnedi3_weights.bin\" -c -Dgraphengine=graphengine_znedi3 -Igraphengine -Iznedi3 -Ivsxx -DNNEDI3_WEIGHTS_PATH=\"/usr/lib/vapoursynth/nnedi3_weights.bin\" -o vsznedi3/vsznedi3.o vsznedi3/vsznedi3.cpp

got:

make
--snip--
g++ -march=native -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -I/usr/include/vapoursynth -DNNEDI3_WEIGHTS_PATH=\"/usr/lib/vapoursynth/nnedi3_weights.bin\" -c -o vsznedi3/vsznedi3.o vsznedi3/vsznedi3.cpp
vsznedi3/vsznedi3.cpp:8:10: fatal error: znedi3.h: No such file or directory


MY_CFLAGS := -O2 -fPIC $(CFLAGS)
MY_CXXFLAGS := -std=c++14 -O2 -fPIC $(CXXFLAGS)
MY_CPPFLAGS := -Dgraphengine=graphengine_znedi3 -Igraphengine -Iznedi3 -Ivsxx -Ivsxx/VapourSynth $(CPPFLAGS)

all those variables not expanded

%.o: %.cpp $(graphengine_HDRS) $(znedi3_HDRS) $(testapp_HDRS) $(vsxx_HDRS)
$(CXX) -c $(EXTRA_CXXFLAGS) $(MY_CXXFLAGS) $(MY_CPPFLAGS) $< -o $@



greetings
This task depends upon

Closed by  Jonas Witschel (diabonas)
Tuesday, 02 November 2021, 09:56 GMT
Reason for closing:  Not a bug
Additional comments about closing:  This turned out to be a problem with the Makefile, not the make tool itself

Loading...