In my makefile (rather simplified below) I have a target-specific variable that needs to influence a recursively expanded variable, but it's not doing so - leaving me sitting here scratching my head:
NAME = MyProg
OBJECTS = $(OD)/main.o
RD = Release
OD = Foo
all: OD = $(RD)
all: $(OD) $(OD)/...
Large complex make files can be daunting to read and examine.
What tools are good for visualizing or otherwise examining a gnu make file?
...
I wish to make a self contained LAMP distro software package from source with at least the following:
* php must have mysqli, ldap and GD support
* all required .so's must be included (like libpng needed by GD) (self contained)
I managed to make one but i keep patching quirks to it, SO i thought to start from a wide-used one like XAM...
I am writing a makefile. However except for the path expansion and restrictions on what I can do, this is basically a shell scripting question. As part of the make process, I want to copy a directory to the destination. My source directory and destination directory are variables, so I can't assume a lot about them. They may be fully qual...
I want to set up a system of Makefiles in my project directories so that the rules defined in one will be defined in others. Let's say for example I have a directory called "test" and inside is "test.c" but I want to build test.c using a rule defined in a Makefile in the root directory
Here is an example
#Makefile (inside base dir)
%....
Let's say I have a makefile with the rule
%.o: %.c
gcc -Wall -Iinclude ...
I want *.o to be rebuilt whenever a header file changes. Rather than work out a list of dependencies, whenever any header file in /include changes, then all objects in the dir must be rebuilt.
I can't think of a nice way to change the rule to accomodate this...
Ok so I'm having trouble with my linking of files.
Basically, my program works:
the main program, is gen1
gen1 - recieves input sends to str2value for processing, outputs resaults
str2value, brakes input into tokens using "tokenizer" deterines what sort of processing to do to each token, and passes them off to str2num, or str2cmd. then r...
Since I'm more comfortable using Eclipse, I thought I'd try converting my project from Visual Studio. Yesterday I tried a very simple little test. No matter what I try, make fails with "multiple target patterns". (This is similar to this unanswered question.)
I have three files:
Application.cpp:
using namespace std;
#include "Window....
I need to get some external data to form an output file name in a Makefile.
In GNU Make I can do something like this :
NAME=$(shell some_commands)
$(NAME).out: file.in
compile "$<" -o "$@"
Some other rules have $(NAME).out as a prerequisite so I need $(NAME).out as a target. I can't use substitution+quotes here as this is not in...
When trying new software and compiling with the classic ./configure, make, make install process, I frequently see something like:
error: ____.h: No such file or directory
Sometimes, I get really lucky and apt-get install ____ installs the missing piece and all is well. However, that doesn't always happen and I end up googling to fin...
I want to use gvim to launch make and do the build for my code. Since the build process takes some time i want it to be silently executed and then in the end errors/build log be showed to me.
i have added this to my .vimrc
:command -nargs=* Make silent make <args> | cwindow 10
map <c-b> <c-o>:Make<cr>
So when i press Ctrl-b it start...
I'm trying to build gcc for use with an AVR micro controller and avr-ada, and I've hit a roadblock caused by my regular compiler being too picky about the version I needed for the AVR. I get the following warning, which in turn causes the gcc or make to report an error:
gcc -c -g -O2 -gnatpg -gnata -nostdinc -I- -I. -Iada
-I../../gc...
I'm trying to create a Makefile that uses information from the path to create a relevant rpm name. Suppose I have two different possible paths:
PATH1 = /usr/local/home/jsmith/code/main
PATH2 = /usr/local/home/jsmith/code/dev/ver2
If "main" is detected in the path, I want to detect and append "main" to the rpm name. If "dev" is detec...
Is there a way to log the commands, make invokes to compile a program? I know of the parameters -n and -p, but they either don't resolve if-conditions but just print them out. Or they don't work, when there are calls to 'make' itself in the Makefile.
...
I'm trying to create a generic build template for my Makefiles, kind of like they discuss in the eval documentation.
I can't seem to get the wildcard function to work within an eval. The basic code I'm having issues with looks like this.
SRC_DIR = ./src/
PROG_NAME = test
define PROGRAM_template
$(1)_SRC_DIR = $(join $(SRC_DIR), $(...
I have installed Vim and MinGW on my machine, so I try to create Hello World then compile in in Vim and everything work fine. However when I type :make it show error 'make' not recognized as an internal or external command.
I already added variable path to C:\MinGW\bin. I want to know how to configure Vim or my machine to allow make com...
I'm a recent vim convert (from fancy IDEs like eclipse.)
I love the :make command in vim and use it extensively; however I also like to edit multiple projects (with separate makefiles.)
So usually to edit more than one project I will do
pushd project1
vim project1.cpp
[suspend signal]
pushd ../project2
vim project2.cpp
and now I ca...
I'm trying to create a generic build template for my Makefiles, kind of like they discuss in the eval documentation.
I've run into a known bug with GNU Make 3.80. When $(eval) evaluates a line that is over 193 characters, Make crashes with a "Virtual Memory Exhausted" error.
The code I have that causes the issue looks like this.
SRC_...
During a make, I'm seeing an error along the lines of:
cc1: warnings being treated as errors
somefile.c:200: error: the frame size of 1032 bytes is larger than 1024 bytes
The line number points to the closing brace of a c function that has a signature like this:
void trace(SomeEnum1 p1, SomeEnum2 p2, char* format, ...) {
char st...
I'm using a makefile to automate some document generation. I have several documents in a directory, and one of my makefile rules will generate an index page of those files. The list of files itself is loaded on the fly using list := $(shell ls documents/*.txt) so I don't have to bother manually editing the makefile every time I add, de...