Questions tagged [make]
For questions pertaining to make, a utility that automates the build process by managing dependencies amongst targets. Use this tag for questions about make itself or questions about issues arising from using the make command-line utility.
1,023 questions
0 votes
2 answers
59 views
Is make's $(<D) affected by nearby spaces?
Is there any hope of using $(<D) here? Any hope of avoiding the mystery dots? $ cat Makefile D=$(HOME)/Downloads test: $D/DreamHost\ Web\ Panel\ _\ Mail\ _\ Message\ Filters.html : mv "$&...
1 vote
1 answer
50 views
Do I need to define an absolute path to be able to compile the DRM / Panfrost subtree code of JSM on the RockPro64 / Khadas Edge-V / RK3399?
I'm trying to compile the drm-subtree of JSM because I want to enable the panfrost driver on the RockPro64 / KHADAS EDGE-V / RK3399. The code is here: https://github.com/jsm222/drm-subtree He improved ...
4 votes
1 answer
368 views
POSIX-compliance of NMAKE
NMAKE by Microsoft comes with some components of Visual Studio. Is it POSIX-compliant?
2 votes
1 answer
388 views
How to get multiple pattern rule %/$* variables in a Makefile?
All we get in Makefiles is just one %/$* pattern rule pair. $ cat Makefile %.bla:; echo $* $ make -s m.bla m How shortsighted of our Unix™ fathers. How can I achieve something like %{0}.%{1}.bla that ...
5 votes
2 answers
466 views
How to do indirect variable substitution in a GNU Makefile?
In the shell I can do $ a=b b=c; eval echo \$$a c How do I do the same with GNU Make's $(eval) function? $ cat Makefile a=b b=c x:; echo {What goes here in order to get:} $ make c
0 votes
2 answers
149 views
Can I somehow include a sub-Makefile without creating an impicit rule for it?
Honestly, I want to control, when is this sub-make rebuilt. To my largest surprise, any time if I use an include generated.sub.Makefile, it also tries to rebuild-it and then re-read my whole Makefile ...
0 votes
1 answer
99 views
Need to ensure a certain binary is built early and excluded from clean [closed]
Trying to run this code in my Makefile: MAKEFLAGS+=--no-buildin-rules MAKEVARIABLES+=--no-builtin-variables fixClean: dissoc.c echo "Inside fixClean" ${CC} $<.c ${CFLAGS} ${LIBS} -...
1 vote
2 answers
541 views
sed in makefile is not working as expected when using regex
Got a makefile whith this command which convert folder names on ./cmd/ from snake_case to PascalCase test: @for f in $(shell ls ./cmd/); do \ echo $${f}; \ echo $${f} | sed -r 's/(^...
1 vote
2 answers
82 views
Can I use a flexible (either or) prerequisite in GNU make?
Is it possible to have a flexible extension for a prerequisite? For example, let's say I want to apply a rule to a list of targets that all have the same prerequisite pattern, except that some of them ...
0 votes
3 answers
159 views
Does CMake/make have the ability to make my Linux operating system unstable?
30 years ago, I've started C++. Mostly under DOS, Windows 3.1 and 95. I've wrote some for 10 years. Then Java replaced it at work, for about 20 years. Now C++ in coming back in the front of the scene. ...
1 vote
0 answers
141 views
Cannot compile kernel modules on TrueNAS Scale
I have a Ugreen DXP 6800 Pro and the OS disk died. No actual NAS data was lost but I cannot figure out how to get the OS back to the same state. I was previously able to compile modules and add them ...
0 votes
0 answers
33 views
Why doesn't `rm -f *.{log,pdf,bbl,blg,aux}` work in a Makefile? How to repair? [duplicate]
In someone's Makefile, I saw clean: rm -f *.{log,pdf,bbl,blg,aux} Upon running make clean, all the files were still there as before; nothing was removed. So what's the analogon of a shell's rm -...
0 votes
1 answer
78 views
Does a .h file for external kernel modules need compilation in another, particular manner?
I have an external kernel module and a Makefile. I was using Kbuild but decided to go with a straight Makefile and make. I have my headers installed, build-essential and kmod installed, and I am ...
3 votes
1 answer
980 views
Using make variable in bash scripting as part of a makefile command
I've created a makefile command to automate a publishing workflow using Pandoc and the Generic Preprocessor (GPP). It is as follows: TODAY = $(shell date +'%Y%m%d-%H%M') MACROS = utils/gpp/macros.md ...
-1 votes
2 answers
1k views
make menuconfig fails while working on busybox only
I was following the guide here and when I tried running make menuconfig it said Unable to find the ncurses libraries or the required header files. 'make menuconfig' requires the ncurses libraries. ...