]> thyrsus.com Git - intercal.git/commitdiff
Fix bugs in file-finding logic
authorAlex Smith <ais523@bham.ac.uk>
Thu, 2 Sep 2010 19:52:26 +0000 (20:52 +0100)
committerAlex Smith <ais523@bham.ac.uk>
Thu, 2 Sep 2010 19:52:26 +0000 (20:52 +0100)
This is both a logic error (an incomplete change from ICKDATADIR to
ICKSYSDIR/ICKCSKELDIR), and a simple typo that was preventing the
skeleton file from being found in an installed setup.

etc/interfuzz.pl [changed mode: 0644->0755]
src/perpet.c

old mode 100644 (file)
new mode 100755 (executable)
index 7ea8b4c..30bf168
@@ -1,3 +1,4 @@
+#!/usr/bin/perl
 #
 # NAME
 #     interfuzz.pl -- C-INTERCAL optimiser fuzz-tester
@@ -26,8 +27,8 @@ use File::Temp qw/tempdir/;
 use File::Spec;
 
 use constant fuzzamount => 1000;
-use constant ickpath => '../build/ick';
-use constant idiompath => '../src/idiotism.oil';
+use constant ickpath => $ENV{ICK} || '../build/ick';
+use constant idiompath => $ENV{IDIOTISM} || '../src/idiotism.oil';
 
 # Before getting to the main program, we need to read in idiom LHSes.
 print STDERR "Loading idioms...\n";
index 338a53ba99d56e224ffead10d5ab2a01f5f7b8bc..18d2ae1462e5b7217fa9bbc97149eae57bbc7850 100644 (file)
@@ -44,22 +44,30 @@ LICENSE TERMS
 
 /* AIS: split ICKDATADIR from ICKLIBDIR */
 #ifndef ICKINCLUDEDIR
-#define ICKINCLUDEDIR "/usr/local/include"
+# define ICKINCLUDEDIR "/usr/local/include"
 #endif
 #ifndef ICKSYSDIR
-#define ICKSYSDIR "/usr/local/share"
+# ifdef ICKDATADIR
+#  define ICKSYSDIR ICKDATADIR
+# else
+#  define ICKSYSDIR "/usr/local/share"
+# endif
 #endif
 #ifndef ICKCSKELDIR
-#define ICKCSKELDIR "/usr/local/share"
+# ifdef ICKDATADIR
+#  define ICKCSKELDIR ICKDATADIR
+# else
+#  define ICKCSKELDIR "/usr/local/share"
+# endif
 #endif
 #ifndef ICKLIBDIR
-#define ICKLIBDIR "/usr/local/lib"
+# define ICKLIBDIR "/usr/local/lib"
 #endif
 #ifndef ICKBINDIR
-#define ICKBINDIR "/usr/local/bin"
+# define ICKBINDIR "/usr/local/bin"
 #endif
 #ifndef CC
-#define CC "gcc"
+# define CC "gcc"
 #endif
 
 #define ARGSTRING "abcdefghlmoptuvwxyCEFHOPUYX@"
@@ -1786,7 +1794,7 @@ int main(int argc, char *argv[])
   if (!(ick_sysdir = getenv("ICKSYSDIR")))
     ick_sysdir = ICKSYSDIR;
   if (!(ick_cskeldir = getenv("ICKCSKELDIR")))
-    ick_sysdir = ICKCSKELDIR;
+    ick_cskeldir = ICKCSKELDIR;
 /*
   AIS: nothing actually uses this at the moment,
   commenting it out for future use