Questions tagged [make]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
171 views

What is the relation between edges in a dependency graph and the program call to create a vertex?

A Makefile is a representation of a depency graph. The files are the vertices, for example somefunctions.h, somefunctions.c and myprogram.c are the "input" vertices (is there a formal word ...
Psirus's user avatar
  • 147
2 votes
2 answers
228 views

Any patterns for extracting tooling from multiple repositories?

I'm working on a project where an increasing number of small mini apps all share nearly the same tooling - makefiles, dockerfiles, jenkinsfiles and webpack configs, along with a couple of scripts, are ...
Dan Monego's user avatar
19 votes
6 answers
4k views

Why should makefiles have an "install" target?

Coming from the world of C and C++, most build system have an install target, notably Makefiles (where it is recommended by GNU for example) or CMake. This target copies the runtime files (executables,...
Synxis's user avatar
  • 307
1 vote
1 answer
341 views

Practices to build test vs release versions of code?

I've written an application which reads a list of filenames and does stuff on those files. Dynamic allocation is not allowed and our language of choice is C. The app has an array to hold the ...
DeepDeadpool's user avatar
7 votes
1 answer
334 views

Is it useful to write a clean make target nowadays?

Make comes from a time when version control was fairly immature. I understand the need for a streamlined way to clean the workspace back then. Nowadays any decent version control tool can clean the ...
marcv81's user avatar
  • 176
4 votes
1 answer
352 views

Using Makefile as a script repository

Is it reasonable to use Makefile targets as scripts? So for example, instead of having a script script_A, script_B, etc, and running them as standard executables with ./script_A, we have a makefile ...
gardenhead's user avatar
  • 4,739
14 votes
3 answers
4k views

Why incremental builds in "make" don't use hashing algorithms?

I am a beginner with make and I'm wondering about when to use make clean. One colleague told me that incremental builds with make are based on the files timestamps. So, if you checkout an old version ...
filaton's user avatar
  • 309
0 votes
2 answers
51 views

Make: Greedy search for sources vs. a more selective approach... or a hybrid?

I rewrote my makefile a while back to get the benefit of greedily searching for and compiling all sources under some root folder. I'm very happy with it except for the fact that the source libraries I ...
Engineer's user avatar
  • 767
3 votes
1 answer
2k views

How to deal with relative paths in out of source build?

An out of source build is a build which can be in any directory other than the source directory I have a project which contains relative paths to some resource files, needed at runtime, which are ...
user695652's user avatar
4 votes
1 answer
869 views

Makefile for library project to be able to compile the unit tests and the demo program using make

I am new to makefiles and I am developing a (non-executable) library in C++. Additionally to the library I have (executable) unit tests and an (executable) demo program. I would now like to be able ...
user695652's user avatar
3 votes
2 answers
672 views

What uses are there today for manually writing Makefiles? [closed]

I remember the general gist of writing Makefiles, but, due to CMake, autotools and other such Makefile generators, I've forgotten so many details that, if you were to ask me to write a makefile from ...
Greg Kramida's user avatar
46 votes
8 answers
23k views

Is directly using Make considered obsolete? [closed]

So I have been coming across many comments/posts/etc regarding creating makefiles directly, and how it is a silly thing to do in 2015. I am aware of tools such as CMake, and I actually use CMake quite ...
JParrilla's user avatar
  • 681
11 votes
5 answers
10k views

Is a makefile really needed

I have been programming in c/c++ for a while now, and I have never once used a makefile. I know that it is supposed to be useful when you are dealing with a large project, but I have always been able ...
Ankush's user avatar
  • 841
8 votes
5 answers
4k views

Why doesn't Haskell have a 'format' function for string interpolation?

I'm trying to use Shake and I stumbled upon the following problem: there's no easy and convenient way to interpolate a string. I know about Text.Printf — it's not what I'm looking for. The ...
Michael Pankov's user avatar
2 votes
2 answers
634 views

Is there a better way to organize my module tests that avoids an explosion of new source files?

I've got a neat (so I thought) way of having each of my modules produce a unit-test executable if compiled with the -DTESTMODULE flag. This flag guards a main() function that can access all static ...
luser droog's user avatar
3 votes
1 answer
566 views

How do I transparently cache data in intermediate stages of processing?

I am working with MATLAB on a model reduction algorithm. It is basically a data processing pipeline. ckt = generate_ckt(ckt_properties); freq = generate_fpoints(fconfig); result = freq_dom_sim(ckt,...
Milind R's user avatar
  • 155
3 votes
1 answer
6k views

Generating CMakeLists.txt [closed]

I got a bunch of C++ sources files and headers. They may use external libraries such as Boost e.g. I am interested in the process of building binaries for Windows and *nix. Makefiles (*nix) and ....
vanna's user avatar
  • 337
11 votes
8 answers
4k views

How important is it to learn makefiles? [closed]

I work in c++ mostly as a hobby (I'm still in school and therefor don't have a real job). The IDEs generate the makefile for me and so I'm wondering if it's worth learning how to make them myself. By "...
sinθ's user avatar
  • 1,311
11 votes
2 answers
26k views

How many make threads to use?

When I (re-)build large systems on a desktop/laptop computer, I tell make to use more than one thread to speed up the compilation speed, like this: $ make -j$[ $K * $C ] Where $C is supposed to ...
bitmask's user avatar
  • 879
1 vote
1 answer
848 views

what's the most efficient emacs workflow for compilation and interactive execution cycles (C++/makefile)

I try not to cross-post, but the only response I got at stack-exchange was to post here... What's the preferred practice for a compile-run cycle in emacs? Previously, I used alt-x compile (mapped to ...
daj's user avatar
  • 11
14 votes
4 answers
39k views

Is there a general rule for when you should use 'make clean' instead of just 'make'?

I am writing a multiple-filed program right now, and apparently running only 'make' (as one would intuitively think needs to be done in most situations) for some reason causes my program to fail. I ...
Dark Templar's user avatar
  • 6,293