gnu-make Questions
3
I'm using vim with YouCompleteMe (YCM) plugin for C programming. YCM needs a json file to show code completion suggestions or a manually crafted .ycm_extra_conf.py file.
Build systems like cmake an...
Interposition asked 1/9, 2018 at 6:5
2
Solved
I am new to Linux and makefiles. I have a makefile which generates .a files.
When I run the makefile, I get the following error. I have no idea from which part of the code, the error occurs.
[orac...
Eosinophil asked 28/5, 2012 at 5:48
4
Solved
GNU Make 3.82
gcc 4.7.2
c89
I have the following make file:
INC_PATH=-I/home/dev_tools/apr/include/apr-1
LIB_PATH=-L/home/dev_tools/apr/lib
LIBS=-lapr-1 -laprutil-1
RUNTIME_PATH=-Wl,-rpath,/home...
3
Solved
How to define local variable in Makefile target?
I would like to avoid repeating filename like:
zsh:
FILENAME := "text.txt"
@echo "Copying ${FILENAME}...";
scp "${FILENA...
6
Solved
In my Makefile, I need to test if the current directory is an SVN repo or not and if it is not I want to indicate an error using the $(error) directive in Makefile.
So I plan to use the return val...
Vargas asked 12/9, 2011 at 21:29
11
Solved
In a makefile, I'd like to define a variable specifying whether the current redhat-release is greater than 5.3. (This variable will be passed to gcc as a #define)
So far I've come up with:
# Find...
4
Solved
I want to use the include directive only for a specific target. I do not want to run the other makefiles when the target is not needed because it means the makefiles are generated needlessly.
So i...
2
The latest version of make has an option --output-sync that can make the STDOUT of each target atomic so that statements from multiple targets are not interleaved when using make --jobs=N
Unfortun...
4
On msys2, I installed the mingw-w64 toolchain. I can run gcc from MINGW64 shell, but not make. pacman claims mingw-w64-x86_64-make is installed. What gives?
3
I'm trying to trap exit (ctrl+c) signal to perform some cleanup activity .
In shell script i followed bellow function to trap,
#To trap ctrl-c signals
trap ctrl_c INT
#To trap exit signals
trap...
1
Solved
I have a issue with this GNU make, code:
$(EXE):$(COMMON_INFO) $(LNKFILE)
@echo [COMPILING]...
@echo $(CC_FILES_TO_BUILD)
@echo $(subst \,/, $(CC_FILES_TO_BUILD)) > list_file_to_build
Becaus...
Taenia asked 17/1, 2024 at 9:54
9
Solved
How can I list the current value of all variables (also called macros) in a Makefile when running make?
E.g. if this is in the Makefile:
CUR-DIR := $(shell /bin/pwd)
LOG-DIR := $(CUR-DIR)/make-lo...
3
Solved
I have recently moved from Window 7 to Windows 10 and I cannot get my makefiles to work anymore.
I have been using the GNU Make for Windows
The first thing that I noticed was that it had started ...
Spent asked 18/12, 2017 at 19:10
5
Solved
I'm getting some unexpected results calling one makefile from another. I have two makefiles, one called /path/to/project/makefile and one called /path/to/project/gtest-1.4.0/make/Makefile. I'm atte...
3
I would like to check multiple conditions in an if loop of GNU make file. Here's an example:
ifeq ($(TEST_FLAG),TRUE && ($(DEBUG_FLAG),FALSE))
true statement
else
false statement
endif
...
Geminate asked 23/6, 2011 at 8:46
4
Solved
I am learning linux, and my first step is to adapt my project for running on linux. Here is simple makefile (in educational purposes mostly), which generates out file:
#------------------------BUI...
5
Is there a way how to ask gmake to never run two targets from a set in parallel?
I don't want to use .NOTPARALLEL, because it forces the whole Makefile to be run sequentially, not just the require...
Redon asked 17/2, 2014 at 14:45
15
Solved
How can I check if a program is callable from a Makefile?
(That is, the program should exist in the path or otherwise be callable.)
It could be used to check for which compiler is installed, for...
8
Solved
I want to define a shell function
#!/bin/sh
test ()
{
do_some_complicated_tests $1 $2;
if something; then
build_thisway $1 $2;
else
build_otherway $1 $2;
fi
}
in such a way that I can use...
2
Solved
I was just handed a Makefile that has the following:
rpm: clean $(JARFILE)
# commands here...
As you might have guessed, the clean target deletes the jar if it exists. Is this Makefile correct?...
7
Solved
When running:
sudo /sbin/ldconfig
the following error appears:
/sbin/ldconfig: /usr/local/lib/ is not a symbolic link
When I run the file command, the below appears:
file /usr/local/lib/
/usr...
29
Solved
I've used rake a bit (a Ruby make program), and it has an option to get a list of all the available targets, eg
> rake --tasks
rake db:charset # retrieve the charset for your data...
rake db:co...
7
Solved
It's been a while since I've used make, so bear with me...
I've got a directory, flac, containing .FLAC files. I've got a corresponding directory, mp3 containing MP3 files. If a FLAC file is newer...
5
Solved
In a makefile, the dependency line is of the form -
abc: x y z
All three of the components (x,y,z) are themselves targets in dependency lines further down in the makefile.
If make abc is invoke...
7
Solved
For variable assignment in Make, I see := and = operator. What's the difference between them?
Louvar asked 2/2, 2011 at 20:38
1 Next >
© 2022 - 2025 — McMap. All rights reserved.