make

What files did `make install` copy, and where?

Is there a way to get a list of filenames/paths that make install copies to the filesystem? Some packages come with a MANIFEST file, but not the ones that I am working with. ...

Make dependency generation using shell and %?

I have a bunch of directories. I want to build an object for each directory. Suppose OBJS contains "build/dir1 build/dir2 build/dir3", and the pattern I'm matching is build/%: % <do something here> I'd like to add, for each object, dependencies for every file within that directory (recursively). I thought of doing something like ...

Is there a way to exclude certain source files or folders from a makefile?

Is there a way to exclude some files from the compilation process? Or even whole directories? I believe the makefile is using find to find all the source files inside the src directory. Is there a way to specify the directories to ignore from find? Like some switch, or something? ...

Make (Parallel Jobs) on Windows

What setup works for GNU make parallel jobs (-j) on Windows? I have tried setting the shell to cmd.exe using MinGW make 3.81, this works in creating the multiple processes but make fails with the "waiting for job" message. Can this work and what is the best setup? (MinGW / Cygwin / ???) Can someone point me to a working example to test...

How can I build PDF LaTeX documents with ANT (or some other build system if you prefer)?

The team I work for manages a large collection of technical documentation which is written in LaTeX. Currently all the documentation we have is manually built by the editors and then checked into a version control system. Sometimes people forget to compile their documents so we have a situation where the PDF and .tex files are often ou...

Joining elements of a list in GNU Make

Hello there! In my makefile I have a variable with a list of directories, like this: DIRS = /usr /usr/share/ /lib Now, I need to create PATH variable from it, which is basically the same, but uses semicolon as a separator: PATH = /usr:/usr/share/:/lib How do I do that? I mean, how do I join elements of DIRS list with semicolons, i...

Distributed GNU Make for Win32

Is there a version of GNU Make, or GNU Make compatible application, which supports distributed builds on Win32? We currently have a large project using gnu makefiles. We use the Win32 version of GMake to build. Our build environment supports parallel builds without a problem, and we'd like to try and perform a distributed build if pos...

GNU make: inverting sub-process success?

I've a make file for a scripted system, with a lot of tests which should pass. Each test is a separate call to the scripting application: #---------------------------------------------------------------------------- # run test scripts in the module::test #---------------------------------------------------------------------------- scrip...

how to automate Qt moc

i have to run the following commands from Qt command prompt: 'qmake -project' then 'make' and this gives me the debug folder with the Moc file. this is strangely the only way my PC will generate the moc_.cpp file. So how can i automate the task of these commands so i dont have to use these commands again? ...

OpenCV in Eclipse on Fedora Library issues

I'm trying to compile a small OpenCV program using Eclipse. I'm limited in library locations, as I'm running them on a University shared server. I have a fully working makefile, with which I can compile and run the program from the terminal as intended, however when using Eclipse, it compiles fine but on running I get the following error...

in m4's patsubst, how do I replace newlines with spaces?

How can I tell m4's patsubstr to replace all newlines in a string with a space? I've tried: patsubst(MULTI_LINE_STR_DEFINE,`\n',` ') and patsubst(MULTI_LINE_STR_DEFINE,`\\n',` ') ...

Error When Using Make

Hello, I'm learning Objective-C using GNUStep in my Windows(Cygwin) and i have two files, one source and one make file: include $(GNUSTEP_MAKEFILES)/common.make APP_NAME = HelloWorld HelloWorld_HEADERS = HelloWorld_OBJC_FILES = main.m HelloWorld_RESOURCE_FILES = include $(GNUSTEP_MAKEFILES)/application.make But when i run make in ...

How can I get the "full" makefile if a Makefile contains "include"?

Is it possible to get the "full" makefile if makefile contains "include"? For example: #here is the contents of Makefile include inc1.i include inc2.i clean: rm -rf * #here is the contents of inc1.i abc: touch abc #here is the contents of inc2.i def: touch def How can I get a "full" Makefil...

How to write a Makefile rule to download a file only if it is missing?

I'm trying to write a Makefile which should download some sources if and only if they are missing. Something like: hello: hello.c gcc -o hello hello.c hello.c: wget -O hello.c http://example.org/hello.c But of course this causes hello.c to be downloaded every time make command is run. I would like hello.c to be downloaded by...

Hudson cancel do not cancel all processes

I'm working with hudson v 1.323 installed as a Windows service on Windows XP. I'm building with a shell script that looks like this: #!c:/cygwin/bin/sh export PATH=/cygdrive/c/cygwin/bin:$PATH make -j 4 $MAKE_TARGET When I cancel this build using the red X everything seems to have stopped on Hudson, but when I look in the Windows pr...

cannot get makefile to work with Qt library

I have 3 files in my program: App_interface.h, App_interface.cpp, main.cpp. Im trying to compile my program which requires the Qt library. I just installed the Qt library in the default location. This is my makefile: if your wondering why i don't use moc in this makefile is because 1) i dont know how to do that. 2) i just want to stop g...

Makefile variables from command line vs. environment

Is there a way to detect whether a variable has been set from the environment vs. on the command line? I would like to distinguish between someone invoking make with make LIB=mylib vs. make and $LIB being defined. ...

In gnu make, can the prerequisites in a static pattern rule have have different suffixes.

Our make file compiles .c source files with a static pattern rule like this: OBJECTS = foo.o bar.o baz.o $(OBJECTS): %.o: %.c $(CC) $< $(C_OPTIONS) -c -o $@ I need to change one of the .c files to an Objective-C .m file. Invoking the compiler is the same for both source types, so I'd like to use the same rule and just tweak it to...

How to get the linker in gcc to recognize OpenCL library functions?

I'm getting my feet wet with OpenCL. I'm sure this problem is not specific to OpenCL, however. the top of my main file looks like: #include <stdio.h> #include <stdlib.h> #include <math.h> #include <OpenCL/opencl.h> // some code cl_device_id device_id; //declaring a device id gives no errors int err = clGetDeviceIDs(NULL, CL_DEVICE_T...

How can I affect PATH in a makefile variable? Why is my example not working?

At the beginning of a makefile I have this line : PATH := $(PATH):/other/dir and this gives this error: Recursive variable 'PATH' references itself. What do I have to do so it works? ...