ICMAKE Part 2
Constants may be used in the makefile to indicate a number or a string. Int constants are denoted by numeric characters; e.g., 13 is an int constant. A second way to denote an int constant is by enclosing a character in single quotes. The numeric value of the constant is then the ascii number of the character, e.g., the constant `A' has the value 65. The character between quotes may not be `escaped', such as `\n'. Only single characters are allowed in this notation of integer constants.
String constants are denoted by text between double quote marks, e.g., “a string” is a piece of text.
Icmake recognizes four types: int, string, list and void. The types serve the following purposes:
int: The type `int' is used to represent numerical 16-bit signed values.
string: The type `string' is used to represent strings, like the strings used in C.
list: The type `list' is used for variables and return values of functions consisting of lists of strings. There are no list-constants. Instead, lists always have to be built run-time.
void: The type `void' is used only with functions, to indicate that these functions do not return values.
The types int, string and list are also used for defining variables and arguments. Icmake allows global variables and local variables. The declaration of a variable or an argument must state the type of the variable; a counter variable would be an int, while a variable containing the names of all files having extension `.c' would be a list.
Some of the built-in functions of icmake (see the section about icmake's functions) return a value of one of the types int, string or list. The returned value may be assigned to a variable of the same type or may be passed to another function.
Similarly to built-in functions, user-defined functions are assumed to return a value which is either int, string or list. The int type is the default. Functions may be defined as not returning a value. Such functions have the `void' returntype.
The definition of variables follows a C-like syntax. Arguments are defined as in ansi-C. An illustration of the use of types is found in the following listing. Note the use of the constants 55 and “main.c” (a string constant).
string myfun (int x, string y, list z) // a
user-defined function
{ // of type string, having 3
int // parameters
counter, // local variables: 2 ints, i; // 1 string
and 1 list
string
name;
list
cfiles;
counter = 55; // counter is set to 55 name = "main.c"; //
name is set to string main.c return (name); // a string is
returned to the
} // caller
Strings in makefiles are used to represent both filenames and displayed text. Icmake allows a number of special formatting sequences in strings to facilitate the display of text. These sequences are called, in analogy to the C programming language, escape sequences. Icmake recognizes the following escape sequences: Escape sequence Action
\a alert (bell)
\b backspace character
\f formfeed character
\n newline
\r carriage return character
tab
\v vertical tab
\-other- literal -other-, e.g., \\
Escape sequences in strings are identified by a backslash character \ followed by a character which identifies the escape sequence. Like C, Icmake allows string-concatenation. Long strings, extending over several lines of text, can be built by separating string constants by white-space characters (blanks, tabs, newlines).
This section discusses the user-defined functions which may appear in a makefile and also defines other syntactical constructs.
Icmake recognizes six control statements:
if statements, including if-else
while statements
for statements
return statements
break statements
exit statements
The exit() statement, though a function in C, is part of the icmake language. The exit statement may be given an expression yielding an int. If an int expression follows, its value is returned as an int to the operating system. Otherwise, the returned value is undefined. The other flow control statements are analogous to the corresponding ones in the C programming language.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- New Products
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- Validate an E-Mail Address with PHP, the Right Way
- New Products
- Trying to Tame the Tablet
- Tech Tip: Really Simple HTTP Server with Python
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




3 hours 2 min ago
3 hours 24 min ago
3 hours 34 min ago
3 hours 39 min ago
4 hours 9 min ago
7 hours 32 sec ago
7 hours 36 min ago
7 hours 37 min ago
7 hours 38 min ago
7 hours 39 min ago