File: syntax

package info (click to toggle)
acr 2.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 712 kB
  • sloc: sh: 4,738; makefile: 41
file content (67 lines) | stat: -rw-r--r-- 1,697 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Syntax:
=======

This documents explains the ACR syntax, not the keywords.


The Configure.Acr file:
-----------------------
Acr needs a configure.acr configuration file to create the final configure
script. Now I will explain some syntax tips. You don't have to think about
all the autotools complexity. This is ACR, and the *ONLY* compatible tip
with autotools is the final generated "./configure" script.

This is a word-parsed file. Acr doesn't know anything about the line or eofs.
Instead of that, acr uses three different syntax strings:

- fixed ones
	- Function knows how many parameters requires.
	for example:

		PKGNAME HelloWorld
		CHECK_LIB c printf

- array ones
	- There'r some keywords that require a space separated list of names.
	Acr gets them until a semicolon ';' is found.
	for example:

		OUTPUT_H config.h src/config.h ;
		+= CFLAGS -Dfoo ;

- piped ones
	- It's also possible to create external scripts, long multi-line messages
	for example:
		CHECK COW <<EOF
		echo "COW";
		<<EOF

	- Acr will read from file until the found a string like the <<XXX typed

Comments in ACR are limited by "//" and "\\" strings, for example:
	PKGNAME FooBar
	//
	this is a comment
	no code is read here
	just a simple message
	\\
	VERSION 1.4

You are also allowed to use the "##" comments by the same way:
	## this is a comment       ##
	PKGNAME foo
	## use it when you need it ##
	VERSION 3.2


Force-required
--------------
Some commands allows to throw an error when condition fails, for example:

We want to check if a optional library is found:
	CHECK_LIB c printf

We want to check if a library needed is found on the target system:
	CHECK_LIB! c printf

Just type a '!' suffix :)