make

What GNU make substitute do you recommend?

Imagine you're free to choose a tool like GNU make for a new C++ project. What would you choose? Are any usable substitutes out there? It shall have/be a command line interface "easy" to understand ;) easy to set up for a default c++ project may support src/bin seperation as common for Java may not add too much dependencies to other s...

Appending to variable in Makefiles for HP-UX make

I'm trying to append some text to a variable in a Makefile for HP-UX's version of make. If i use the "normal" appender, like this: CFLAGS+=some text $(CFLAGS) comes out empty. If i reference the variable, like this: CFLAGS=$(CFLAGS) some text make complains about "infinitely recursive macro." Using a temporary variable like this...

Getting the name of the makefile from the makefile

How to get the name of the makefile in the makefile? Thanks. Note: I would need that because I would like my makefile to call itself, but the makefile is not called Makefile, so I'd like to write something like this: target: ($MAKE) -f ($MAKEFILENAME) other_target ...

Automatic increment of build number in QT Creator

I would like to have a variable (or #define) in C++ source that will increment each time I use QT Creator to build source code. Is there any way I can do this, perhaps some QT Creator plugin or similar? If there is a way to do it if I use "make" on command line to build? ...

Convert hex to decimal in make script?

A make script is attempting to set a variable as follows: VER_DEC=$( perl -e "print hex(\"$(VER_HEX)\");" ) where VER_HEX happens to have a value of 0a. Perl seems to think that VER_HEX is zero, implying that the variable isn't set (but it is, according to a debug echo in the makefile). Does make have a simpler way to convert bases?...

How can I replicate the functionality of the Flash Builder's release tool in ant?

I want to build an ant script that does exactly the same compilation actions on a Flash Builder 4 (Gumbo) project as the Project->Export Release Build... menu item does. My ant-fu is reasonably strong, that's not the issue, but rather I'm not sure exactly what that entry is doing. Some details: I'll be using the 3.x SDK (say, 3.2 for...

What's the opposite of 'make install', ie. how do you uninstall a library in Linux?

While running ./configure --prefix=/mingw on a MinGW/MSYS system for a library I had previously run './configure --prefix=/mingw && make && make install' I came across this message: WARNING: A version of the Vamp plugin SDK is already installed. Expect worries and sorrows if you install a new version without removing the old one...

Set debugging macro conditionally with make

In my C++ project, I have a convention where whenever the macro DEBUG is defined, debugging printf-esque statements are compiled into the executable. To indicate whether or not I want these compiled into the executable, I normally would pass the macro name to gcc with the -Dmacro option. So, in the Makefile I (currently) have: CXXFLAG...

Is this a good way to be root in a makefile?

Is this a good way to be root in a makefile? SHELL = /bin/sh INSTDIR = /usr/bin/ OBJS = main.o file.o gen.o stat.o program1: $(OBJS) gcc -o program1 $(OBJS) main.o: main.c file.h gen.h stat.h gcc -c main.c file.o: file.c file.h gcc -c file.c gen.o: gen.c gen.h gcc -c gen.c stat.o: stat.c stat.h ...

Lock across several jvm ?

Hi, this is a bit related to this question. I'm using make to extract some information concerning some C programs. I'm wrapping the compilation using a bash script that runs my java program and then gcc. Basically, i'm doing: make CC=~/my_script.sh I would like to use several jobs (-j option with make). It's running several processe...

MySQL Connector C++ - make Error 1

Hi! I'm writing an application in C++ (using Eclipse with Linux GCC) that's supposed to interact with my MySQL server. I've downloaded the MySQL Connector C++ a, precompiled, and copied the files into the directories (/usr/lib, /usr/include). I've referenced in in the GCC C++ Linker Section of the Project Properties in Eclipse ( "mysqlc...

Using make on OSX

I have a macbook I'm trying to do some development on. I have a program I want to build, and when I went to use make to build it I got a "command not found" error. I did some google and SO searches and it doesn't look like this is a common problem. Why don't I have make installed and how do I get it? I'm extra confused because I know I u...

Can Make undefine a variable ?

I'm working in an embedded system (RTXC) where I need to disable the debugger functionality which is enabled through a #define command. However, when I change the #define to undefine, compilation goes off fine, but when the linker runs, it encounters an error about a symbol not existing that belongs to the debug code (which should have ...

GNU Make and wildcards - missing files

I have a Makefile with the following type of rule: %.html: ./generate-images.py > $@ make $(patsubst %.png,%.gif,$(wildcard *.png)) The generate-images script writes not only the HTML file (to stdout) but several .png files to the current directory. The goal here is to convert them to .gif. (not really, but this is an example)...

Overriding build rules in make

I'm using a Makefile to build an embedded project. I've inherited the project from numerous previous developers who haven't been using Make to its full potential, and I'd like to be able to specify the project version in the makefile using defines on the build command. However, there's already a build rule that builds all the object (....

How can I create directories using subversion version numbers in gnu make?

Thanks to 'Beta' my solution: RLS_DIRECTORY = $(shell svnversion -cn | sed 's/:/-/') SVN_VERSION = $(shell svnversion -cn | sed -r 's/.+://') RELEASE_NOTES = $(RLS_DIRECTORY:=/release-notes-$(SVN_VERSION:=.txt)) -include svn-version.mk SVN_OLD_VERSION ?= 0 .PHONY = all zip release release: $(RELEASE_NOTES) $(RLS_DIRECTORY): m...

How to format/change qmake build output

Hello, how can I format the make output (!!by only changing the qmake project file!!). My compilation lines continue growing, and the one-line-warnings/errors almost disappear between them. I am thinking of something like $(CC) in.ext -o out.ext thanks in regard ...

make: hierarchical make file

(disclaimer: I am used to scons ... I am somewhat unexperienced with make) Context: I am using Eclipse CDT which generates makefiles. Let's say I have a project directory 'lib' and 2 build configurations 'Debug' and 'Release'. Eclipse CDT gracefully generates a makefile for each build configuration. The said makefiles end-up residing ...

How to install pycairo on osx?

I am trying to install the pycairo (Python bindings for the cairo graphics library) under OSX. I started with easy_install pycairo and got: Requested 'cairo >= 1.8.8' but version of cairo is 1.0.4 error: Setup script exited with Error: cairo >= 1.8.8 not found So I went to cairo's site and downloaded the latest package (1.8.8) o...

What does the load-average used by parallel make represent?

Using GNU make on Windows, what exactly does the load-average value represent? For example: make -j --load-average=2.5 What does the 2.5 mean? ...