### SPAR <http://www.cpan.org/scripts/>
### 14 755 1164319503 1079144775 makepp_test_script.pl
makepp;
my $correct=9;
my $count=0;
n_files 0, sub { $count++ if /File\s+warn_header/ };
open my $out, ">x2" or die "cannot open x2\n";
if ($count == $correct) {
print $out "OK\n";
}
else {
print $out "File warn_header should be included $correct times with warning \"File warn_header ...\" , see C.pm \n";
}
close $out;
### 23 644 1079144736 1186282528 Makeppfile
_OBJ_SUFFIX := $(filter %cl %cl.exe %bcc32 %bcc32.exe, $(CC))
ifdef _OBJ_SUFFIX
_OBJ_SUFFIX := .obj
else
_OBJ_SUFFIX := .o
endif
$(phony default): main1 main2
perl { Mpp::Cmds::c_cp 'answers/x1' unless -e x1 }
perl { Mpp::Cmds::c_cp 'answers/x3' unless -e x3 }
%$(_OBJ_SUFFIX): %.c
:smartscan
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(input) -o $(output)
b.h:
&echo "NOK" -o x1
wrong.h:
&echo "INCLUDE WRONG FILE" -o x2
wrong_header:
&echo "INCLUDE WRONG FILE" -o x3
### 4 644 1079140748 1079140593 a1.h
#if 0
# include "b.h"
#endif
#define A 1
### 62 644 1079140748 1079140593 a2.h
#define FUNNY(x2) x2
#if FUNNY(1)
#include "warn_header" //1
#elif FUNNY(2)
#include "warn_header" //2
#else
#include "warn_header" //3
#endif
#if 1
#include "corr.h"
#elif FUNNY(3)
#include "wrong.h"
#else
#include "wrong.h"
#endif
#if 0
#include "wrong.h"
#elif FUNNY(4)
#include "warn_header" //4
#else
#include "warn_header" //5
#endif
#if FUNNY(5)
#include "warn_header" //6
#elif 1
#include "warn_header" //7
#else
#include "wrong.h"
#endif
#if FUNNY(6)
#include "warn_header" //8
#elif 0
#include "wrong.h"
#else
#include "warn_header" //9
#endif
#if 1
#define C1 1
#elif 0
#include "wrong.h"
#else
#include "wrong.h"
#endif
#if 0
#include "wrong.h"
#elif 1
#define C2 1
#else
#include "wrong.h"
#endif
#if 0
#include "wrong.h"
#elif 0
#include "wrong.h"
#else
#define C3 1
#endif
#if C1 && C2 && C3
#include "corr.h"
#else
#include "wrong.h"
#endif
### 2 644 1079140748 1079140593 corr.h
#define FALSE 0
#define TRUE 1
### 1 644 1079140748 1079140593 warn_header
#define C 1
### 47 644 1079140748 1079140593 gcc_header.h
#define C1 1 /* comment */
#define /* comment */ C2 1
#define C3 /* comment */ 1
#define C4 /*
*/ 1
// #include "wrong_header"
/*
/* #include "wrong_header" */
/*
// #include "wrong_header" */
/*
#include "wrong_header"
*/
/* //some/comment */
#define C5/**/1
/* */#define C6 1/**/
#define /*
*/C7/*
*/1
#define C8 \
1 /*
*/
/*
// */#define C9 1
// This comment continues on the next line, \
so don't be a fool and undef C9 \
#undef C9
#define C10 \ /* Not a continuation line */
#define C11 1
#if C1 && C2 && C3 && C4 && C5 && C6 && C7 && C8 && C9 && defined(C10) & C11
#include "corr3.h"
#else
#include "wrong_header"
#endif
#if 1 \
&& 1 \
&& A
#include "wrong_header"
#endif
#ifndef C1 /* */
#include "wrong_header"
#endif
#ifndef C3
#include "wrong_header"
#endif
/*
#include "wrong_header" //comm */
### 39 644 1079140748 1079140593 cc_header.h
#define C1 1 /* comment */
#define /* comment */ C2 1
#define C3 /* comment */ 1
#define C4 /*
*/ 1
/*
#include "wrong_header" */
/*
#include "wrong_header"
*/
/* //some/comment */
#define C5/*comm*/1
/* comm*/#define C6 1/*comm*/
#define /*
*/C7/*
*/1
#define C8 \
1 /*
*/
/*
*/#define C9 1
#if C1 && C2 && C3 && C4 && C5 && C6 && C7 && C8 && C9
#include "corr3.h"
#else
#include "wrong_header"
#endif
#if 1 \
&& 1 \
&& A
#include "wrong_header"
#endif
#ifndef C1 /* */
#include "wrong_header"
#endif
#ifndef C3
#include "wrong_header"
#endif
/*
#include "wrong_header" //comm */
### 1 644 1079140748 1079140593 corr3.h
#define A 0
### 8 644 1079140745 1079140626 main1.c
#include "a1.h"
int main() {
#if A
return 0;
#endif
return 1;
}
### 4 644 1079140745 1079140626 main2.c
#include "a2.h"
int main() {
return 0;
}
### 8 644 1079140745 1079140626 main3.c
#ifdef __GNUC__
#include "gcc_header.h"
#else
#include "cc_header.h"
#endif
int main() {
return 0;
}
### D 755 1079144793 1079144618 answers
### 1 644 1079144618 1079144618 answers/x1
OK
### 1 644 1079144618 1079144618 answers/x2
OK
### 1 644 1079144618 1079144618 answers/x3
OK