Ajout de la gestion des variables dans le Bakefile et mise à jour des tests associés
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,4 @@
|
||||
FLAGS = -ansi -pedabtic
|
||||
|
||||
main: main.c
|
||||
gcc -o main main.c
|
Binary file not shown.
Binary file not shown.
2
tests/test-04-edited/Bakefile
Normal file
2
tests/test-04-edited/Bakefile
Normal file
@@ -0,0 +1,2 @@
|
||||
main: main.c
|
||||
gcc -o main main.c
|
13
tests/test-04-edited/README.md
Normal file
13
tests/test-04-edited/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Test 2 : Compilation où le résultat existe déjà
|
||||
|
||||
## Description
|
||||
Ce test vérifie que si l'exécutable `main` est déjà présent et que `main.c`
|
||||
n'a pas été modifié, alors `Bake` ne tente pas de recompiler.
|
||||
|
||||
## Fichiers utilisés
|
||||
- `main.c` : Fichier source inchangé.
|
||||
- `Bakefile` : Contient les règles de compilation.
|
||||
- `main` : Exécutable déjà généré.
|
||||
|
||||
## Résultat attendu
|
||||
Aucun message indiquant la compilation ne doit apparaître.
|
BIN
tests/test-04-edited/main
Executable file
BIN
tests/test-04-edited/main
Executable file
Binary file not shown.
7
tests/test-04-edited/main.c
Normal file
7
tests/test-04-edited/main.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
printf("Ceci est un programme de test du Bakefile !\n");
|
||||
printf("test\n");
|
||||
return 0;
|
||||
}
|
4
tests/test-05-variables/Bakefile
Normal file
4
tests/test-05-variables/Bakefile
Normal file
@@ -0,0 +1,4 @@
|
||||
FLAGS = -ansi -pedantic
|
||||
|
||||
main: main.c
|
||||
gcc $(FLAGS) -o main main.c
|
1
tests/test-05-variables/README.md
Normal file
1
tests/test-05-variables/README.md
Normal file
@@ -0,0 +1 @@
|
||||
# Test 5 : Utilisation de variables
|
6
tests/test-05-variables/main.c
Normal file
6
tests/test-05-variables/main.c
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
printf("Ceci est un programme de test du Bakefile !\n");
|
||||
return 0;
|
||||
}
|
6
tests/test-06-variables-on-cascade/Bakefile
Normal file
6
tests/test-06-variables-on-cascade/Bakefile
Normal file
@@ -0,0 +1,6 @@
|
||||
FLAGS = -ansi -pedantic
|
||||
FLAGSS = $(FLAGS)
|
||||
FLAGSSS = $(FLAGSS)
|
||||
|
||||
main: main.c
|
||||
gcc $(FLAGSSS) -o main main.c
|
1
tests/test-06-variables-on-cascade/README.md
Normal file
1
tests/test-06-variables-on-cascade/README.md
Normal file
@@ -0,0 +1 @@
|
||||
# Test 6 : Gestion des variables en cascade
|
6
tests/test-06-variables-on-cascade/main.c
Normal file
6
tests/test-06-variables-on-cascade/main.c
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
printf("Ceci est un programme de test du Bakefile !\n");
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user