Managing Projects with Make

( 1 )

Overview

make is one of UNIX's greatest contributions to software development, and this book is the clearest description of make ever written. Even the smallest software project typically involves a number of files that depend upon each other in various ways. If you modify one or more source files, you must relink the program after recompiling some, but not necessarily all, of the sources.make greatly simplifies this process. By recording the relationships between sets of files, make can automatically perform all the ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (67) from $1.99   
  • New (3) from $18.07   
  • Used (64) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$18.07
Seller since 2009

Feedback rating:

(888)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
0937175900 *BRAND NEW* Ships Same Day or Next!

Ships from: Springfield, VA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$45.00
Seller since 2014

Feedback rating:

(178)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$45.00
Seller since 2014

Feedback rating:

(178)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview

make is one of UNIX's greatest contributions to software development, and this book is the clearest description of make ever written. Even the smallest software project typically involves a number of files that depend upon each other in various ways. If you modify one or more source files, you must relink the program after recompiling some, but not necessarily all, of the sources.make greatly simplifies this process. By recording the relationships between sets of files, make can automatically perform all the necessary updating.For large projects with teams of programmers and multiple releases, make becomes even more critical. But in order to avoid spending a major portion of your maintenance budget on maintaining the Makefiles, you need a system for handling directories, dependencies, and macro definitions. This book describes all the basic features of make and provides guidelines on meeting the needs of large, modern projects.Some of the issues addressed in the second edition include:

  • Projects covering several directories.
  • Maintaining consistency when building variants of a program.
  • Automatic generation of header file dependencies.
  • Forced rebuilds of existing files.
  • A description of free products that contain major enhancements tomake.
  • Listings of the features that vary between different versions of make and simple ways to test them.
  • More detail and examples on common errors, use of the shell in make, formal rules of syntax in make, and support for various utilities.


This manual is devoted to the Unix MAKE utility. Authors Oram and Talbott have revised this popular text to cover Unix System V Release 4. Includes useful quick reference and trouble-shooting chapters as well as appendices on Popular Extensions and Variant Features of MAKE.

Read More Show Less

Editorial Reviews

From Barnes & Noble

Fatbrain Review

This manual is devoted to the Unix MAKE utility. Authors Oram and Talbott have revised this popular text to cover Unix System V Release 4. Includes useful quick reference and trouble-shooting chapters as well as appendices on Popular Extensions and Variant Features of MAKE.
Read More Show Less

Product Details

  • ISBN-13: 9780937175903
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 10/8/1991
  • Series: Nutshell Handbooks Series
  • Edition description: Second Edition
  • Edition number: 2
  • Pages: 168
  • Product dimensions: 5.94 (w) x 9.16 (h) x 0.41 (d)

Meet the Author

Andy Oram is an editor at O'Reilly & Associates, specializing in books on Linux and programming. Most recently, he edited Peer-to-Peer: Harnessing the Power of Disruptive Technologies.

Stephen L. Talbott went from Presidential Scholar to farmer, and from editing an interdisciplinary, scholarly journal about the catastrophist theories of Immanual Velikovsky, to fourteen years working in the computer industry. Mr. Talbott recently moved with his family from the Boston technology belt to rural New York, where his efforts to reach an accommodation with his computer continue.

Read More Show Less

Read an Excerpt


Chapter 3: Suffix Rules

Commands Supported by Default Suffix Rules

The rules built into make reflect the popular compilers and programming tools that were available on UNIX systems when make was developed. Luckily (for you as a novice make user, if not for the field of software engineering as a whole) the utilities and practices employed by C programmers have remained the same.

Thus, to build a o file, make starts by looking for a c file and, if one exists, runs it through the C compiler. Otherwise (focusing on just the C environment for a moment), make looks for a y file on which it can run yacc, and if that fails, a .1 file on which it can run lex.

When we look beyond C programming, the default rules have not stood up so well over time. That is why it's a good thing that you can redefine the rules, as described later in this chapter.

Fortran and Pascal

Fortran compilers have changed a great deal from the days of early UNIX systems. Some implementations have changed the default suffix rules to match the utilities on their systems, while others have not.

For instance, some implementations of make still look for fc as the compiler, instead of the modern f77. That is easy enough to fix by defining this in your shell environment or description file:

FC=f77

Most implementations still do not recognize the uppercase .F suffix (for Fortran files that pass through the C preprocessor). You can fix this by copying the .f rules, and adding .F to the .SUFFIXES list. (This procedure will be clear later, when we explain how to write your own suffix rules.)

.SUFFIXES: F

.F.o:

$(FC) $(FFLAGS) -C $<

.
.
.

Meanwhile, the odds are good that your make recognizes r and e suffixes, which correspond to the obsolete Ratfor and EFL preprocessors that were used before the advent of Fortran 77. These rules do no harm, but they are strange relics, and it will be interesting to see when they finally disappear from released versions of make.

Pass options to the Fortran compiler through FFLAGS.

If your system offers a Pascal compiler, it almost certainly also offers the corresponding suffix rules in make. They probably look like this:

.P.O:

$ (PC) $ (PFLAGS) -c $<

.
.
.

Given, this rule, you can pass options to the Pascal compiler through PFLAGS.

SCCS and RCS

The most restrictive effects of outdated default rules can be found in make's limited support for SCCS (Source Code Control System). This utility keeps backup versions of source files to help project teams maintain multiple versions and recover from unwanted changes or accidental file corruption. While competing tools have emerged to perform this critical function, SCCS is still the most common on UNIX systems. RCS (Revision Control System, a free software product) is becoming a close contender.

