summaryrefslogtreecommitdiffstats
path: root/Tests/MakeClean/check_clean.c.in
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/MakeClean/check_clean.c.in')
-rw-r--r--Tests/MakeClean/check_clean.c.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/Tests/MakeClean/check_clean.c.in b/Tests/MakeClean/check_clean.c.in
new file mode 100644
index 0000000..5bc4ab8
--- /dev/null
+++ b/Tests/MakeClean/check_clean.c.in
@@ -0,0 +1,26 @@
+#include <stdio.h>
+
+int main()
+{
+ /* The list of files to check. */
+ const char* files[] =
+ {
+ @CHECK_FILES@
+ 0
+ };
+
+ /* No file should exist. */
+ const char** f = files;
+ int result = 0;
+ for(; *f; ++f)
+ {
+ FILE* pf = fopen(*f, "rb");
+ if(pf)
+ {
+ fclose(pf);
+ fprintf(stderr, "File \"%s\" exists!", *f);
+ result = 1;
+ }
+ }
+ return result;
+}