make

Why do I get an amibguity error when I compile from the command line, but not from the IDE?

I am trying to compile a rather large project with Borland C++ Builder 5.5. The project compiles in the IDE, but is much too slow. However, when I compile with the command line I get an ambiguity error that was not present in the IDE: Error E2015 Project.h 536: Ambiguity between 'TTreeNode' and 'Comctrls::TTreeNode' My command line a...

Dependency problem with gnu make

Hi all, I am facing a rather strange problem with make. My make file contains: all: item1 item2 item1: dep1 dep2 dep1: @echo cd $(HOME)/apps; /bin/rm -f $(D_ALL_OBJECTS) cd $(SRCHOME)/fusionapps; make -k -f $(SOMEMAKEFILE) $(D_ALL_OBJECTS) @echo dep2: @echo cd $(HOME)/apps; /bin/rm -f $(D2_ALL_OBJECTS) cd...

Why does GNU make delete a file...

I've got a slightly hackish makefile for running tests: ### Run the tests tests := tests/test1 tests/test2 ... test: $(tests) $(tests): %: %.c gcc -o $@ $(testflags) $< $@ It works, but it makes Make do something I've never seen it do before. My test is currently broken, and causes a bus error. Make gives the following outp...

How can I automatically create (and remove) a temp directory in a Makefile?

Is it possible to have make create a temp directory before it executes the first target? Maybe using some hack, some additional target etc.? All commands in the Makefile would be able to refer to the automatically created directory as $TMPDIR, and the directory would be automatically removed when the make command ends. ...

How can I use bash syntax in Makefile targets?

I often find bash syntax very helpful, e.g. process substitution like in diff <(sort file1) <(sort file2). Is it possible to use such bash commands in a Makefile? I'm thinking of something like this: file-differences: diff <(sort file1) <(sort file2) > $@ In my GNU Make 3.80 this will give an error since it uses the shell instead...

Cygwin make error : *** target pattern contains no `%'

I got this error while (re)building, using cygwin make.exe version :3.81. Error : *** target pattern contains no `%'. ...

How to configure Eclipse with CDT?

Hello, I've been trying to use CDT with Eclipse 3.4 under Windows XP with cygwin. What do I need to do, in order to get startet? I used "eclipse-cpp-ganymede-SR1-win32.zip" found on the Eclipse homepage. Edit: The main problem is, that I cannot compile and run the code. In the run configuration, I tried gcc.exe for the C/C++ Applica...

How can I set ccshared=-fPIC while executing ./configure?

I am trying to build Python 2.6 for QGIS on RHEL 5. During the making of QGIS I get the following error: Linking CXX shared library libqgispython.so /usr/bin/ld: /usr/local/lib/python2.6/config/libpython2.6.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /u...

Makefile for multi-file LaTeX document

I'm trying to simplify/improve the Makefile for compiling my thesis. The Makefile works nicely for compiling the whole thing; I've got something like this: show: thesis.pdf open thesis.pdf thesis.pdf: *.tex pdflatex --shell-escape thesis This allows me to type make and any changes are detected (if any) and it's recompiled bef...

Getting make to delete additional files on error

We're having some discussion lately about the way we handle .d files for dependencies in our make-based build process. The issue has been raised that sometimes the .d files can become corrupted when builds are interrupted. We're using the .DELETE_ON_ERROR target to ensure that if a build is interrupted or fails, the object files that i...

How could I improve this Makefile?

I don't know much about creating Makefiles, but I've been reading the make manual and I have made some progress. My Makefile works and does what I want. My situation usually involves between 1 and 3 different program needed to be compiled and sent to my TA for marking and such via a webform. The structure of each application is 'prog.c'...

Use sqlite to manage Makefile build flags

I build for more than two dozen targets from a source tree with usually three active branches with both production and debug builds. To date I've used a personal Makefile that defines the target which includes a common Makefile that defines the compile flags which then includes the Makefile from a specific source tree. This works but I...

Preventing :make in VIM from going to a warning.

I have a warning I can not easily remove from my build, every time i run ":make" from inside vim the quickfix takes me to some header file I don't care about. How can I prevent VIM from doing this and only showing me warnings and errors I do care about? ...

program runs when launched by make, but not via shell - crazy nonsense!

I wrote a C program in which I did some pretty heavy stack allocation, around 2 MiB. Since I use the poor man's IDE* I was automatically running the program via make in order to test it, each time I compiled. I had pretty much wrapped everything up, but for some reason, during some of the final optimization, I ran it directly from the s...

In GNU Make, how do I convert a variable to lower case?

This is a silly question, but.... with GNU Make: VAR = MixedCaseText LOWER_VAR = $(VAR,lc) default: @echo $(VAR) @echo $(LOWER_VAR) In the above example, what's the correct syntax for converting VAR's contents to lower case? The syntax shown (and everything else I've run across) result in LOWER_VAR being an empty stri...

Why is make complaining about circular dependencies?

I have built a make file for my project, and it works (everything compiles) but it gives these irritating error messages: make: Circular zpr.c <- zpr.o dependency dropped. gcc -Wall -c -o zpr.o zpr.c make: Circular readjpeg.c <- readjpeg.o dependency dropped. gcc -Wall -c -o readjpeg.o readjpeg.c make: Circular readppm.c <- readppm....

Best build system for embedded development/cross-compiling

I'm doing some development right now using dsPICs and I'm not exactly in love with MPLAB. I'm actually using Visual Studio with a makefile project. Currently I'm using SCons, which seems to work fairly well, after finding a helpful guide to setting up to use an alternate compiler. Still, I can't help but wonder, is there a better build ...

Master Makefile for Subprojects Won't Compile Subprojects

I have a project that I am working to release that actually contains 3 subprojects, all of which need to be compiled in one go. My makefile looks roughly like this: all: a b c a: @cd a && make b: @cd b && make c: @cd c && make Projects A and B both compile fine but for the 3rd project, it tells me there is nothing to b...

GCC/Make Build Time Optimizations

We have project which uses gcc and make files. Project also contains of one big subproject (SDK) and a lot of relatively small subprojects which use that SDK and some shared framework. We use precompiled headers, but that helps only for re-compilation to be faster. Is there any known techniques and tools to help with build-time optim...

OS detecting makefile

I routinely work on several different computers and several different operating systems, which are Mac OS X, Linux, or Solaris. For the project I'm working on, I pull my code from a remote git repository. I like to be able to work on my projects regardless of which terminal I'm at. So far, I've found ways to get around the OS changes by...