/usr/share/doc/acr/amr-tutorial is in acr 1.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | AMR tutorial
============
This document describes how to use AMR to automagically create a basic
ACR project configuration.
Stay in root of your project:
--
$ pwd
~/src/hello
$ ls -FR
.:
README src/
./src:
main.c
--
So, let's see what's in main.c:
--
$ cat src/main.c
#include <stdio.h>
#include "main.h"
int main()
{
printf("Hello World\n");
return 0;
}
--
That's ok, so now run amr -a:
--
$ amr -a | tee configure.amr
## sample configure.amr ##
CDIR ./src/
CSOURCES main.c ;
CINCLUDES stdio.h ;
--
Now we have the AMR configuration file. This is a template file that AMR
uses to create configure.acr or Makefile.acr. This command can be used
recursively for each directory of your source project. So you'll be able
to autogenerate all required checks for your project.
Let's generate a configure.acr template:
--
$ amr -c | tee configure.acr
## sample configure.acr ##
PKGNAME hello
VERSION 0.1
CONTACT your name ; your@email
LANG_C!
CHKINC! stdio.h
SUBDIRS . ./src/ ;
--
Now we must create the Makefiles:
--
$ amr -m > Makefile.acr
$ cd src
$ amr -m > Makefile.acr
$ cd -
--
That's fine. Everything is done. We can test't now:
--
$ acr
$ ./configure
checking build system type... i686-unknown-linux-gnu
checking host system type... i686-unknown-linux-gnu
checking target system type... i686-unknown-linux-gnu
checking for working directories... current
using prefix '/usr/local'
checking for c compiler... gcc
checking for stdio.h... yes
creating ./Makefile
creating ./src//Makefile
cleaning temporally files... done
$ make
gcc -c -o src//main.o src//main.c
gcc ./src//main.o -o hello
$ ./hello
Hello World!
--
|