make

How can I use $0 in Makefile?

How can I use $0 in Makefile? I would like to include the following command (taken from here) in a Makefile. A simple version of my Makefile script containing the command is: copy_files: sed ‘s/^/./’ ./input_file | rev | LC_ALL=C sort -u | awk ‘p == "" || substr($0,1,length(p)) != p { print $0; p …

Total answers: 1

Why Package libnetfilter_queue was not found in the pkg-config search path?

Why Package libnetfilter_queue was not found in the pkg-config search path? I tried make all go build -o bettercap . go build github.com/chifflier/nfqueue-go/nfqueue: # pkg-config –cflags — libnetfilter_queue Package libnetfilter_queue was not found in the pkg-config search path. Perhaps you should add the directory containing `libnetfilter_queue.pc’ to the PKG_CONFIG_PATH environment variable No package ‘libnetfilter_queue’ found …

Total answers: 1

Why is the configuration file in the parameter list of make command?

Why is the configuration file in the parameter list of make command? Here is the command line I got from a chip maker: make sunxi_defconfig ARCH=arm CROSS_COMPILE=arm-linux- It surely failed with message of *** Error during writing of the configuration. make[1]: *** [scripts/kconfig/Makefile:121: nanopi_h3_defconfig] Error 1 make: *** [Makefile:479: nanopi_h3_defconfig] Error 2 I found sunxi_defconfig …

Total answers: 1

How to ask make to not always re-create files depending on .PHONY targets?

How to ask make to not always re-create files depending on .PHONY targets? I have this: .PHONY: check check: script-returning-nearly-always-zero obj2.img: obj1.img check make-obj2-from-obj1 So, logic is that I want to re-generate obj2.img, if it is older as obj1 (or it does not even exist). However, I want an error if the "check" target fails. …

Total answers: 1

What tells make that a file is an intermediate file (and can be auto removed)?

What tells make that a file is an intermediate file (and can be auto removed)? I’m simply studying make. And I stumble upon the question on make’s autoremoving intermediate file. I’d like to better predict how make would mark file intermediate (i.e. answer "Would auto remove it?"), so I wrote a dummy project like this …

Total answers: 1

Installing PongoOS fork on Debian results in no makefile binaries

Installing PongoOS fork on Debian results in no makefile binaries I am attempting to install this fork of PongoOS onto Debian 12.1 using these instructions and the last step I have taken was enter the following into the terminal: EMBEDDED_CC=clang EMBEDDED_LDFLAGS=-fuse-ld=/usr/bin/ld64 STRIP=cctools-strip make all The next step is to execute Pongo.bin using the following terminal …

Total answers: 1

Make -j Failing for OQS Openssl

Make -j Failing for OQS Openssl I am not a developer. I am trying to build the Open Quantum Safe (OQS) variant of OpenSSL using an Ubuntu VM. Everything worked great up until the last step where I do "make -j", where I am getting fatal errors. Examples of the fatal errors are In file …

Total answers: 1

Unable to compile uvcvideo driver

Unable to compile uvcvideo driver I’ve been following the LFD103 course titled "A BEGINNER’S GUIDE TO LINUX KERNEL DEVELOPMENT". In the section "Writing Your First Kernel Patch", we make changes to the ‘uvcvideo’ driver and recompile it. But I just can’t get it to work. I added the pr_info() function just as the tutorial mentioned. …

Total answers: 1

Make grep exit 1 if found, and exit 0 if not found

Make grep exit 1 if found, and exit 0 if not found I’m creating a simple command to execute within GitHub Actions, which builds a Makefile and returns an error if found (matching Error 1) and success when not found… I seem to either get it to fail even though there is nothing wrong, or …

Total answers: 1

How to execute make in all subdirectories

How to execute make in all subdirectories I have a few directories which have a Makefile in them. I’ve make this script to run those Makefiles if they exist: find . -name "Makefile" -exec sh -c ‘make re -C "$1" $(dirname "$0")’ {} ; But it doesn’t seem to work, I get this error: make: …

Total answers: 2

How to build GCC 13 on M1 MacBook pro?

How to build GCC 13 on M1 MacBook pro? I want to build gcc-13 on my M1 MacBook Pro. Following official document, I download source code using git, configure and make. For configure, I refer to the way of Homebrew configure gcc-12 on link. Specifically is ../configure –prefix=/Users/xubaoyu/gcc/build –disable-nls –enable-checking=release –with-gcc-major-version-only –enable-languages=c,c++ –program-suffix=-13 –with-system-zlib –build=aarch64-apple-darwin22 …

Total answers: 1

How is this Makefile being encountered?

How is this Makefile being encountered? Here is my simple Makefile: #create an exe file run: link gcc link.o -o run #sketch link.o link.o: main.o sum.o ld -r main.o sum.o -o link.o #sketch main.o main.o: main.c gcc -c main.c -o main.o #sketch sum.o sum.o: sum.c gcc -c sum.c -o sum.o #make clean recipie clean: rm …

Total answers: 1

Makefile looping over directories

Makefile looping over directories I need to create links for multiple directories in a Makefile. The links (for all files in ./topdir/) should go from ./anotherdir/<file> to ./topdir/<file>. I tried: create-links: ./topdir/*/ @for f in $^; do echo "this is my path: [$${f}]" && DIR=$(shell basename $${f}) && echo "make link from ./anotherdir/$(DIR)" ; done …

Total answers: 1

How to make a Makefile executable?

How to make a Makefile executable? I have a Makefile, and I want make to run automatically when I double-click it (from the Ubuntu file manager). So, I made this Makefile executable, and added at its top the following shebang line: #!/usr/bin/make -f When I run /usr/bin/make -f Makefile, I get the desired result. However, …

Total answers: 1

error trying to build/make from source

error trying to build/make from source I’m trying to build opendingux from github repo/source. https://github.com/OpenDingux/buildroot OpenDingux is an embedded Linux distribution focused on (retro) gaming. I cloned the repo and then ran the commands below. cd ./buildroot; export CONFIG=’gcw0′; bash ./rebuild.sh; The output from the above command was pretty much a wall of text, too …

Total answers: 1

when crosscompiling this source why do I receive "No rule to make target" error on one host but not the other

when crosscompiling this source why do I receive "No rule to make target" error on one host but not the other I have the following linux kernel source repo cloned to a couple different hosts (my local machine and a Github Actions runner) https://gitlab.conclusive.pl/devices/linux/-/tree/master I’m using the kstr-sama5d27 defconfig When building modules using make modules …

Total answers: 2

Error trying to compile kernel 5.15

Error trying to compile kernel 5.15 I am trying to compile the linux kernel 5.15.64 but it fails. I have the config and use make -j4 && sudo make modules_install -j4 but this is the error I get. make[1]: *** [kernel/Makefile:160: kernel/kheaders_data.tar.xz] Error 127 make: *** [Makefile:1896: kernel] Error 2 What is going wrong in …

Total answers: 1

Unable to build dkms module after Jammy 22.04 upgrade

Unable to build dkms module after Jammy 22.04 upgrade Summary I recently upgraded from Ubuntu 20.04 to 22.04, and ever since then, I have been unable to install the kernel headers without an error. Originally, I had errors from missing flex and bison. After manually installing those, I’ve run into the error below, which I …

Total answers: 1

Differences between using source and ./ a .sh file

Differences between using source and ./ a .sh file I know the above topic has been discussed before source a .sh file and you retain the environmental variables after you are done with the sh file while ./ a .sh file and you lose the environmental variables after you are done However, I have the …

Total answers: 1