1Panotools::Makefile::UtUislesr(3C)ontributed Perl DocumePnatnaottiooonls::Makefile::Utils(3)
2
3
4
6 Panotools::Makefile::Utils - Makefile syntax
7
9 Simple interface for generating Makefile syntax
10
12 Writing Makefiles directly from perl scripts with print and "\t" etc...
13 is prone to error, this library provides a simple perl interface for
14 assembling Makefile rules.
15
16 See Panotools::Makefile::Rule and Panotools::Makefile::Variable for
17 object classes that you can use to contruct makefiles.
18
20 Access the current platform name (MSWin32, linux, etc...):
21
22 print platform;
23
24 Define a different platform and access the new name:
25
26 platform ('MSWin32');
27 print platform;
28
29 Reset platform to default:
30
31 platform (undef);
32
33 Take a text string (typically a single filename or path) and
34 quote/escape spaces and special characters to make it suitable for use
35 as a Makefile 'target' or 'prerequisite':
36
37 $escaped_target = quotetarget ('My Filename.txt');
38 $escaped_prerequisite = quoteprerequisite ('My Filename.txt');
39
40 Note that the =;:% characters are not usable as filenames, they may be
41 used as control characters in a target or prerequisite. An exception
42 is the : in Windows paths such as C:\WINDOWS which is understood by gnu
43 make.
44
45 * and ? are wildcards and will be expanded. You may find that it is
46 possible to use these as actual characters in filenames, but this
47 assumption will lead to subtle errors.
48
49 $ can be used in a filename, but when used with brackets, ${FOO} or
50 $(BAR), will be substituted as a make variable.
51
52 Targets starting with . are special make targets and not usable as
53 filenames, the workaround is to supply a full path instead of a
54 relative path. i.e: /foo/bar/.hugin rather than .hugin
55
56 Additionally the ?<>*|"^\ characters are not portable across
57 filesystems (e.g. USB sticks, CDs, Windows) and should be avoided in
58 filenames.
59
60 Take a text string, typically a command-line token, and quote/escape
61 spaces and special characters to make it suitable for use in a Makefile
62 command:
63
64 $escaped_token = quoteshell ('Hello World');
65
66
67
68perl v5.12.1 2010-04-07 Panotools::Makefile::Utils(3)