source: trunk/minix/man/man1/make.1@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.0 KB
RevLine 
[9]1.TH MAKE 1
2.SH NAME
3make \- a program for maintaining large programs
4.SH SYNOPSIS
5\fBmake\fR [\fB\-f \fIfile\fR]\fR [\fB\-adeiknpqrst\fR] [\fIoption\fR] ... [\fItarget\fR]\fR
6.br
7.de FL
8.TP
9\\fB\\$1\\fR
10\\$2
11..
12.de EX
13.TP 20
14\\fB\\$1\\fR
15# \\$2
16..
17.SH OPTIONS
18.FL "\-f" "Use \fIfile\fP as the makefile"
19.FL "\-d" "Print debugging information"
20.FL "\-e" "Environment overrides makefile macros"
21.FL "\-i" "Ignore status returned by commands"
22.FL "\-k" "On error, skip to next command"
23.FL "\-n" "Report, but do not execute"
24.FL "\-p" "Print macros and targets"
25.FL "\-q" "Question up-to-dateness of target"
26.FL "\-r" "Rule inhibit; do not use default rules"
27.FL "\-s" "Silent mode"
28.FL "\-t" "Touch files instead of making them"
29.SH EXAMPLES
30.EX "make kernel" "Make \fIkernel\fP up to date"
31.EX "make \-n \-f mfile" "Tell what needs to be done"
32.SH DESCRIPTION
33.PP
34.I Make
35is a program that is normally used for developing large programs consisting of
36multiple files.
37It keeps track of which object files depend on which source and header files.
38When called, it does the minimum amount of recompilation to bring the target
39file up to date.
40.PP
41The file dependencies are expected in
42.I makefile
43or
44.I Makefile ,
45unless another file is specified with \fB\-f\fR.
46.I Make
47has some default rules built in, for example, it knows how to make
48.I .o
49files
50from
51.I .c
52files.
53Here is a sample
54.I makefile .
55.PP
56.nf
57.ta +0.2i +\w'program:'u+1m +\w'cc \-o program head.o tail.o'u+2m
58 d=/user/ast # \fId\fP is a macro
59 program: head.o tail.o # \fIprogram\fR depends on these
60 cc \-o program head.o tail.o # tells how to make \fIprogram\fP
61 echo Program done. # announce completion
62 head.o: $d/def.h head.c # \fIhead.o\fP depends on these
63.br
64 tail.o: $d/var.h tail.c # \fItail.o\fP depends on these
65.PP
66.fi
67A complete description of \fImake\fR would require too much space here.
68Many books on
69\s-2UNIX\s+2
70discuss
71.I make .
72Study the numerous \fIMakefiles\fR in the
73\s-1MINIX 3\s-1
74source tree for examples.
75.SH "SEE ALSO"
76.BR cc (1).
Note: See TracBrowser for help on using the repository browser.