Muutke küpsiste eelistusi

E-raamat: GNU Make Book

  • Formaat: EPUB+DRM
  • Ilmumisaeg: 01-Apr-2015
  • Kirjastus: No Starch Press,US
  • Keel: eng
  • ISBN-13: 9781593276836
  • Formaat - EPUB+DRM
  • Hind: 25,03 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: EPUB+DRM
  • Ilmumisaeg: 01-Apr-2015
  • Kirjastus: No Starch Press,US
  • Keel: eng
  • ISBN-13: 9781593276836

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

"Covers GNU Make basics through advanced topics, including: user-defined functions, macros, and path handling; creating makefile assertions and debugging makefiles; parallelization; automatic dependency generation, rebuilding targets, and non-recursive Make; and using the GNU Make Standard Library"--

GNU Make is the ultimate utility for automatically building programs from source files. But even though GNU Make is the go-to tool for developers and end users needing to build, update, and install packages, it remains notoriously tricky to understand and use correctly. Learners and regular users who run into problems face a long, confusing struggle, often leaving GNU Make's full potential untapped.

GNU Make Unleashed demystifies GNU Make and highlights its most powerful features. Author John Graham-Cumming combines a fast but thorough rundown of the basics with handy solutions to common problems and deeper insights into GNU Make's most useful capabilities. Part manual, part recipe book, GNU Make Unleashed fully equips you to use GNU Make confidently and effectively in the situations you'll inevitably encounter.

In this book, you'll learn about:

  • User-defined functions, macros, and path handling
  • Creating makefile assertions and debugging makefiles
  • The pitfalls and benefits of GNU Make parallelization
  • Automatic dependency generation, rebuilding targets, and non-recursive Make
  • Using the GNU Make Standard Library
