Project

General

Profile

« Previous | Next » 

Revision b8ae1bbc

Added by Pierre-Loïc Garoche about 11 years ago

Improvements as suggested by e. Noulard: better install of include; modified generated makefile

View differences:

_oasis
7 7
Plugins:     DevFiles (0.2)
8 8
# , Custom (0.2)
9 9
PreBuildCommand: ./svn_version.sh 
10
PostInstallCommand: mkdir -p /usr/local/include/lustrec; cp include/* /usr/local/include/lustrec/ 
10
PostInstallCommand: mkdir -p $(prefix)/include; cp -rf include $(prefix)/include/lustrec
11 11

  
12 12
Executable lustrec
13 13
  Path:       src
setup.ml
1 1
(* setup.ml generated for the first time by OASIS v0.2.0 *)
2 2

  
3 3
(* OASIS_START *)
4
(* DO NOT EDIT (digest: bfbef9a3c28e55b657d10679aeb14c68) *)
4
(* DO NOT EDIT (digest: 6666f62d55895fd4c2e5dbbf8e9d4998) *)
5 5
(*
6 6
   Regenerated by OASIS v0.2.0
7 7
   Visit http://oasis.forge.ocamlcore.org for more information and
......
5165 5165
                        (("mkdir",
5166 5166
                           [
5167 5167
                              "-p";
5168
                              "/usr/local/include/lustrec;";
5168
                              "$(prefix)/include;";
5169 5169
                              "cp";
5170
                              "include/*";
5171
                              "/usr/local/include/lustrec/"
5170
                              "-rf";
5171
                              "include";
5172
                              "$(prefix)/include/lustrec"
5172 5173
                           ])))
5173 5174
                 ];
5174 5175
               };
src/c_backend.ml
28 28
open Corelang
29 29
open Machine_code
30 30

  
31

  
32 31
(********************************************************************************************)
33 32
(*                     Basic      Printing functions                                        *)
34 33
(********************************************************************************************)
......
772 771

  
773 772
let print_makefile basename nodename fmt =
774 773
  fprintf fmt "GCC=gcc@.";
775
  fprintf fmt "INC=/usr/local/include/lustrec@.";
774
  fprintf fmt "LUSTREC=%s@." Sys.executable_name;
775
  fprintf fmt "LUSTREC_BASE=%s@." (Filename.dirname (Filename.dirname Sys.executable_name));
776
  fprintf fmt "INC=${LUSTREC_BASE}/include/lustrec@.";
776 777
  fprintf fmt "@.";
777 778
  fprintf fmt "%s_%s:@." basename nodename;
778 779
  fprintf fmt "\t${GCC} -I${INC} -I. -c %s.c@." basename;    
779 780
  fprintf fmt "\t${GCC} -I${INC} -c ${INC}/io_frontend.c@.";    
780 781
(*  fprintf fmt "\t${GCC} -I${INC} -c ${INC}/StdLibrary.c@."; *)
781 782
(*  fprintf fmt "\t${GCC} -o %s_%s io_frontend.o StdLibrary.o -lm %s.o@." basename nodename basename*)
782
 fprintf fmt "\t${GCC} -o %s_%s io_frontend.o -lm %s.o@." basename nodename basename
783
 fprintf fmt "\t${GCC} -o %s_%s io_frontend.o -lm %s.o@." basename nodename basename;
784
 fprintf fmt "@.";
785
 fprintf fmt "clean:@.";
786
 fprintf fmt "\t\\rm -f *.o %s_%s@." basename nodename
783 787

  
784 788

  
785 789

  
test/Makefile
6 6

  
7 7
clean:
8 8
	@rm -rf build
9
	@for i in `find . -iname *.lusi`; do grep generated $$i > /dev/null; if [ $$? -eq 0 ]; then rm $$i; fi; done
9 10

  
10 11
distclean: clean
11 12
	@rm -rf report*
test/test-compile.sh
1 1
#!/bin/bash
2 2

  
3 3
NOW=`date "+%y%m%d%H%M"`
4
LUSTREC="../../_build/src/lustrec"
4
#LUSTREC="../../_build/src/lustrec"
5
LUSTREC=lustrec
5 6
mkdir -p build
6 7
cd build
7 8

  

Also available in: Unified diff