#
# This file is part of the Alliance CAD System
# Copyright (C) Laboratoire LIP6 - Dpartement ASIM
# Universite Pierre et Marie Curie
# 
# Home page          : http://www-asim.lip6.fr/alliance/
# E-mail support     : mailto:alliance-support@asim.lip6.fr
# 
# This progam is  free software; you can redistribute it  and/or modify it
# under the  terms of the GNU  General Public License as  published by the
# Free Software Foundation;  either version 2 of the License,  or (at your
# option) any later version.
# 
# Alliance VLSI  CAD System  is distributed  in the hope  that it  will be
# useful, but WITHOUT  ANY WARRANTY; without even the  implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
# 
# You should have received a copy  of the GNU General Public License along
# with the GNU C Library; see the  file COPYING. If not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

#
# Makefile Alliance source
#
# Works well with gmake...
#
# diff -r -b -B sources/ ../old/labo_11_97/ | grep -i "^diff\|architectu" | diffcolor | less -r
#ALL_DIRS = 	$(shell find * -name "sce" -maxdepth 1 -type d)
# -i comportemental `find . -type f \( -name "*.[ch]" -o  -name "*.yac" -o  -name "*.lex" \)`
#
# Copyright (C) 1996-1998 Olivier Sirol 
# $Id: Makefile,v 1.27 2002/02/20 16:23:50 czo Exp $
#

# a ajouter : 
# c4 
# cvs rm : algue amg asm bsg dpr fitpath flop fpmap genview grog gscr obsolete rage rds2ps rfg rsa scr testools
# cach : c4 cns pcbs power sea yeap
#

ALL_DIRS = mbk mbkal mbkedif mbkhilo mbkspice mbkvhdl mbkvti mbkvrlog mbkap mbkmg bdd beh behvhdl pat rds rdscif rdsgds icones elp genlib asimut alcban druc syf dreal graal lvx ring s2r lynx genpat sl flatbeh mbktools boog loon scapin dpgen ocp ocr


# STRIP="echo" CFLAGS="-Wall -g" 

all :
	@for DIR in $(ALL_DIRS)		;\
	do echo %%%%%%%%% building $$DIR ; $(MAKE) -C $$DIR 	;\
	if [ $$? -ne 0 ] 			;\
	  then  exit 1  			;\
	fi					;\
	done
	@echo "##########################################"
	@echo "###########                  #############"
	@echo "###########       O K        #############"
	@echo "###########                  #############"
	@echo "##########################################"

finger :
	@for DIR in $(ALL_DIRS)		;\
	do echo %%%%%%%%% building $$DIR ; finger $$DIR | grep ^Login ;\
	done

# C tags source code for ViM
# ctags -e pour des tags emacs

ctags :
	@for DIR in $(shell find . -type d -a \! -iname CVS)		;\
	do ( 					 \
	   echo %%%%%%%%%% $$DIR                ;\
           cd $$DIR	                        ;\
           ctags -R .                           ;\
		)				;\
	if [ $$? -ne 0 ] 			;\
	  then  exit 1  			;\
	fi					;\
	done

etags :
	@for DIR in $(shell find . -type d -a \! -iname CVS)		;\
	do ( 					 \
	   echo %%%%%%%%%% $$DIR                ;\
           cd $$DIR	                        ;\
           ctags -e -R .	                ;\
		)				;\
	if [ $$? -ne 0 ] 			;\
	  then  exit 1  			;\
	fi					;\
	done

cleantag :
	find . -iname tags | xargs rm -f dummy
	find . -iname TAGS | xargs rm -f dummy

% :
	@for DIR in $(ALL_DIRS)		;\
	do $(MAKE) -C $$DIR  $@		;\
	if [ $$? -ne 0 ] 			;\
	  then  exit 1 				;\
	fi					;\
	done


.PHONY : list_files

list_files : 
	echo $(ALL_DIRS)

