1 This is make.info, produced by makeinfo version 4.2 from make.texi.
3 INFO-DIR-SECTION GNU Packages
5 * Make: (make). Remake files automatically.
8 This file documents the GNU Make utility, which determines
9 automatically which pieces of a large program need to be recompiled,
10 and issues the commands to recompile them.
12 This is Edition 0.60, last updated 08 July 2002, of `The GNU Make
13 Manual', for `make', Version 3.80.
15 Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
16 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
18 Permission is granted to copy, distribute and/or modify this document
19 under the terms of the GNU Free Documentation License, Version 1.1 or
20 any later version published by the Free Software Foundation; with no
21 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
22 Texts. A copy of the license is included in the section entitled "GNU
23 Free Documentation License".
26 File: make.info, Node: Complex Makefile, Next: GNU Free Documentation License, Prev: Error Messages, Up: Top
28 Complex Makefile Example
29 ************************
31 Here is the makefile for the GNU `tar' program. This is a
32 moderately complex makefile.
34 Because it is the first target, the default goal is `all'. An
35 interesting feature of this makefile is that `testpad.h' is a source
36 file automatically created by the `testpad' program, itself compiled
39 If you type `make' or `make all', then `make' creates the `tar'
40 executable, the `rmt' daemon that provides remote tape access, and the
43 If you type `make install', then `make' not only creates `tar',
44 `rmt', and `tar.info', but also installs them.
46 If you type `make clean', then `make' removes the `.o' files, and
47 the `tar', `rmt', `testpad', `testpad.h', and `core' files.
49 If you type `make distclean', then `make' not only removes the same
50 files as does `make clean' but also the `TAGS', `Makefile', and
51 `config.status' files. (Although it is not evident, this makefile (and
52 `config.status') is generated by the user with the `configure' program,
53 which is provided in the `tar' distribution, but is not shown here.)
55 If you type `make realclean', then `make' removes the same files as
56 does `make distclean' and also removes the Info files generated from
59 In addition, there are targets `shar' and `dist' that create
62 # Generated automatically from Makefile.in by configure.
63 # Un*x Makefile for GNU tar program.
64 # Copyright (C) 1991 Free Software Foundation, Inc.
66 # This program is free software; you can redistribute
67 # it and/or modify it under the terms of the GNU
68 # General Public License ...
74 #### Start of system configuration section. ####
78 # If you use gcc, you should either run the
79 # fixincludes script that comes with it or else use
80 # gcc with the -traditional option. Otherwise ioctl
81 # calls will be compiled incorrectly on some systems.
84 INSTALL = /usr/local/bin/install -c
85 INSTALLDATA = /usr/local/bin/install -c -m 644
87 # Things you might add to DEFS:
88 # -DSTDC_HEADERS If you have ANSI C headers and
90 # -DPOSIX If you have POSIX.1 headers and
92 # -DBSD42 If you have sys/dir.h (unless
93 # you use -DPOSIX), sys/file.h,
94 # and st_blocks in `struct stat'.
95 # -DUSG If you have System V/ANSI C
96 # string and memory functions
97 # and headers, sys/sysmacros.h,
98 # fcntl.h, getcwd, no valloc,
101 # -DNO_MEMORY_H If USG or STDC_HEADERS but do not
103 # -DDIRENT If USG and you have dirent.h
105 # -DSIGTYPE=int If your signal handlers
106 # return int, not void.
107 # -DNO_MTIO If you lack sys/mtio.h
109 # -DNO_REMOTE If you do not have a remote shell
111 # -DUSE_REXEC To use rexec for remote tape
112 # operations instead of
113 # forking rsh or remsh.
114 # -DVPRINTF_MISSING If you lack vprintf function
115 # (but have _doprnt).
116 # -DDOPRNT_MISSING If you lack _doprnt function.
117 # Also need to define
119 # -DFTIME_MISSING If you lack ftime system call.
120 # -DSTRSTR_MISSING If you lack strstr function.
121 # -DVALLOC_MISSING If you lack valloc function.
122 # -DMKDIR_MISSING If you lack mkdir and
123 # rmdir system calls.
124 # -DRENAME_MISSING If you lack rename system call.
125 # -DFTRUNCATE_MISSING If you lack ftruncate
127 # -DV7 On Version 7 Unix (not
128 # tested in a long time).
129 # -DEMUL_OPEN3 If you lack a 3-argument version
130 # of open, and want to emulate it
131 # with system calls you do have.
132 # -DNO_OPEN3 If you lack the 3-argument open
133 # and want to disable the tar -k
134 # option instead of emulating open.
135 # -DXENIX If you have sys/inode.h
136 # and need it 94 to be included.
138 DEFS = -DSIGTYPE=int -DDIRENT -DSTRSTR_MISSING \
139 -DVPRINTF_MISSING -DBSD42
140 # Set this to rtapelib.o unless you defined NO_REMOTE,
141 # in which case make it empty.
142 RTAPELIB = rtapelib.o
144 DEF_AR_FILE = /dev/rmt8
148 CFLAGS = $(CDEBUG) -I. -I$(srcdir) $(DEFS) \
149 -DDEF_AR_FILE=\"$(DEF_AR_FILE)\" \
150 -DDEFBLOCKING=$(DEFBLOCKING)
154 # Prefix for each installed program,
155 # normally empty or `g'.
158 # The directory to install tar in.
159 bindir = $(prefix)/bin
161 # The directory to install the info files in.
162 infodir = $(prefix)/info
164 #### End of system configuration section. ####
166 SRC1 = tar.c create.c extract.c buffer.c \
167 getoldopt.c update.c gnu.c mangle.c
168 SRC2 = version.c list.c names.c diffarch.c \
169 port.c wildmat.c getopt.c
170 SRC3 = getopt1.c regex.c getdate.y
171 SRCS = $(SRC1) $(SRC2) $(SRC3)
172 OBJ1 = tar.o create.o extract.o buffer.o \
173 getoldopt.o update.o gnu.o mangle.o
174 OBJ2 = version.o list.o names.o diffarch.o \
175 port.o wildmat.o getopt.o
176 OBJ3 = getopt1.o regex.o getdate.o $(RTAPELIB)
177 OBJS = $(OBJ1) $(OBJ2) $(OBJ3)
178 AUX = README COPYING ChangeLog Makefile.in \
179 makefile.pc configure configure.in \
180 tar.texinfo tar.info* texinfo.tex \
181 tar.h port.h open3.h getopt.h regex.h \
182 rmt.h rmt.c rtapelib.c alloca.c \
183 msd_dir.h msd_dir.c tcexparg.c \
184 level-0 level-1 backup-specs testpad.c
186 all: tar rmt tar.info
189 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
192 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rmt.c
194 tar.info: tar.texinfo
198 $(INSTALL) tar $(bindir)/$(binprefix)tar
199 -test ! -f rmt || $(INSTALL) rmt /etc/rmt
200 $(INSTALLDATA) $(srcdir)/tar.info* $(infodir)
202 $(OBJS): tar.h port.h testpad.h
203 regex.o buffer.o tar.o: regex.h
204 # getdate.y has 8 shift/reduce conflicts.
210 $(CC) -o $@ testpad.o
216 rm -f *.o tar rmt testpad testpad.h core
219 rm -f TAGS Makefile config.status
225 shar $(SRCS) $(AUX) | compress \
226 > tar-`sed -e '/version_string/!d' \
227 -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
233 -e '/version_string/!d' \
234 -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
239 ln $(SRCS) $(AUX) `cat .fname`
240 tar chZf `cat .fname`.tar.Z `cat .fname`
241 -rm -rf `cat .fname` .fname
243 tar.zoo: $(SRCS) $(AUX)
247 for X in $(SRCS) $(AUX) ; do \
251 cd tmp.dir ; zoo aM ../tar.zoo *
255 File: make.info, Node: GNU Free Documentation License, Next: Concept Index, Prev: Complex Makefile, Up: Top
257 GNU Free Documentation License
258 ******************************
260 Version 1.1, March 2000
261 Copyright (C) 2000 Free Software Foundation, Inc.
262 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
264 Everyone is permitted to copy and distribute verbatim copies
265 of this license document, but changing it is not allowed.
269 The purpose of this License is to make a manual, textbook, or other
270 written document "free" in the sense of freedom: to assure everyone
271 the effective freedom to copy and redistribute it, with or without
272 modifying it, either commercially or noncommercially. Secondarily,
273 this License preserves for the author and publisher a way to get
274 credit for their work, while not being considered responsible for
275 modifications made by others.
277 This License is a kind of "copyleft", which means that derivative
278 works of the document must themselves be free in the same sense.
279 It complements the GNU General Public License, which is a copyleft
280 license designed for free software.
282 We have designed this License in order to use it for manuals for
283 free software, because free software needs free documentation: a
284 free program should come with manuals providing the same freedoms
285 that the software does. But this License is not limited to
286 software manuals; it can be used for any textual work, regardless
287 of subject matter or whether it is published as a printed book.
288 We recommend this License principally for works whose purpose is
289 instruction or reference.
291 1. APPLICABILITY AND DEFINITIONS
293 This License applies to any manual or other work that contains a
294 notice placed by the copyright holder saying it can be distributed
295 under the terms of this License. The "Document", below, refers to
296 any such manual or work. Any member of the public is a licensee,
297 and is addressed as "you".
299 A "Modified Version" of the Document means any work containing the
300 Document or a portion of it, either copied verbatim, or with
301 modifications and/or translated into another language.
303 A "Secondary Section" is a named appendix or a front-matter
304 section of the Document that deals exclusively with the
305 relationship of the publishers or authors of the Document to the
306 Document's overall subject (or to related matters) and contains
307 nothing that could fall directly within that overall subject.
308 (For example, if the Document is in part a textbook of
309 mathematics, a Secondary Section may not explain any mathematics.)
310 The relationship could be a matter of historical connection with
311 the subject or with related matters, or of legal, commercial,
312 philosophical, ethical or political position regarding them.
314 The "Invariant Sections" are certain Secondary Sections whose
315 titles are designated, as being those of Invariant Sections, in
316 the notice that says that the Document is released under this
319 The "Cover Texts" are certain short passages of text that are
320 listed, as Front-Cover Texts or Back-Cover Texts, in the notice
321 that says that the Document is released under this License.
323 A "Transparent" copy of the Document means a machine-readable copy,
324 represented in a format whose specification is available to the
325 general public, whose contents can be viewed and edited directly
326 and straightforwardly with generic text editors or (for images
327 composed of pixels) generic paint programs or (for drawings) some
328 widely available drawing editor, and that is suitable for input to
329 text formatters or for automatic translation to a variety of
330 formats suitable for input to text formatters. A copy made in an
331 otherwise Transparent file format whose markup has been designed
332 to thwart or discourage subsequent modification by readers is not
333 Transparent. A copy that is not "Transparent" is called "Opaque".
335 Examples of suitable formats for Transparent copies include plain
336 ASCII without markup, Texinfo input format, LaTeX input format,
337 SGML or XML using a publicly available DTD, and
338 standard-conforming simple HTML designed for human modification.
339 Opaque formats include PostScript, PDF, proprietary formats that
340 can be read and edited only by proprietary word processors, SGML
341 or XML for which the DTD and/or processing tools are not generally
342 available, and the machine-generated HTML produced by some word
343 processors for output purposes only.
345 The "Title Page" means, for a printed book, the title page itself,
346 plus such following pages as are needed to hold, legibly, the
347 material this License requires to appear in the title page. For
348 works in formats which do not have any title page as such, "Title
349 Page" means the text near the most prominent appearance of the
350 work's title, preceding the beginning of the body of the text.
354 You may copy and distribute the Document in any medium, either
355 commercially or noncommercially, provided that this License, the
356 copyright notices, and the license notice saying this License
357 applies to the Document are reproduced in all copies, and that you
358 add no other conditions whatsoever to those of this License. You
359 may not use technical measures to obstruct or control the reading
360 or further copying of the copies you make or distribute. However,
361 you may accept compensation in exchange for copies. If you
362 distribute a large enough number of copies you must also follow
363 the conditions in section 3.
365 You may also lend copies, under the same conditions stated above,
366 and you may publicly display copies.
368 3. COPYING IN QUANTITY
370 If you publish printed copies of the Document numbering more than
371 100, and the Document's license notice requires Cover Texts, you
372 must enclose the copies in covers that carry, clearly and legibly,
373 all these Cover Texts: Front-Cover Texts on the front cover, and
374 Back-Cover Texts on the back cover. Both covers must also clearly
375 and legibly identify you as the publisher of these copies. The
376 front cover must present the full title with all words of the
377 title equally prominent and visible. You may add other material
378 on the covers in addition. Copying with changes limited to the
379 covers, as long as they preserve the title of the Document and
380 satisfy these conditions, can be treated as verbatim copying in
383 If the required texts for either cover are too voluminous to fit
384 legibly, you should put the first ones listed (as many as fit
385 reasonably) on the actual cover, and continue the rest onto
388 If you publish or distribute Opaque copies of the Document
389 numbering more than 100, you must either include a
390 machine-readable Transparent copy along with each Opaque copy, or
391 state in or with each Opaque copy a publicly-accessible
392 computer-network location containing a complete Transparent copy
393 of the Document, free of added material, which the general
394 network-using public has access to download anonymously at no
395 charge using public-standard network protocols. If you use the
396 latter option, you must take reasonably prudent steps, when you
397 begin distribution of Opaque copies in quantity, to ensure that
398 this Transparent copy will remain thus accessible at the stated
399 location until at least one year after the last time you
400 distribute an Opaque copy (directly or through your agents or
401 retailers) of that edition to the public.
403 It is requested, but not required, that you contact the authors of
404 the Document well before redistributing any large number of
405 copies, to give them a chance to provide you with an updated
406 version of the Document.
410 You may copy and distribute a Modified Version of the Document
411 under the conditions of sections 2 and 3 above, provided that you
412 release the Modified Version under precisely this License, with
413 the Modified Version filling the role of the Document, thus
414 licensing distribution and modification of the Modified Version to
415 whoever possesses a copy of it. In addition, you must do these
416 things in the Modified Version:
418 A. Use in the Title Page (and on the covers, if any) a title
419 distinct from that of the Document, and from those of
420 previous versions (which should, if there were any, be listed
421 in the History section of the Document). You may use the
422 same title as a previous version if the original publisher of
423 that version gives permission.
425 B. List on the Title Page, as authors, one or more persons or
426 entities responsible for authorship of the modifications in
427 the Modified Version, together with at least five of the
428 principal authors of the Document (all of its principal
429 authors, if it has less than five).
431 C. State on the Title page the name of the publisher of the
432 Modified Version, as the publisher.
434 D. Preserve all the copyright notices of the Document.
436 E. Add an appropriate copyright notice for your modifications
437 adjacent to the other copyright notices.
439 F. Include, immediately after the copyright notices, a license
440 notice giving the public permission to use the Modified
441 Version under the terms of this License, in the form shown in
444 G. Preserve in that license notice the full lists of Invariant
445 Sections and required Cover Texts given in the Document's
448 H. Include an unaltered copy of this License.
450 I. Preserve the section entitled "History", and its title, and
451 add to it an item stating at least the title, year, new
452 authors, and publisher of the Modified Version as given on
453 the Title Page. If there is no section entitled "History" in
454 the Document, create one stating the title, year, authors,
455 and publisher of the Document as given on its Title Page,
456 then add an item describing the Modified Version as stated in
457 the previous sentence.
459 J. Preserve the network location, if any, given in the Document
460 for public access to a Transparent copy of the Document, and
461 likewise the network locations given in the Document for
462 previous versions it was based on. These may be placed in
463 the "History" section. You may omit a network location for a
464 work that was published at least four years before the
465 Document itself, or if the original publisher of the version
466 it refers to gives permission.
468 K. In any section entitled "Acknowledgments" or "Dedications",
469 preserve the section's title, and preserve in the section all
470 the substance and tone of each of the contributor
471 acknowledgments and/or dedications given therein.
473 L. Preserve all the Invariant Sections of the Document,
474 unaltered in their text and in their titles. Section numbers
475 or the equivalent are not considered part of the section
478 M. Delete any section entitled "Endorsements". Such a section
479 may not be included in the Modified Version.
481 N. Do not retitle any existing section as "Endorsements" or to
482 conflict in title with any Invariant Section.
484 If the Modified Version includes new front-matter sections or
485 appendices that qualify as Secondary Sections and contain no
486 material copied from the Document, you may at your option
487 designate some or all of these sections as invariant. To do this,
488 add their titles to the list of Invariant Sections in the Modified
489 Version's license notice. These titles must be distinct from any
490 other section titles.
492 You may add a section entitled "Endorsements", provided it contains
493 nothing but endorsements of your Modified Version by various
494 parties--for example, statements of peer review or that the text
495 has been approved by an organization as the authoritative
496 definition of a standard.
498 You may add a passage of up to five words as a Front-Cover Text,
499 and a passage of up to 25 words as a Back-Cover Text, to the end
500 of the list of Cover Texts in the Modified Version. Only one
501 passage of Front-Cover Text and one of Back-Cover Text may be
502 added by (or through arrangements made by) any one entity. If the
503 Document already includes a cover text for the same cover,
504 previously added by you or by arrangement made by the same entity
505 you are acting on behalf of, you may not add another; but you may
506 replace the old one, on explicit permission from the previous
507 publisher that added the old one.
509 The author(s) and publisher(s) of the Document do not by this
510 License give permission to use their names for publicity for or to
511 assert or imply endorsement of any Modified Version.
513 5. COMBINING DOCUMENTS
515 You may combine the Document with other documents released under
516 this License, under the terms defined in section 4 above for
517 modified versions, provided that you include in the combination
518 all of the Invariant Sections of all of the original documents,
519 unmodified, and list them all as Invariant Sections of your
520 combined work in its license notice.
522 The combined work need only contain one copy of this License, and
523 multiple identical Invariant Sections may be replaced with a single
524 copy. If there are multiple Invariant Sections with the same name
525 but different contents, make the title of each such section unique
526 by adding at the end of it, in parentheses, the name of the
527 original author or publisher of that section if known, or else a
528 unique number. Make the same adjustment to the section titles in
529 the list of Invariant Sections in the license notice of the
532 In the combination, you must combine any sections entitled
533 "History" in the various original documents, forming one section
534 entitled "History"; likewise combine any sections entitled
535 "Acknowledgments", and any sections entitled "Dedications". You
536 must delete all sections entitled "Endorsements."
538 6. COLLECTIONS OF DOCUMENTS
540 You may make a collection consisting of the Document and other
541 documents released under this License, and replace the individual
542 copies of this License in the various documents with a single copy
543 that is included in the collection, provided that you follow the
544 rules of this License for verbatim copying of each of the
545 documents in all other respects.
547 You may extract a single document from such a collection, and
548 distribute it individually under this License, provided you insert
549 a copy of this License into the extracted document, and follow
550 this License in all other respects regarding verbatim copying of
553 7. AGGREGATION WITH INDEPENDENT WORKS
555 A compilation of the Document or its derivatives with other
556 separate and independent documents or works, in or on a volume of
557 a storage or distribution medium, does not as a whole count as a
558 Modified Version of the Document, provided no compilation
559 copyright is claimed for the compilation. Such a compilation is
560 called an "aggregate", and this License does not apply to the
561 other self-contained works thus compiled with the Document, on
562 account of their being thus compiled, if they are not themselves
563 derivative works of the Document.
565 If the Cover Text requirement of section 3 is applicable to these
566 copies of the Document, then if the Document is less than one
567 quarter of the entire aggregate, the Document's Cover Texts may be
568 placed on covers that surround only the Document within the
569 aggregate. Otherwise they must appear on covers around the whole
574 Translation is considered a kind of modification, so you may
575 distribute translations of the Document under the terms of section
576 4. Replacing Invariant Sections with translations requires special
577 permission from their copyright holders, but you may include
578 translations of some or all Invariant Sections in addition to the
579 original versions of these Invariant Sections. You may include a
580 translation of this License provided that you also include the
581 original English version of this License. In case of a
582 disagreement between the translation and the original English
583 version of this License, the original English version will prevail.
587 You may not copy, modify, sublicense, or distribute the Document
588 except as expressly provided for under this License. Any other
589 attempt to copy, modify, sublicense or distribute the Document is
590 void, and will automatically terminate your rights under this
591 License. However, parties who have received copies, or rights,
592 from you under this License will not have their licenses
593 terminated so long as such parties remain in full compliance.
595 10. FUTURE REVISIONS OF THIS LICENSE
597 The Free Software Foundation may publish new, revised versions of
598 the GNU Free Documentation License from time to time. Such new
599 versions will be similar in spirit to the present version, but may
600 differ in detail to address new problems or concerns. See
601 `http://www.gnu.org/copyleft/'.
603 Each version of the License is given a distinguishing version
604 number. If the Document specifies that a particular numbered
605 version of this License "or any later version" applies to it, you
606 have the option of following the terms and conditions either of
607 that specified version or of any later version that has been
608 published (not as a draft) by the Free Software Foundation. If
609 the Document does not specify a version number of this License,
610 you may choose any version ever published (not as a draft) by the
611 Free Software Foundation.
613 ADDENDUM: How to use this License for your documents
614 ====================================================
616 To use this License in a document you have written, include a copy of
617 the License in the document and put the following copyright and license
618 notices just after the title page:
620 Copyright (C) YEAR YOUR NAME.
621 Permission is granted to copy, distribute and/or modify this document
622 under the terms of the GNU Free Documentation License, Version 1.1
623 or any later version published by the Free Software Foundation;
624 with the Invariant Sections being LIST THEIR TITLES, with the
625 Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
626 A copy of the license is included in the section entitled ``GNU
627 Free Documentation License''.
629 If you have no Invariant Sections, write "with no Invariant Sections"
630 instead of saying which ones are invariant. If you have no Front-Cover
631 Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
632 LIST"; likewise for Back-Cover Texts.
634 If your document contains nontrivial examples of program code, we
635 recommend releasing these examples in parallel under your choice of
636 free software license, such as the GNU General Public License, to
637 permit their use in free software.