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...
Plausible asked 1/2, 2013 at 4:34

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...
Gaikwar asked 14/4, 2021 at 17:27

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...
Tallou asked 16/9, 2010 at 15:49

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...
Teresetereshkova asked 17/11, 2012 at 15:48

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...
Overweigh asked 21/6, 2016 at 16:12

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?
Munificent asked 8/8, 2018 at 20:24

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...
Slr asked 15/6, 2019 at 12:46

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...
Evalynevan asked 19/8, 2011 at 6:54

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...
Stir asked 5/2, 2010 at 9:20

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...
Illmannered asked 5/11, 2017 at 10:3

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...
Slocum asked 11/4, 2011 at 8:23

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...
Vino asked 8/10, 2012 at 3:0

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?...
Irregular asked 6/12, 2016 at 23:35

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...
Carpospore asked 18/7, 2012 at 13:13

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...
Hildebrandt asked 18/11, 2010 at 20:28

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...
Toadeater asked 20/3, 2010 at 13:28

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...
Chetchetah asked 6/2, 2012 at 12:16

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

© 2022 - 2025 — McMap. All rights reserved.