# Automatically Generated Makefile by EDE.
# For use with: make
# Relative File Name: cedet/semantic/Makefile
#
# DO NOT MODIFY THIS FILE OR YOUR CHANGES MAY BE LOST.
# EDE is the Emacs Development Environment.
# http://cedet.sourceforge.net/ede.shtml
#
LOADPATH= ../ ../  ../../../ 
require=$(foreach r,$(1),(require (quote $(r))))
EMACSFLAGS=-batch --no-site-file --eval '(setq debug-on-error t)' -l "../../../cedet-remove-builtin.el"
EMACS=@echo "    > $@";emacs
AUTOGENFLAGS=-L ../ --eval '(progn (require (quote cedet-compat)) (require (quote mode-local)))'

top=../../
ede_FILES=Project.ede Makefile

LOADDEFS=loaddefs.el
LOADDIRS=. analyze bovine decorate ectags symref wisent
semantic_LISP=fw.el lex.el lex-spp.el edit.el util.el tag.el tag-ls.el find.el sort.el tag-file.el tag-write.el doc.el idle.el custom.el
utils_LISP=ast.el ctxt.el dep.el format.el scope.el
Database_LISP=db.el db-mode.el db-debug.el db-ebrowse.el db-el.el db-file.el db-find.el db-mk.el db-ref.el db-search.el db-typecache.el db-javascript.el db-global.el db-cscope.el db-javap.el db-mozrepl.el
tools_LISP=adebug.el canned-configs.el chart.el complete.el debug.el elp.el grammar.el gram-wy-fallback.el ia-sb.el ia.el imenu.el mru-bookmark.el sb.el util-modes.el senator.el m3.el
subprojects-top_LISP=analyze.el bovine.el decorate.el symref.el wisent.el
Languages_LISP=texi.el html.el java.el
maintenance_LISP=ede-grammar.el
metagrammar_SEMANTIC_GRAMMAR=grammar.wy
metagrammar_SEMANTIC_GRAMMAR_EL=grammar-wy.el
VERSION=1.1beta
DISTDIR=$(top)cedet-topdir-$(VERSION)/cedet/semantic



all: semantic utils Database tools subprojects-top Languages maintenance metagrammar wisent Symref ectags Decorator bovinator Analyzer

.PHONY: clean-autoloads
clean-autoloads: 
	rm -f $(LOADDEFS)

.PHONY: autoloads
autoloads: 
	$(EMACS) $(EMACSFLAGS) $(AUTOGENFLAGS) $(addprefix -L ,$(LOADPATH)) --eval '(progn $(call require, $(PRELOADS)) (setq generated-autoload-file "$(abspath $(LOADDEFS))"))' -f batch-update-autoloads $(abspath $(LOADDIRS))


%.elc: %.el
	$(EMACS) $(EMACSFLAGS) $(addprefix -L ,$(LOADPATH)) --eval '(progn $(call require, $(PRELOADS)))' -f batch-byte-compile $^

.PHONY: semantic
semantic: $(addsuffix c, $(semantic_LISP))
semantic: PRELOADS=cedet-compat

.PHONY: utils
utils: $(addsuffix c, $(utils_LISP))
utils: PRELOADS=cedet-compat

.PHONY: Database
Database: $(addsuffix c, $(Database_LISP))
Database: PRELOADS=cedet-compat

.PHONY: tools
tools: $(addsuffix c, $(tools_LISP))
tools: PRELOADS=cedet-compat

.PHONY: subprojects-top
subprojects-top: $(addsuffix c, $(subprojects-top_LISP))
subprojects-top: PRELOADS=cedet-compat

.PHONY: Languages
Languages: $(addsuffix c, $(Languages_LISP))
Languages: PRELOADS=cedet-compat

.PHONY: maintenance
maintenance: $(addsuffix c, $(maintenance_LISP))
maintenance: PRELOADS=cedet-compat

%-wy.el: %.wy
	$(EMACS) $(EMACSFLAGS) $(addprefix -L ,$(LOADPATH)) --eval '(progn $(call require,$(PRELOADS)))' -f semantic-grammar-batch-build-packages $^

.PHONY: metagrammar
metagrammar: $(addsuffix -wy.elc, $(basename $(metagrammar_SEMANTIC_GRAMMAR)))
metagrammar: PRELOADS=cedet-compat cedet-devel-load semantic/grammar semantic/bovine/grammar semantic/wisent/grammar

metagrammar: EMACSFLAGS+= --eval '(setq max-specpdl-size 1500 max-lisp-eval-depth 700 cedet-minimum-setup t)'
.PHONY:wisent
wisent:
	$(MAKE) -C wisent

.PHONY:Symref
Symref:
	$(MAKE) -C symref

.PHONY:ectags
ectags:
	$(MAKE) -C ectags

.PHONY:Decorator
Decorator:
	$(MAKE) -C decorate

.PHONY:bovinator
bovinator:
	$(MAKE) -C bovine

.PHONY:Analyzer
Analyzer:
	$(MAKE) -C analyze

tags: 
	$(MAKE) -C wisent/ $(MFLAGS) $@
	$(MAKE) -C symref/ $(MFLAGS) $@
	$(MAKE) -C ectags/ $(MFLAGS) $@
	$(MAKE) -C decorate/ $(MFLAGS) $@
	$(MAKE) -C bovine/ $(MFLAGS) $@
	$(MAKE) -C analyze/ $(MFLAGS) $@


clean:
	rm -f *-by.el *-wy.el *.elc

.PHONY: dist

dist: autoloads $(metagrammar_SEMANTIC_GRAMMAR_EL)
	mkdir $(DISTDIR)
	cp loaddefs.el $(semantic_LISP) $(utils_LISP) $(Database_LISP) $(tools_LISP) $(subprojects-top_LISP) $(Languages_LISP) $(maintenance_LISP) $(metagrammar_SEMANTIC_GRAMMAR) $(metagrammar_SEMANTIC_GRAMMAR_EL) $(ede_FILES) $(DISTDIR)
	$(MAKE) -C wisent $(MFLAGS) DISTDIR=$(DISTDIR)/wisent dist
	$(MAKE) -C symref $(MFLAGS) DISTDIR=$(DISTDIR)/symref dist
	$(MAKE) -C ectags $(MFLAGS) DISTDIR=$(DISTDIR)/ectags dist
	$(MAKE) -C decorate $(MFLAGS) DISTDIR=$(DISTDIR)/decorate dist
	$(MAKE) -C bovine $(MFLAGS) DISTDIR=$(DISTDIR)/bovine dist
	$(MAKE) -C analyze $(MFLAGS) DISTDIR=$(DISTDIR)/analyze dist

Makefile: Project.ede
	@echo Makefile is out of date!  It needs to be regenerated by EDE.
	@echo If you have not modified Project.ede, you can use 'touch' to update the Makefile time stamp.
	@false



# End of Makefile
