make

Building my project with make

I'm working to improve the long languishing Linux build process for Bitfighter, and am having problems with make. My process is actually quite simple, and since make is (nearly) universal, I want to stick with it if I can. Below I've attached my current Makefile, which works, but clumsily so. I'm looking for ways to improve it, and ha...

nmake.exe keeps complaining about flags I'm not giving it. (U1065)

When I run nmake.exe from make I get this error: Microsoft (R) Program Maintenance Utility Version 8.00.50727.42 Copyright (C) Microsoft Corporation. All rights reserved. NMAKE : fatal error U1065: invalid option '-' But I'm not passing in '-' as an option anyplace. If I run the same command from outside of make it works correctly....

How to build a boost dependent project using regular makefiles?

I'm working on a c++ project, and we recently needed to include a small part of boost in it. The boost part is really minimal (Boost::Python), thus, using bjam to build everything looks like an overkill (besides, everyone working on the project feels comfortable with make, and has no knowloedge of jam). I made quite some tests already, ...

Is make -j distcc possible to scale over 5 times?

Since distcc cannot keep states and just possible to send jobs and headers and let those servers to use only the data just sent and preprocess and compile, I think the lastest distcc has problem in scalability. In my local build environment which has appx. 10,000 c/c++ files to build, I could only make 2 times faster than not using distc...

What use does ./configure serve (other than checking dependencies)

Why does every source package that uses a makefile come with a ./configure script, what does it do? As far as I can tell, it actually generates the makefile? Is there anything that can't be done in the makefile? ...

How to assign the output of a command to a Makefile variable

I need execute some make rules conditionally, only if the Python installed is greater than a certain version (say 2.5). I've thought that I could do something like executing python -c 'import sys; print int(sys.version_info >= (2,5))' and then using the output ('1' if ok, '0' otherwise) in a ifeq make statement. In a simple bash she...

Passing C/C++ #defines to makefile

I develop C/C++ using the Eclipse IDE. Eclipse also generates a makefile which I don't want to edit as it will simply be overwritten. I want to use that makefile for nightly build within Hudson. How do I pass #defines which are made in the project file of the IDE to the makefile ? (and why doesn't Eclipse already include them in the g...

How to get absolute paths after vpath matching in make?

I have a makefile that depending on some properties sets vpath and generates a list of source files into one variable. I need to run the makefile without compiling anything (the compilation is actually handled by a different makefile) and just see to which real files the filenames get matched depending on the vpath settings. ...

Escaping colons in filenames in a Makefile

Is there a way to get GNU make to work correctly with filenames that contain colons? The specific problem I'm running into happens to involve a pattern rule. Here's a simplified version that does not depend on cutting and pasting tab characters: % make --version GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is ...

How "make" app knows default target to build if no target is specified?

Hello Most linux apps are compiled with make make install clean As i understood, make takes names of build targets as arguments. so "install" is a target that copies some files and after that "clean" is a target that removes temporary files. But what target "make" will build if no arguments are specified (first command in my example...

Reason for Make's Popularity vs. Alternatives

What forces are at work keeping crufty old Make (with or without makefile generator tools) prominent as a build tool? Is it deficiencies in alternatives that keep them from being widely adopted, or insufficient publicity, or does something about Make keep it in place? Despite Make's many weaknesses and difficulties dealing with large ...

How to add a command in CMake but not run it ?

The idea is to define a detached "examples" target in the CMakeLists.txt that would not get executed when running: make But that would build the examples when doing make examples ...

Linking using g++ fails searching for -lstdc++

I'm trying to use someone else's Makefile to complile a very simple c++ library. The makefile is as follows: JNIFLAGS=-O2 -pthread -I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux all: rm -f ../dist/libUtils.so g++ $(JNIFLAGS) -c -m32 -o com_markets_utils_dates_NativeTime.o com_markets_utils_dates_Nativ...

keeping Eclipse-generated makefiles in the version control - any issues to expect?

we work under Linux/Eclipse/C++ using Eclipse's "native" C++ projects (.cproject). the system comprises from several C++ projects all kept under svn version control, using integrated subclipse plugin. we want to have a script that would checkout, compile and package the system, without us needing to drive this process manually from ecl...

Local installation of python

I want to install python to my local direcotory: ./configure --prefix=/home/alex/local-install && make && make install When i import sqlite3 i get the following: ImportError: No module named _sqlite3 the reason: there is no _sqlite3.so in /home/alex/local-install/lib/python2.6/lib-dynload. How can i force python to build bindings ...

Is there a unit testing framework for GNU make?

There is a number of unit test frameworks for most of the languages, but I haven't come across a unit test for GNU make. It has conditionals, loops (the $(foreach ...) statement), and allows to write pretty sophisticated code. The examples might be things like BSD ports, GARNOME, and OpenCSW GAR. There's also a debugger for GNU make....

"multiple target patterns" Makefile error

My makefile fails with error: Makefile:34: *** multiple target patterns. Stop. What does it really mean, how can I fix this? (GNU make manual, written by Captain Obvious, isn't helping). Found it. I had rule in form: $(FOO): bar where FOO was set from shell command that polluted it with error message that contained a colon. ...

splint whole program with a complex build process

I want to run splints whole program analysis on my system. However the system is quite large and different parts are compiled with different compiler defines and include paths. I can see how to convey this information to splint for a single file but I can't figure out how to do it for whole program. Does anyone know a way of doing this? ...

Parallel building with gnumake and prerequisites

My first question (yay!) is about gnumake and parallel builds. Here's a quick example file: .PHONY: tool_1 tool_2 tool_3 tool_4 all tools all: | tools tools: | tool_2 tool_3 tool_4 tool_1: # commands for tool 1 tool_2: | tool_1 # commands for tool 2 tool_3: | tool_1 # commands for tool 3 tool_4: | tool_1 # command...

Force Makefile to execute script before building targets

I am using Makefiles. However, there is a command (zsh script) I want executed before any targets is executed. How do I do this? Thanks! ...