26 lines
		
	
	
	
		
			532 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			532 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| #Small wrapper to deal with compilation of the compiler and the stdlib.
 | |
| 
 | |
| SCRIPT_DIR=`dirname $0`
 | |
| COMPILER_DIR=compiler #relative to the script_dir
 | |
| COMPILER=heptc.native
 | |
| HEPTC=$COMPILER_DIR/$COMPILER
 | |
| 
 | |
| cd $SCRIPT_DIR
 | |
| 
 | |
| if [ ! -x $HEPTC ] #compile the compiler
 | |
| then
 | |
| 	cd $COMPILER_DIR
 | |
| 	ocamlbuild -j 0 $COMPILER
 | |
| 	cd -
 | |
| fi
 | |
| 
 | |
| if [ ! -e lib/pervasives.epci ] #compile the stdlib
 | |
| then
 | |
| 	$HEPTC -nopervasives lib/pervasives.epi
 | |
| fi
 | |
| 
 | |
| cd -
 | |
| 
 | |
| $SCRIPT_DIR/$HEPTC -stdlib $SCRIPT_DIR/lib "$@" #call the compiler with the passed arguments.
 | 
