mutated_ocaml / testsuite / makefiles / Makefile.several

camlspotter 98c0f8b 
camlspotter d2116cf 


camlspotter 2f3f8b6 













camlspotter d2116cf 









camlspotter 35cc436 
camlspotter 34e8d4a 


camlspotter d2116cf 
camlspotter 35cc436 
camlspotter 34e8d4a 


camlspotter d2116cf 





camlspotter bb92dae 
camlspotter d2116cf 




camlspotter 98c0f8b 
camlspotter d2116cf 


camlspotter 98c0f8b 

camlspotter d2116cf 
camlspotter 35cc436 

camlspotter d2116cf 
camlspotter bb92dae 
# $Id: Makefile.several 12618 2012-06-19 14:17:41Z doligez $

CC=$(NATIVECC) $(NATIVECCCOMPOPTS)
FC=$(FORTAN_COMPILER)
CMO_FILES=$(MODULES:=.cmo)
CMX_FILES=$(MODULES:=.cmx)
CMA_FILES=$(LIBRARIES:=.cma)
CMXA_FILES=$(LIBRARIES:=.cmxa)
O_FILES=$(C_FILES:=.o)

CUSTOM_FLAG=`if [ -z "$(C_FILES)" ]; then true; else echo '-custom'; fi`
ADD_CFLAGS+=$(CUSTOM_FLAG)
FORTRAN_LIB=`if [ -z "$(F_FILES)" ]; then true; else echo '$(FORTRAN_LIBRARY)'; fi`
ADD_CFLAGS+=$(FORTRAN_LIB)
ADD_OPTFLAGS+=$(FORTRAN_LIB)

check:
	@if [ -n "$(FORTRAN_COMPILER)" -o -z "$(F_FILES)" ]; then $(MAKE) run-all; fi

run-all:
	@for file in $(C_FILES); do \
	  $(CC) -c -I$(PREFIX)/lib/ocaml/caml $$file.c; \
	done;
	@for file in $(F_FILES); do \
	  $(FORTRAN_COMPILER) -c -I$(PREFIX)/lib/ocaml/caml $$file.f; \
	done;
	@for file in *.ml; do \
	  printf " ... testing '$$file':"; \
	  $(MAKE) run-file DESC=ocamlc COMP='$(OCAMLC)' COMPFLAGS='$(ADD_COMPFLAGS) $(ADD_CFLAGS) $(O_FILES) -w a $(CMA_FILES) -I $(BASEDIR)/lib $(CMO_FILES)' FILE=$$file PROGRAM_ARGS=$(PROGRAM_ARGS) && \
	  if [ -z "$(BYTECODE_ONLY)" ]; then \
	    $(MAKE) run-file DESC=ocamlopt COMP=$(PREFIX)/bin/ocamlopt COMPFLAGS='$(ADD_COMPFLAGS) $(ADD_OPTFLAGS) $(O_FILES) -w a $(CMXA_FILES) -I $(BASEDIR)/lib $(CMX_FILES)' FILE=$$file PROGRAM_ARGS=$(PROGRAM_ARGS); \
	  fi && \
	  if [ ! -z $(UNSAFE) ]; then \
	    $(MAKE) run-file DESC=ocamlc-unsafe COMP=$(PREFIX)/bin/ocamlc COMPFLAGS='-w a -unsafe -I $(BASEDIR)/lib $(CMO_FILES)' FILE=$$file && \
	    if [ -z "$(BYTECODE_ONLY)" ]; then \
	      $(MAKE) run-file DESC=ocamlopt-unsafe COMP=$(PREFIX)/bin/ocamlopt COMPFLAGS='-w a -unsafe -I $(BASEDIR)/lib $(CMX_FILES)' FILE=$$file; \
	    fi; \
	  fi && \
	  echo " => passed"; \
	done;

run-file:
	@printf " $(DESC)"
	@rm -f program program.exe
	@$(COMP) $(COMPFLAGS) $(FILE) -o program
	@if [ -f `basename $(FILE) ml`runner ]; then \
	  sh `basename $(FILE) ml`runner; \
	else \
	  ./program $(PROGRAM_ARGS) > `basename $(FILE) ml`result; \
	fi || (echo " => failed" && exit 1)
	@if [ -f `basename $(FILE) ml`checker ]; then \
	  sh `basename $(FILE) ml`checker; \
	else \
	  $(DIFF) `basename $(FILE) ml`reference `basename $(FILE) ml`result > /dev/null; \
	fi || (echo " => failed" && exit 1)

promote: defaultpromote

clean: defaultclean
	@rm -f *.result ./program program.exe
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.