In the view taken by make, a source control file is just another prerequisite in the chain of dependencies. For instance, if you are trying to build a o file and no source file exists, make tries to create a source file by searching for an SCCS file and then, if successful, executing a get command.

Support for SCCS had to be built into make in a different manner from other rules, because SCCS is unique in its naming conventions: it manages files by prefixes rather than suffixes. To maintain a backup version of a file, SCCS creates a new file consisting of the prefix s. followed by the filename. Thus, when you place a C language source file named filename.c under SCCS control, it creates a file with the name s.filename.c.

Unfortunately, two different interfaces to SCCS exist, one distributed by AT&T and one by U.C. Berkeley, but System V make works only with the older-and less popular-one. The AT&T interface is distinguished by keeping backup versions in the same directory as working source files. The Berkeley interface is a front-end to the AT&T one, and maintains the backup version of each working file in a subdirectory that has the name SCCS.

Do you want to mix source control and builds?

Nowadays, large team projects tend to keep source control separate from compilation and building. They find it easier to write separate tools invoking SCCS or RCS, and not to use the support within make at all. One reason is that source files are scattered among many directories, and the SCCS or RCS files reside on hub systems instead of with the programmers' working files. This makes it extremely hard for make to find the files during dependency checks.

A more fundamental reason for placing a wall between source control and the build process is that automatic updating may be undesirable. Imagine that you have gotten and changed some of your team's files in order to fix a bug. While editing and testing, you need a stable set of files; you do not want make to substitute a new version that someone else has placed into SCCS or RCS. The safe strategy is to prevent automatic updating by make, and to put the responsibility on the programmer for getting all the correct files before each build.

Certainly, you can create make entries to get and return files from the source control directories, just as you can use make for other general tasks. But when other people are sharing an SCCS or RCS tree with you, you should not let make update your source files automatically.

Automatic gets or check-outs can be very convenient if you are working on a project by yourself. So let us continue and see what make offers.

The tilde (~) convention

Suffix rules use tildes to identify SCCS files. For example, the default suffix rule,

.c~ .0 :
describes how to transform a C language source file under SCCS control into an object file. The first half (.c~) of the suffix pair represents a file of the form s.filename. c, from which make builds filename. c and filename. o. Thus, if we have a file s.filename.c in the current directory, the command

$ make filename.o results in the execution of these commands:

get -p s.filename.c > filename.c
cc -0 -c filename.c
rm -f filename.c

This special use of the tilde in make should not be confused with other conventional uses for a tilde, such as in backup versions of Emacs files or home...

Read More Show Less

Table of Contents


The Value of make
Lessons from make
Variants
Scope of This Book
Getting Automated Tests
Acknowledgments
Chapter 1. How to Write a Simple Makefile
Dependency Checking
Minimizing Rebuilds
Invoking make
Basic Rules of Syntax
Chapter 2. Macros
Internally Defined Macros
Macro Definitions on the Command Line
Shell Variables
Priority of Macro Assignments
Macro String Substitution
Internal Macros for Prerequisites and Targets
Chapter 3. Suffix Rules
Command Options
Internal Macros
Commands Supported by Default Suffix Rules
Fortran and Pascal
SCCS and RCS
Libraries (Archives)
Using Parentheses for Library Modules
A Library Example
Maintaining Libraries
The Double Colon
lex and yacc
The Null Suffix
How to Display Defaults
Generating the Display
What the Display Means
Writing Your Own Suffix Rules
A Sample Collection of Suffix Rules
Nullifying Rules
Conflicts With Default Suffixes
Chapter 4. Commands
Effects of Newlines on Commands
Errors and Exit Status
Which Shell?
Pathnames and Security
Chapter 5. Project Management
Recursive make on Directories
General Tips on Recursive make
Other Techniques for Multiple Directories
Directories in Internal Macros
Viewpath (VPATH Macro)
Compiler Options and #ifdef directives
Forcing Remakes
Maintaining Multiple Variants Through Explicit Targets
Maintaining Multiple Variants in Different Directories
Maintaining Variants Through Suffix Rules
Header Files
Global Definitions (include Statement)
Distributed Files and NFS Issues
Chapter 6. Command-line Usage and Special Targets
Status Information and Debugging
Errors and File Deletion
The MAKEFLAGS Macro
Miscellaneous Features Affecting Defaults
Chapter 7. Troubleshooting
Syntax Errors
Don't Know How to Make
Target Up to Date
Command Not Found, or Cannot Load
Syntax Errors in Multi-line Commands
Inconsistent Lines, or Too Many Lines
Unrecognized Macros
Default Rules Ignored
Appendix A. Quick Reference
Description File Lines
Macros
Internal Macros
Macro Modifiers
Macro String Substitution
Macros with Special Handling
Special Target Names
Appendix B. Popular Extensions
GNU make
imake
makedepend
shape
Parallel and Distributed Implementations
Appendix C. Features That Differ Between Variants of make
List of Differences
Tests You Can Run
Macro String Substitution
File and Directory Macros
Parenthesis Syntax for Libraries
Single-suffix Rules and .sh Rules
Default Shell
MAKE and MAKEFLAGS Macros
include Statement
VPATH
Index
Read More Show Less

Customer Reviews

Average Rating 3
( 1 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(1)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted July 29, 2000

    A little out of date.

    It is not a bad book. Unfortunately many examples simply did not apply to any system I have access to. I did learn quite a bit but it is just out of date when compared to what is available

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)