ocamlspot / Makefile

camlspotter d0e75b7 












camlspotter fb1f10e 
camlspotter 2805dba 
camlspotter fb1f10e 




camlspotter 130743d 

camlspotter fb1f10e 








camlspotter 2e9ffa4 
camlspotter fb1f10e 

camlspotter a3b5276 
camlspotter fb1f10e 
camlspotter 5214e6d 
camlspotter 1a66287 
camlspotter fb1f10e 

















camlspotter 502372f 
camlspotter fb1f10e 





















camlspotter 9cb127d 


camlspotter 1fd4dcd 


camlspotter fb1f10e 



















































camlspotter a42aa33 
camlspotter fb1f10e 













camlspotter a42aa33 
camlspotter fb1f10e 
camlspotter 93d46ba 



camlspotter fb1f10e 


#######################################################################
#                                                                     #
#                            OCamlSpotter                             #
#                                                                     #
#                             Jun FURUSE                              #
#                                                                     #
#   Copyright 2008-2012 Jun Furuse. All rights reserved.              #
#   This file is distributed under the terms of the GNU Library       #
#   General Public License, with the special exception on linking     #
#   described in file LICENSE.                                        #
#                                                                     #
#######################################################################


OCAMLDIR=$(shell ocamlc -where)
include $(OCAMLDIR)/Makefile.config

# Various commands and dir
##########################
CAMLRUN= ocamlrun
OCAMLC   = ocamlc -annot -bin-annot -w A-4-9 -warn-error A-4-9-32-33-34
OCAMLOPT = ocamlopt -annot -bin-annot -w A-4-9 -warn-error A-4-9-32-33-34
OCAMLDEP = ocamldep
OCAMLLEX = ocamllex
OCAMLYACC= ocamlyacc
OCAMLLIB = $(LIBDIR)
OCAMLBIN = $(BINDIR)

# Compilation
#############
OCAMLSRCDIR=..
INCLUDES_DEP=-I +compiler-libs

# Requires unix!
COMPFLAGS= -g $(INCLUDES_DEP) -I +unix

MODULES= utils checksum fileident filepath dotfile compdir xset treeset command typeexpand \
	xlongident name xident xpath locident typeFix xprinttyp ext ttfold cmt spot spoteval spotconfig_intf spotconfig spotfile pathreparse ocamlspot

OBJS=		$(addsuffix .cmo, $(MODULES))

XOBJS=		$(addsuffix .cmx, $(MODULES))

all: ocamlspot 

.PHONY: test

tests:
	(cd tests; $(MAKE))

ocamlspot: $(COMPOBJS) $(OBJS)
	$(OCAMLC) -o $@ $(COMPFLAGS) $(COMPOBJS) unix.cma ocamlcommon.cma $(OBJS)

opt.opt: ocamlspot.opt

ocamlspot.opt: $(COMPXOBJS) $(XOBJS)
	$(OCAMLOPT) -o $@ $(COMPFLAGS) $(COMPXOBJS) unix.cmxa ocamlcommon.cmxa $(XOBJS)

#	$(CAMLOPT) $(LINKFLAGS) -ccopt "$(BYTECCLINKOPTS)" -o ocamlc.opt \
#	  $(COMPOBJS:.cmo=.cmx) \
#	  asmrun/meta.o asmrun/dynlink.o -cclib "$(BYTECCLIBS)"
#	@sed -e 's|@compiler@|$$topdir/ocamlc.opt|' \
#	  driver/ocamlcomp.sh.in > ocamlcomp.sh
#	@chmod +x ocamlcomp.sh


opt: ocamlspot.opt

.PHONY: opt opt.opt

clean:
	rm -f ocamlspot ocamlspot.opt *.cm* *.o *.annot *.sp*t 
	(cd tests; $(MAKE) clean)

# generic rules :
#################

.SUFFIXES: .mll .mly .ml .mli .cmo .cmi .cmx

typedtreefold.cmo: typedtreefold.ml
	$(OCAMLC) -I +compiler-libs -pp 'camlp4o Camlp4FoldGenerator.cmo' typedtreefold.ml

ttfold.out.ml: typedtreefold.ml
	camlp4o -printer Camlp4OCamlPrinter Camlp4FoldGenerator.cmo typedtreefold.ml > $@

.ml.cmo:
	$(OCAMLC) $(OCAMLPP) $(COMPFLAGS) -c $<

.mli.cmi:
	$(OCAMLC) $(OCAMLPP) $(COMPFLAGS) -c $<

.ml.cmx:
	$(OCAMLOPT) $(OCAMLPP) $(COMPFLAGS) -c $<

.mll.ml:
	$(OCAMLLEX) $<

.mly.ml:
	$(OCAMLYACC) -v $<

.mly.mli:
	$(OCAMLYACC) -v $<

beforedepend::

depend: beforedepend
	ocamldep $(INCLUDES) *.mli *.ml > .depend

.PHONY: clean install installopt beforedepend depend test

# elisp

EMACS=emacs

ELISPS=ocamlspot.el

COMPILECMD=(progn \
		(setq load-path (cons "." load-path)) \
		(byte-compile-file "ocamlspot.el"))

install-elisp:
	@if test "$(EMACSDIR)" = ""; then \
          set xxx `($(EMACS) --batch --eval "(mapcar 'print load-path)") \
                   2>/dev/null | \
                   sed -n -e '/\/site-lisp/s/"//gp'`; \
          if test "$$2" = ""; then \
            echo "Cannot determine Emacs site-lisp directory"; \
            exit 2; \
          else \
            $(MAKE) EMACSDIR="$$2" simple-install; \
	  fi; \
        else \
          $(MAKE) simple-install; \
        fi

# install the .el files, but do not compile them.
install-el:
	$(MAKE) NOCOMPILE=true install-elisp

simple-install:
	@echo "Installing in $(EMACSDIR)..."
	if test -d $(EMACSDIR); then : ; else mkdir -p $(EMACSDIR); fi
	cp $(ELISPS) $(EMACSDIR)
	if [ -z "$(NOCOMPILE)" ]; then \
	  cd $(EMACSDIR); $(EMACS) --batch --eval '$(COMPILECMD)'; \
	fi

install installopt::
	cp ocamlspot $(BINDIR)/ocamlspot$(EXE)
	if test -f ocamlspot.opt; \
	  then cp ocamlspot.opt $(BINDIR)/ocamlspot.opt$(EXE); else :; fi
	# The following is optional
	# $(MAKE) install-elisp

uninstall::
	rm -f $(BINDIR)/ocamlspot$(EXE)
	rm -f $(BINDIR)/ocamlspot.opt$(EXE)

test: ocamlspot ocamlspot.cmo
	tests/auto-test.pl ocamlspot.ml treeset.ml xset.ml 

include .depend
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.