GNU Make Unleashed is the first new guide to GNU Make in ten years, and comes recommended by the official GNU Make maintainer. With its easygoing, tutorial-like approach to teaching, solving issues, and helping you take advantage of what's great about this essential utility, GNU Make Unleashed will ensure that you know GNU Make inside and out.
Preface xv
1 The Basics Revisited
1(42)
Getting Environment Variables into GNU make
1(2)
Setting Variables from Outside the Makefile
3(3)
The Environment Used by Commands
6(1)
The $(shell) Environment
7(2)
Target-Specific and Pattern-Specific Variables
9(4)
Target-Specific Variables
10(1)
Pattern-Specific Variables
11(2)
Version Checking
13(3)
MAKE_VERSION
13(1)
FEATURES
14(2)
Detecting $(eval)
16(1)
Using Boolean Values
16(3)
Undefined Variables in Conditionals
17(1)
Consistent Truth Values
18(1)
Logical Operations Using Boolean Values
19(2)
User-Defined Logical Operators
19(1)
Built-in Logical Operators (GNU make 3.81 and Later)
20(1)
Command Detection
21(1)
Delayed Variable Assignment
22(2)
Simple List Manipulation
24(1)
User-Defined Functions
25(4)
The Basics
26(1)
Argument-Handling Gotchas
26(1)
Calling Built-in Functions
27(2)
Recent GNU make Versions: 3.81, 3.82, and 4.0
29(14)
What's New in GNU make 3.81
29(5)
What's New in GNU make 3.82
34(4)
What's New in GNU make 4.0
38(4)
What's New in GNU make 4.1
42(1)
2 Makefile Debugging
43(34)
Printing the Value of a Makefile Variable
43(2)
Dumping Every Makefile Variable
45(2)
Tracing Variable Values
47(4)
Tracing Variable Use
47(1)
How the Variable Tracer Works
48(3)
Tracing Rule Execution
51(4)
An Example
51(1)
The SHELL Hack
52(1)
An Even Smarter SHELL Hack
53(1)
GNU make 4.0 Tracing
54(1)
Makefile Assertions
55(3)
assert
55(1)
Assert_exists
56(1)
Assert_target directory
57(1)
An Interactive GNU make Debugger
58(7)
The Debugger in Action
58(2)
Breakpoints in Patterns
60(1)
Breakpoints in Makefiles
61(1)
Debugger Internals
62(3)
Dynamic Breakpoints in the GNU make Debugger
65(4)
Dynamic Breakpoints in Action
65(2)
The Easy Part
67(1)
The Trick
68(1)
Rocket Science
69(1)
An Introduction to remake
69(8)
Just Print and Trace
69(3)
Debugging
72(2)
Targets, Macro Values, and Expansion
74(3)
3 Building And Rebuilding
77(32)
Rebuilding When CPPFLAGS Changes
77(5)
An Example Makefile
78(1)
Changing Our Example Makefile
79(2)
How Signature Works
81(1)
Limitations
82(1)
Rebuilding When a File's Checksum Changes
82(4)
An Example Makefile
83(1)
Digesting File Contents
83(1)
The Modified Makefile
84(1)
The Hack in Action
85(1)
Improving the Code
86(1)
Automatic Dependency Generation
86(6)
An Example Makefile
87(1)
Makedepend and make depend
88(1)
Automating makedepend and Removing make depend
89(1)
Making Deleted Files Disappear from Dependencies
90(1)
Doing Away with makedepend
91(1)
Using gcc -MP
92(1)
Atomic Rules in GNU make
92(4)
What Not to Do
93(1)
Using Pattern Rules
93(1)
Using a Sentinel File
94(2)
Painless Non-recursive make
96(13)
A Simple Recursive Make
97(1)
A Flexible Non-recursive make System
98(5)
Using the Non-recursive make System
103(1)
What About Submodules?
104(5)
4 Pitfalls And Problems
109(52)
GNU make Gotcha: ifndef and ?=
110(1)
What ?= Does
110(1)
What ifndef Does
111(1)
$(shell) and := Go Together
111(4)
$(shell) Explained
111(1)
The Difference Between = and :=
112(1)
The Hidden Cost of =
113(2)
$(eval) and Variable Caching
115(5)
About $(eval)
115(1)
An $(eval) Side Effect
116(1)
Caching Variable Values
116(1)
Speed Improvements with Caching
117(1)
A Caching Function
118(1)
Wrapping Up
119(1)
The Trouble with Hidden Targets
120(2)
An Unexpected Error if the Hidden Target Is Missing
121(1)
The -n Option Fails
121(1)
You Can't Parallelize make
121(1)
Make Does the Wrong Work if the Hidden Target Is Updated
122(1)
You Can't Direct make to Build foo.o
122(1)
GNU make's Escaping Rules
122(5)
Dealing with $
123(1)
Playing with %
123(1)
Wildcards and Paths
123(1)
Continuations
124(1)
Comments
124(1)
I Just Want a Newline!
124(1)
Function Arguments: Spaces and Commas
125(1)
The Twilight Zone
126(1)
The Trouble with $(wildcard)
127(4)
$(wildcard) Explained
127(1)
Unexpected Results
128(2)
Unexpected Results Explained
130(1)
Making Directories
131(6)
An Example Makefile
132(1)
What Not to Do
132(1)
Solution 1 Build the Directory When the Makefile Is Parsed
133(1)
Solution 2 Build the Directory When all Is Built
134(1)
Solution 3 Use a Directory Marker File
134(1)
Solution 4 Use an Order-Only Prerequisite to Build the Directory
135(1)
Solution 5 Use Pattern Rules, Second Expansion, and a Marker File
136(1)
Solution 6 Make the Directory in Line
137(1)
GNU make Meets Filenames with Spaces
137(4)
An Example Makefile
137(1)
Escape Spaces with \
138(2)
Turn Spaces into Question Marks
140(1)
My Advice
140(1)
Path Handling
141(6)
Target Name Matching
142(1)
Working with Path Lists
142(1)
Lists of Paths in VPATH and vpath
143(1)
Using / or \
143(1)
Windows Oddity: Case Insensitive but Case Preserving
144(1)
Built-in Path Functions and Variables
145(1)
Useful Functions in 3.81: abspath and realpath
146(1)
Usman's Law
147(1)
The Human Factor
147(1)
Poor Naming
147(1)
Silent Failure
148(1)
Recursive Clean
148(1)
Pitfalls and Benefits of GNU make Parallelization
148(9)
Using -j (or -jobs)
149(1)
Missing Dependencies
150(1)
The Hidden Temporary File Problem
151(2)
The Right Way to Do Recursive make
153(1)
Amdahl's Law and the Limits of Parallelization
154(3)
Making $(wildcard) Recursive
157(1)
Which Makefile Am I In?
158(3)
5 Pushing The Envelope
161(26)
Doing Arithmetic
161(9)
Addition and Subtraction
162(3)
Multiplication and Division
165(2)
Using Our Arithmetic Library: A Calculator
167(3)
Making an XML Bill of Materials
170(4)
An Example Makefile and BOM
170(1)
How It Works
171(1)
Gotchas
172(2)
Advanced User-Defined Functions
174(5)
Getting Started Modifying GNU make
174(2)
Anatomy of a Built-in Function
176(1)
Reverse a String
177(2)
GNU make 4.0 Loadable Objects
179(1)
Using Guile in GNU make
180(2)
Self-Documenting Makefiles
182(5)
Documenting Makefiles with print-help
185(1)
The Complete help-system.mak
185(2)
6 The GNU Make Standard Library
187(38)
Importing the GMSL
188(1)
Calling a GMSL Function
189(1)
Checking the GMSL Version
189(1)
Example Real-World GMSL Use
190(6)
Case-Insensitive Comparison
190(1)
Finding a Program on the Path
190(1)
Using Assertions to Check Inputs
191(1)
Is DEBUG Set to Y?
192(1)
Is DEBUG Set to Y or N?
193(1)
Using Logical Operators in the Preprocessor
193(1)
Removing Duplicates from a List
194(1)
Automatically Incrementing a Version Number
194(2)
GMSL Reference
196(29)
Logical Operators
196(2)
Integer Arithmetic Functions
198(5)
Integer Comparison Functions
203(1)
Miscellaneous Integer Functions
204(1)
List Manipulation Functions
205(5)
String Manipulation Functions
210(3)
Set Manipulation Functions
213(3)
Associative Arrays
216(2)
Named Stacks
218(2)
Function Memoization
220(1)
Miscellaneous and Debugging Facilities
221(2)
Environment Variables
223(2)
Index 225
John Graham-Cumming is a longtime GNU Make expert and the creator of the GNU Make Standard Library. He wrote the acclaimed POPFile email filter, co-founded Electric Cloud, Inc., and, in 2009, got the British government to apologize for mistreating Alan Turing. Graham-Cumming holds a doctorate in computer security from Oxford University and currently works at CloudFlare. He is the proud owner of a three-letter domain name where he hosts his web site: www.jgc.org