make is a utility that automates the build process by managing dependencies amongst targets.

learn more… | top users | synonyms (1)

31
votes
4answers
15k views

Why can't gcc find libevent when building tmux from source?

I want to install tmux on a machine where I don't have root access. I already compiled libevent and installed it in $HOME/.bin-libevent and now I want to compile tmux, but configure always ends with ...
13
votes
4answers
3k views

Why people recommend the -j3 option for make when having a dual-core CPU?

In Gentoo Linux it is possible to set the MAKEOPTS variable in /etc/portage/make.conf to tell make how many jobs it should run in parallel when building packages. Since I have a dual-core CPU, I ...
12
votes
1answer
2k views

What happens in each step of the Linux kernel-building process?

I've read many tutorials about how to build custom kernels and boot Ubuntu using those kernels, and successfully followed the guides and booted custom kernels, but I have no understanding about what ...
9
votes
1answer
20k views

Where can I find a list of 'make' error codes?

I am trying to compile a program written in Fortran using make (I have a Makefile and, while in the directory containing the Makefile, I type the command $ make target, where "target" is a ...
8
votes
3answers
313 views

How does make continue compilation?

I know that I can interrupt a make process anytime without having to recompile the entire source tree again. As I know, make only compiles a target if it's not compiled yet, or the source code is ...
8
votes
2answers
6k views

How to include local header files in linux kernel module

Say I have a module mymod with source files as follows: src/mod/mymod.c src/inc/mymod.h I try to include mymod.h as follows #include <mymod.h> My makefile contains EXTRA_CFLAGS= ...
8
votes
4answers
633 views

What could be causing make to hang when compiling on multiple cores?

Yesterday I was trying to compile the ROOT package from source. Since I was compiling it on a 6 core monster machine, I decided to go ahead and build using multiple cores using make -j 6. The ...
7
votes
3answers
5k views

Why do some packages use 'make install' while other use 'sudo make install'

I recently installed LAME encoder on my server to convert wav to mp3 and that worked with './configure, make, make install; I then tried to install OGG encoder and that requires './configure, make, ...
7
votes
1answer
238 views

Are there any CheckInstall side effects or should I use it every time?

I'm using Ubuntu at work and Slackware at home. Today at work I have downloaded some suspicious program from our company repository that was supposed to automate some repetitive tasks. I installed ...
6
votes
4answers
2k views

how can a makefile detect whether a command is available in the local machine?

I began to use org-mode for planning out my tasks in GTD-style system. Putting every org files in a directory of a Dropbox folder, I run emacs to edit / manage these files from three different local ...
6
votes
1answer
114 views

How should man pages be installed?

When distributing a custom utility I'll typically write a makefile that installs binaries to /usr/local by default PREFIX ?= /usr/local MANPREFIX ?= ${PREFIX}/man install: install utility ...
6
votes
1answer
50 views

How can I get gmake to give me a list of all included makefiles?

I've inherited a major mess of a makefile network that was itself inherited from another project, with makefiles included all over the place. I'm trying to make a simple change without gutting the ...
5
votes
3answers
1k views

What are .in files?

Sometimes in the sources of projects I see "*.in" files. For example, a bunch of "Makefile.in"s. What are they for and/or what does the ".in" part mean? I assume that this has something to do with ...
5
votes
4answers
268 views

How to send stderr to stdout with a pipe to another command?

I'm trying to capture all of the output of a build operation, and send it to myprogram. I seem to only be able to capture part of it. This is what I'm trying: make clean && make ...
5
votes
4answers
1k views

What is the purpose of the 'install' command?

I've seen the install command used in a lot of Makefiles, and its existence and usage are kind of confusing. From the manpages, it seems like a knockoff of cp with less features, but I assume it ...
5
votes
2answers
242 views

Git commit from within a Makefile

I have a Makefile for a Latex project I'm working on. Makefiles aren't my forte, but is there a way to do something like: make git "My comment" And have the makefile execute: git commit -m "My ...
5
votes
3answers
897 views

Installing from source. How to resolve dependencies without destroying the package manager.

I don't consider myself a total noob, but compiling and installing software is a pain and problem I cannot overcome. I just want to run down through my understanding of this process with someone more ...
5
votes
1answer
182 views

Strange behavior automating with “make -f”

I have a set of directories, some of which contain makefiles, and some of the makefiles have clean targets. In the parent directory, I have a simple script: #!/bin/bash for f in *; do if [[ ...
5
votes
2answers
566 views

How to buld with MAKE and only --silent output on screen, but get full output to log file

How can I redirect output from MAKE i such a way that I get only --silent output to screen, but full MAKE-output to a log file? Or can this be achieved through some sdout/stderr redirection magic?
5
votes
1answer
88 views

Build Transmission 2.84 .deb package with checkinstall

I'm trying to compile and make by myself some .deb packages to keep my Raspbian more up to date than the repository. Now I want to update Transmission to v 2.84. Here's what I've done: Download the ...
4
votes
4answers
140 views

Make mistakenly thinks rule succeeded because of 0-sized file generated by output redirect

In a makefile, I have several rules that look like this: out.txt: foo.sh input.txt ./foo.sh -i input.txt > out.txt If foo.sh fails, then out.txt will be created as a 0-sized file. If I run ...
4
votes
3answers
8k views

Adding directory to PATH through Makefile

I'm having some trouble in exporting the PATH I've modified inside the Makefile into the current Terminal. I'm trying to add to the PATH, the bin folder inside wherever the Makefile directory is. ...
4
votes
2answers
677 views

Forcing GNU make to run commands in order

With the following Makefile, GNU make runs the two commands in parallel. Since the first one takes time to finish, rm *.log is run before the log file is created, and fails. dummy.pdf: dummy.tex ...
4
votes
3answers
572 views

What is a subshell (in the context of the documentation of make)?

I'm reading a book about the make command and there is a paragraph: If any of the prerequisites has an associated rule, make attempts to update those first. Next, the target file is considered. ...
4
votes
1answer
155 views

Why does diff fail when invoked from a Makefile?

Narrow-down of a patch problem I am trying to troubleshoot: Only two files, each with a size of 1 byte: file a (containing 'a') file b (containing 'b') and Goal is to make and then apply a patch ...
4
votes
1answer
658 views

How to build a custom kernel with localmodconfig that support hardware of multiple machines?

When configuring a server to run a single task, like an appliance, there might rise the need to build a custom kernel. For example to save disk space. Ubuntu Core 13.10 amd64 root filesystem is a ...
4
votes
1answer
50 views

Check last messages

I let a make command running last night when connected via SSH to a remote machine. Then had to close that SSH session, letting make run. How can I check the last printed messages on the console (to ...
4
votes
2answers
708 views

Do GNUmakefile, GNUmakefile.am, and GNUmakefile.in indicate that Automake has been used?

The source folder of rtnet contains only the above mentioned files for compilation purposes. Remaining files are the source code of the examples. Question is that do these files indicate that they ...
4
votes
2answers
518 views

Replace one line with STDIN in a Makefile

One Makefile target is supposed to be in charge of: grabbing the output of $ perl Markdown.pl src/index.md (markdown to html) using that string to replace one line, something like CONTENT ...
4
votes
2answers
591 views

upgrade xdebug without using apt?

I'm running debian 5.0.6 and have installed xdebug 2.0.3 via aptitude. Now I want to install PHPUnit, and when trying to do it through pear, I get the error that PHPUnit wants a more recent xdebug ...
4
votes
2answers
46 views

Find out extension of executable files?

When I am building software from source on a GNU+Linux system, during the ./configure stage I frequently see the following line: checking for suffix of executables... How do I create such a check ...
4
votes
1answer
244 views

Configure vim's :make to switch or open tabs on error

When I run :make from vim and there's an error, it opens that file on the error line number in the current buffer. If possible, I would prefer it switch tabs to the file if it's already open, or make ...
4
votes
1answer
60 views

What does “make install” do in the Makefile that comes with the kernel?

I'm trying to identify what does make install do with the kernel and what does the actual "install" of the kernel once it's been compiled means. The problem is I can't really identify the target ...
4
votes
1answer
3k views

GCC error trying to exec 'cc1'

I was cross compiling a Linux kernel for my Raspberry Pi on a laptop (running debian 7) (followed the instructions here) but when I start compiling (make ARCH=arm CROSS_COMPILE=${CCPREFIX}) I get the ...
4
votes
2answers
153 views

What are the reasons for each line in Makefile to be executed in a separate shell?

Each command in Makefile is executed by a separate shell. What is the reason for this? Why commands aren't executed as in a regular script? I am aware that it is possible to use one shell using ...
4
votes
2answers
1k views

Get top-level directory from makefile variable

What is the simplest code to get the top-level directory part of a makefile variable? Example: BUILD_DIR = dir/subdir/.../sub-a-dub-dir distclean: rm -rf <some code which evaluates to ...
3
votes
2answers
118 views

“No target” error using Make

I'm learning how to use make and makefiles, so I wrote this little file: %.markdown: %.html pandoc -o $< $@ But when I run make, all I get is make: *** No targets. Stop. What's going on? ...
3
votes
2answers
97 views

How to write software to compile with external libraries?

I want to code open source software with dependencies. I have skills in C/C++ and a minimum makefile knowledge. But im curious about coding this like ./configure && make stuff and how to ...
3
votes
1answer
52 views

Compiling software with the same options as a previous install

I want to compile and install a software on a new VM. The software was installed successfully on a different VM by a different admin, but I want to duplicate the exact command with the options that he ...
3
votes
2answers
5k views

Ubuntu make fails with No such file or directory /lib/modules/3.4.0/build

I am trying to build the CP210x driver for the 3.x.x kernel on ChrUbuntu. Build instructions: Ubuntu: make ( your cp210x driver ) cp cp210x.ko ...
3
votes
1answer
3k views

Unable to install LAN driver in RedHat (*** /lib/modules/2.6.32-358.el6.i686/build: No such file or directory)?

I tried to install the Realtek LAN driver on my RHEL Server (running version 6.4). In the folder extracted: autorun.sh log.txt Makefile README src \>type command: ./autorun.sh ...
3
votes
1answer
328 views

How to change the compiler settings with AutoMake?

I want to build a library with a specific tool instead of GCC. The regular build sequence is: ./configure make make install Where should I replace the GCC settings (I think that the configure was ...
3
votes
1answer
710 views

How do I change which version of Qt is used for qmake?

I feel like there should be a simple way of doing this, but my googlefu is failing so I'd really appreciate some info on how to switch (or even permanently change) which version of Qt is used when ...
3
votes
1answer
538 views

Install dwb browser

I try to install dwb on debian wheezy. There is a package but the version is old and I would like a newer version. The version in wheezy does not provide dwbem, suddenly I can not install flaskblock ...
3
votes
1answer
464 views

How to save the results from ls to a command?

I want the results from an ls to be saved in a var inside a makefile the command is simply the following: ls text* and the result suppose to be something like : text1.txt What i put in my script ...
3
votes
1answer
151 views

unresolved dependencies of bz* files for rpm make from source

I am trying to do a build of rpm from source. I got through the ./configure and ran through a good chunk of make. Unfortunately I keeping getting stopped up on undefined references to bzerror, ...
3
votes
1answer
86 views

Why doesn't 'ar' work like the manpage says?

I'm trying to use 'ar' included in Debian Wheezy armel version of binutils and it doesn't seem to operate like on other systems I've encountered. Some sample output from the command-line: $ ar ...
3
votes
1answer
177 views

Make Completion Progress Script

Any time I'm executing a build process that takes several hours, I inevitably stare at my terminal and wonder, "how much longer?" Sometimes, I manually pick up on some pathname echoed to the terminal ...
3
votes
1answer
3k views

Why can't ld find this library?

I'm not very knowledgeable on this topic, and therefore can't figure out why the following command does not work: $ gfortran -o dsimpletest -O dsimpletest.o ../lib/libdmumps.a \ ...
3
votes
0answers
137 views

What steps are involved in porting an Xorg OpenGL app to DirectFB?

I'm looking for a birds-eye view on porting a small app1 that uses some OpenGL functions from it's home on Xorg to run in a more stand-alone fashion using DirectFB. I am unfamiliar with both C and ...