-<sect1>Release notes for version~3-01---2/97
-<label id="release-3-01">
+<sect1>Release notes for version~3-02---4/97
+<label id="release-3-02">
<p>
-Changes made since 3.00:
+Changes made since 3.01:
<itemize>
<item> Fixed parsing problem: declaring a record with an infix constructor.
+<item> When computing the Makefile dependencies, using either
+<tt/ghc -M/ (preferred) or by invoking the <tt/mkdependHS/ script
+directly, <tt/CPP/ will now by default not be run over the input
+files. To have CPP wash your input files, use the command-line option
+<tt/-cpp/.
+
</itemize>
Makefile's standard GHC options to @mkdependHS@ un-filtered.
<descrip>
+<tag>@-cpp@</tag> Run the C pre-processor over the input files. The
+ default is not to.
<tag>@-D<blah>@</tag> A cpp @#define@; usual meaning.
<tag>@-i<dirs>@</tag> Add @<dirs>@ (colon-separated) to list of directories
-w No warnings
-f blah Use "blah" as the makefile, rather than "makefile"
or "Makefile".
+ -cpp Wash the input files through cpp(1).
-o <osuf> Use <osuf> as the "object file" suffix ( default: o)
-s <suf> Make extra dependencies for files with
suffix <suf><osuf>; thus, "-o hc -s _a" will
$Dashdashes_seen = 0;
$Cpp = ${RAWCPP};
+$Cpp_flag_set = 0; # 1 => run cpp over input files.
if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
$Tmp_prefix = $ENV{'TMPDIR'} . "/mkdependHS$$";
} elsif ( /^-D(.*)/ ) { # recognized wherever they occur
push(@Defines, $_);
+ } elsif ( /^-cpp$/ ) { # recognized wherever they occur
+ $Cpp_flag_set =1;
} elsif ( /^-i$/ ) {
$Import_dirs = ''; # import path cleared!
} elsif ( /^-i(.*)/ ) {
# we mangle #include's so they will also leave something
# behind to indicate the dependency on _them_
- print STDERR "${SED} -e '/^# *include/{p;s/^# *include/!include/;};s/'\\''//g;s/\"//g' $file_to_read | $Cpp $Include_dirs -I$last_seen_dir @Defines |\n" if $Verbose;
+ local ($open_cmd);
+ if ($Cpp_flag_set) {
+ $open_cmd = "${SED} -e '/^# *include/{p;s/^# *include/!include/;};s/'\\''//g;s/\"//g' $file_to_read | $Cpp $Include_dirs -I$last_seen_dir @Defines |";
+ } else {
+ $open_cmd = $file_to_read;
+ }
+ print STDERR "$open_cmd\n" if $Verbose;
- open(SRCFILE, "${SED} -e '/^# *include/{p;s/^# *include/!include/;};s/'\\''//g;s/\"//g' $file_to_read | $Cpp $Include_dirs -I$last_seen_dir @Defines |")
- || die "$Pgm: Can't open $file_to_read: $!\n";
+ open(SRCFILE, $open_cmd) || die "$Pgm: Can't open $file_to_read: $!\n";
while (<SRCFILE>) {
#