# Makefile generated by imake - do not edit!
# $Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $

# ----------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and <../kapack/Imakefile>
# $XConsortium: Imake.tmpl,v 1.224.1.1 95/06/19 17:51:01 gildea Exp $
#

.SUFFIXES: .i

# $XConsortium: Imake.cf,v 1.19 95/01/05 19:24:32 kaleb Exp $

# -----------------------------------------------------------------------
# site-specific configuration parameters that need to come before
# the platform-specific parameters - edit site.def to change

# site:  $XConsortium: site.sample,v 1.9 94/04/08 17:02:06 rws Exp $

# -----------------------------------------------------------------------
# platform-specific configuration parameters - edit linux.cf to change

# platform:  $XConsortium: linux.cf,v 1.11 95/01/23 18:32:03 kaleb Exp $

# $XConsortium: lnxLib.rules,v 1.8 95/01/16 21:11:00 kaleb Exp $

# $XConsortium: xfree86.cf,v 1.9 95/01/25 16:42:40 kaleb Exp $

LINKKITDIR = $(USRLIBDIR)/Server

       XF86SRC = $(SERVERSRC)/hw/xfree86
  XF86ACCELSRC = $(XF86SRC)/accel
    XF86COMSRC = $(XF86SRC)/common
 XF86CONFIGSRC = $(XF86COMSRC)
     XF86HWSRC = $(XF86SRC)/common_hw
     XF86OSSRC = $(XF86SRC)/os-support
  VGADRIVERSRC = $(XF86SRC)/vga256/drivers
VGA16DRIVERSRC = $(XF86SRC)/vga16/drivers
 VGA2DRIVERSRC = $(XF86SRC)/vga2/drivers
 MONODRIVERSRC = $(XF86SRC)/mono/drivers
   S3DRIVERSRC = $(XF86SRC)/accel/s3/drivers

XF86INIT   = $(XF86COMSRC)/xf86Init.o
XF86MINIT  = $(XF86COMSRC)/xf86Init_m.o
XF86CONFIG = $(XF86CONFIGSRC)/xf86_Option.o
XF86COMLIB = $(XF86COMSRC)/libxf86.a
XF86OSLIB  = $(XF86OSSRC)/libxf86_os.a
XF86HWLIB  = $(XF86HWSRC)/libxf86_hw.a
XF86LIBS   = $(XF86INIT) $(XF86CONFIG) $(XF86COMLIB) $(XF86HWLIB) $(XF86OSLIB)
XF86MLIBS  = $(XF86MINIT) $(XF86CONFIG) $(XF86COMLIB) $(XF86HWLIB) $(XF86OSLIB)

        XFREE86DOCDIR = $(LIBDIR)/doc
      XFREE86PSDOCDIR = $(XFREE86DOCDIR)/PostScript
    XFREE86HTMLDOCDIR = $(XFREE86DOCDIR)/html
XFREE86JAPANESEDOCDIR = $(XFREE86DOCDIR)/Japanese

# $XConsortium: xf86.rules,v 1.7 95/01/25 16:34:39 kaleb Exp $

# -----------------------------------------------------------------------
# site-specific configuration parameters that go after
# the platform-specific parameters - edit site.def to change

# site:  $XConsortium: site.sample,v 1.9 94/04/08 17:02:06 rws Exp $

# -----------------------------------------------------------------------
# Imake rules for building libraries, programs, scripts, and data files
# rules:  $XConsortium: Imake.rules,v 1.197.1.1 95/06/19 18:01:48 gildea Exp $

 _NULLCMD_ = @ echo -n

          PATHSEP = /
	        / = /
            SHELL = /bin/sh

              TOP = /A/lnx212/nfs/linux/md2/cern/new98/src
      CURRENT_DIR = /packlib/kapack

	QUOTE="
\ENDQUOTE="

ifeq "$(strip $(IMAKE))" ""
            IMAKE = imake
endif
ifeq "$(strip $(MAKEDEPEND))" ""
           DEPEND = makedepend
else
	   DEPEND = $(MAKEDEPEND)
endif
        MKDIRHIER = mkdirhier
        CONFIGSRC = $(CVSCOSRC)/config
         IMAKESRC = $(CONFIGSRC)/imake
        DEPENDSRC = $(CONFIGSRC)/makedepend
           IXXSRC = $(UNSUPPORTEDSRC)/programs/ixx
              IXX = ixx
         IXXFLAGS = -s BaseObject -m TypeObj -r RequestObj -p Xf
      IXXINCLUDES = -i '<X11/Fresco/enter-scope.h>'

          INCROOT = $(CVSCOSRC)/include
        USRLIBDIR = $(CVSCOSRC)/lib
         SHLIBDIR = $(CVSCOSRC)/lib
       LINTLIBDIR = $(USRLIBDIR)/lint
          MANPATH = $(CVSCOSRC)/man
    MANSOURCEPATH = $(MANPATH)/man
           MANDIR = $(MANSOURCEPATH)1
        LIBMANDIR = $(MANSOURCEPATH)3
       FILEMANDIR = $(MANSOURCEPATH)5

                AR = ar clq

	    XARGS = xargs

  BOOTSTRAPCFLAGS =
               CC = gcc
               AS = as

        CCDEFINES =

               FC = g77
              FPP = /lib/cpp
      FDEBUGFLAGS = -O
FORTRANSAVEOPTION =
   FORTRANOPTIONS = -fno-automatic -fno-second-underscore -fugly-complex  -finit-local-zero -fexceptions -fPIC $(FORTRANSAVEOPTION)
           FCLINK = g77
  FORTRANINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(PACKAGE_INCLUDES) $(TOP_INCLUDES)
   FORTRANDEFINES =
FORTRANALLDEFMDEPEND = $(FORTRANINCLUDES) $(FORTRANDEFINES) $(CERNDEFINES) $(EXTRA_DEFINES) $(DEFINES)

  FORTRANALLDEFINES = $(FORTRANALLDEFMDEPEND)

          FCFLAGS = $(FDEBUGFLAGS) $(FORTRANOPTIONS)

.SUFFIXES: .cxx

              CXX = g++
    CXXDEBUGFLAGS = -O -march=i486 -fno-strength-reduce	-fomit-frame-pointer -fexceptions -fPIC
 CXXEXTRA_DEFINES =
CXXEXTRA_INCLUDES =
  CXXIDL_INCLUDES = -I$(TOP)/include
   CXXSTD_DEFINES = -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
       CXXOPTIONS = -fPIC
      CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) $(CXXIDL_INCLUDES)
       CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES)
         CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)

         COMPRESS = compress
              CPP = /lib/cpp $(STD_CPP_DEFINES)
    PREPROCESSCMD = gcc -E $(STD_CPP_DEFINES)
          INSTALL = install
     INSTALLFLAGS = -c
               LD = ld
              LEX = flex -l
           LEXLIB = -lfl
             YACC = bison -y
           CCYACC = bison -y
             LINT = lint
      LINTLIBFLAG = -C
         LINTOPTS = -axz
               LN = ln -s
             MAKE = gmake
               MV = mv
               CP = cp

           RANLIB = ranlib
  RANLIBINSTFLAGS =

               RM = rm -f
        MANSUFFIX = 1x
     LIBMANSUFFIX = 3x
    FILEMANSUFFIX = 5x
            TROFF = psroff
         MSMACROS = -ms
              TBL = tbl
              EQN = eqn
            TOUCH = touch

            DVIPS = dvips
            LATEX = latex

     STD_INCLUDES =
  STD_CPP_DEFINES = -traditional -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
      STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
 EXTRA_LOAD_FLAGS =
  EXTRA_LDOPTIONS =
  EXTRA_LIBRARIES = -lcrypt
             TAGS = ctags

           MFLAGS=$(filter-out --%,$(filter -%,$(MAKEFLAGS)))

    SHAREDCODEDEF =
         SHLIBDEF =

     SHLIBLDFLAGS =

         PICFLAGS = -B/usr/dll/jump/

      CXXPICFLAGS = -B/usr/dll/jump/

      PIFFLAGS = -B/usr/dll/jump/

    PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO

     INSTPGMFLAGS = -s

     INSTBINFLAGS = -m 0755
     INSTUIDFLAGS = -s -m 4755
     INSTLIBFLAGS = -m 0644
     INSTINCFLAGS = -m 0444
     INSTMANFLAGS = -m 0444
     INSTDATFLAGS = -m 0444
    INSTKMEMFLAGS = -s -m 4755

      PROJECTROOT = $(CVSCOSRC)

     TOP_INCLUDES = -I$(INCROOT)

      CDEBUGFLAGS = -O -march=i486 -fno-strength-reduce	-fomit-frame-pointer -fexceptions -fPIC
        CCOPTIONS = -fPIC -fexceptions

      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(PACKAGE_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) $(CCDEFINES) $(CERNDEFINES)
           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
         LDPRELIB = -L$(USRLIBDIR)
        LDPOSTLIB =
        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)  $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIB)
     CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIB)
      FCLDOPTIONS =  $(FDEBUGFLAGS) $(FORTRANOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIB)

           LDLIBS = $(LDPOSTLIB) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)

           CCLINK = $(CC)

          CXXLINK = $(CXX)

     LDSTRIPFLAGS = -x
   LDCOMBINEFLAGS = -r
      DEPENDFLAGS =

        MACROFILE = linux.cf
           RM_CMD = $(RM)

    IMAKE_DEFINES =
    IMAKE_INCLUDES=

         IRULESRC = $(CONFIGDIR)
        IMAKE_CMD = $(IMAKE) -DUseInstalled -DLocalTop=$(LOCALTOP)  			-I$(IRULESRC) $(IMAKE_INCLUDES) $(IMAKE_DEFINES)

     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Project.tmpl 			$(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) 			 $(EXTRA_ICONFIGFILES)

archive/%.o : %.c archive/%.d
	$(RM) $@
	$(CC) -c $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) $< -o $@

archive/%.d : %.c
	-@if [ ! -d archive ] ; then mkdir archive; fi
	@ $(TOUCH) $@.tmp
	$(DEPEND) -f$@.tmp -p archive/ -- $(ALLDEFINES) $(_NOOP_) $<
	@ sed 's=$*\.o=& $@=g' $@.tmp > $@
	@ $(RM) $@.tmp $@.tmp.bak

debug/%.o : %.c debug/%.d
	$(RM) $@
	$(CC) -c -g $(CCOPTIONS) $(ALLDEFINES) $< -o $@

debug/%.d : %.c
	-@if [ ! -d debug ] ; then mkdir debug; fi
	@ $(TOUCH) $@.tmp
	$(DEPEND) -f$@.tmp -p debug/ -- $(ALLDEFINES) $(_NOOP_) $<
	@ sed 's=$*\.o=& $@=g' $@.tmp > $@
	@ $(RM) $@.tmp $@.tmp.bak

shared/%.o : %.c shared/%.d
	$(RM) $@
	$(CC) -c $(CDEBUGFLAGS) $(PICFLAGS) $(CCOPTIONS) $(ALLDEFINES) $< -o $@

shared/%.d : %.c
	-@if [ ! -d shared ] ; then mkdir shared; fi
	@ $(TOUCH) $@.tmp
	$(DEPEND) -f$@.tmp -p shared/ -- $(ALLDEFINES) $(_NOOP_) $<
	@ sed 's=$*\.o=& $@=g' $@.tmp > $@
	@ $(RM) $@.tmp $@.tmp.bak

.SUFFIXES: .F

.F.o:
	$(RM) $@
	$(FC) -c $(FDEBUGFLAGS) $(FORTRANOPTIONS) $(FORTRANALLDEFINES) -o $@ $<

archive/%.o : %.F archive/%.d
	$(RM) $@
	$(FC) -c $(FDEBUGFLAGS) $(FORTRANOPTIONS) $(FORTRANALLDEFINES) -o $@ $<

archive/%.d : %.F
	-@if [ ! -d archive ] ; then mkdir archive; fi
	@ $(TOUCH) $@.tmp
	$(DEPEND) -f$@.tmp -p archive/ -- $(FORTRANALLDEFMDEPEND) $(_NOOP_) $<
	@ sed 's=$*\.o=& $@=g' $@.tmp > $@
	@ $(RM) $@.tmp $@.tmp.bak

debug/%.o : %.F debug/%.d
	$(RM) $@
	$(FC) -c -g $(FORTRANOPTIONS) $(FORTRANALLDEFINES) -o $@ $<

debug/%.d : %.F
	-@if [ ! -d debug ] ; then mkdir debug; fi
	@ $(TOUCH) $@.tmp
	$(DEPEND) -f$@.tmp -p debug/ -- $(FORTRANALLDEFMDEPEND) $(_NOOP_) $<
	@ sed 's=$*\.o=& $@=g' $@.tmp > $@
	@ $(RM) $@.tmp $@.tmp.bak

shared/%.o : %.F shared/%.d
	$(RM) $@
	$(FC) -c $(FDEBUGFLAGS) $(PIFFLAGS) $(FORTRANOPTIONS) $(FORTRANALLDEFINES) -o $@ $<

shared/%.d : %.F
	-@if [ ! -d shared ] ; then mkdir shared; fi
	@ $(TOUCH) $@.tmp
	$(DEPEND) -f$@.tmp -p shared/ -- $(FORTRANALLDEFMDEPEND) $(_NOOP_) $<
	@ sed 's=$*\.o=& $@=g' $@.tmp > $@
	@ $(RM) $@.tmp $@.tmp.bak

ifeq ($(strip $(CERN)),)
CERN=/cern
endif

ifeq ($(strip $(CERN_LEVEL)),)
CERN_LEVEL=new
endif

ifeq ($(strip $(CERN_LIBDIR)),)
CERN_LIBDIR=$(CERN)$/$(CERN_LEVEL)$/lib
endif

ifeq ($(strip $(CERN_SHLIBDIR)),)
CERN_SHLIBDIR=$(CERN)$/$(CERN_LEVEL)$/shlib
endif

ifeq ($(strip $(CERN_BINDIR)),)
CERN_BINDIR=$(CERN)$/$(CERN_LEVEL)$/bin
endif

        CONFIGDIR = $(CVSCOSRC)$/config

	CERNDEFINES=-DCERNLIB_LINUX -DCERNLIB_UNIX -DCERNLIB_LNX  -DCERNLIB_QMGLIBC
        PACKAGETOP=/packlib
        PACKAGE_NAME=packlib
	LOCALTOP=

        PACKAGE_INCLUDES=-I$(TOP)$(PACKAGETOP) -I$(PROJECTROOT)$(LOCALTOP)$(PACKAGETOP) -I$(VPATH)

	VPATH=$(PROJECTROOT)$(LOCALTOP)$(CURRENT_DIR)

OBJS_C=$(SRCS_C:.c=.o)
OBJS_F=$(SRCS_F:.F=.o)
OBJS_CDF=$(SRCS_CDF:.cdf=.o)

OBJS=$(OBJS_C) $(OBJS_F) $(OBJS_CDF)

# -----------------------------------------------------------------------
# start of Imakefile : <../kapack/Imakefile>

all:: libraries

SUBDIRS= code test kapack

PACKAGETOP=$(CURRENT_DIR)
PACKAGE_NAME=kapack

ifeq ($(strip $(VERSION)),)
VERSION=archive
endif
ifneq ($(strip $(VERSION)),archive)
LIBRARY=kapack_$(VERSION)
else
LIBRARY=kapack
endif
LIBPATH=$(TOP)$(CURRENT_DIR)
SUBDIRLIST=code
SUBDIRSTAMPS=$(foreach dir,code,$(dir)/$(VERSION)/stamp)
ifeq ($(strip $(PACKAGE_LIB)),)
override PACKAGE_LIB=$(LIBPATH)/lib$(LIBRARY).a
endif

ifneq (kapack,)
.PHONY: kapack kapack-debug kapack-shared

kapack::
	@$(MAKE) VERSION=archive lib$@.a

kapack-debug::
	@$(MAKE) VERSION=debug lib$@.a

kapack-shared::
	@$(MAKE) VERSION=shared libkapack.sl

endif

archive_OBJS=$(foreach obj,$(OBJS),archive/$(obj))
debug_OBJS=$(foreach obj,$(OBJS),debug/$(obj))
shared_OBJS=$(foreach obj,$(OBJS),shared/$(obj))

ifeq ($(VERSION),archive)
VEROBJS:=archive_OBJS

endif

ifeq ($(VERSION),debug)
VEROBJS:=debug_OBJS

endif

ifeq ($(VERSION),shared)
VEROBJS:=shared_OBJS

endif

ifeq ($(VERSION),nil)
VERDIR=
VEROBJS=
endif

ifneq ($(strip $(VERSION)),)
VERDIR=$(VERSION)/
else
VERDIR=
VEROBJS=
endif

$(foreach ver,archive debug shared,$(ver)/objects.list):: \
	$(foreach dir,code,$(dir)/Makefile)

define build-object-list
@[ -n "$(@D)" -a ! -d "$(@D)" ] && mkdir $(@D) || true
@$(RM) $@
@echo $(strip $($(@D)_OBJS)) | tr ' ' '\012' > $@
@ (set -e;\
	case '${MFLAGS}' in *[i]*) set +e;; esac; \
	subdirs=$(QUOTE)$(strip code)$(QUOTE);\
	list=`/bin/pwd`/$@;\
	for dir in $$subdirs; do \
	(set -e;cd $$dir;sed -e "\=^[^/]=s=^.=$$dir/&=" $@ >> $$list);\
	done) || (rm $@; exit 1)
endef

ifeq ($(strip $(VERSION)),archive)
archive/objects.list:: Makefile $(archive_OBJS) \
	$(foreach dir,code,$(dir)/archive/objects.list)
	$(build-object-list)

else
archive/objects.list::
	$(MAKE) VERSION=archive archive/objects.list

endif
debug/objects.list:: Makefile $(debug_OBJS) \
	$(foreach dir,code,$(dir)/debug/objects.list)
	$(build-object-list)

shared/objects.list:: Makefile $(shared_OBJS) \
	$(foreach dir,code,$(dir)/shared/objects.list)
	$(build-object-list)

$(foreach dir,code,$(foreach ver,archive debug shared,$(dir)/$(ver)/objects.list))::
	@ echo checking $(CURRENT_DIR)/$(firstword $(subst /, ,$@))
	@ $(MAKE) -C $(firstword $(subst /, ,$@)) VERSION=$(filter archive debug shared,$(subst /, ,$@))	\
	$(patsubst $(firstword $(subst /, ,$@))/%,%,$@)

ifneq ($(strip kapack),)

libkapack.a: archive/objects.list
	@echo rebuild archive library $@ in $(CURRENT_DIR)
	@$(RM) $@
	@date
	@cat archive/objects.list | \
	$(XARGS) $(AR) $@
	@date
	$(RANLIB) $@

libkapack-debug.a: debug/objects.list
	@echo rebuild debug library $@ in $(CURRENT_DIR)
	@$(RM) $@
	@date
	@cat debug/objects.list | \
	$(XARGS) $(AR) $@
	@date
	$(RANLIB) $@

libkapack.sl:
	@echo No shared library available yet for  `uname`

endif

ifneq ($($(VEROBJS)),)
$($(VEROBJS):.o=.d): Makefile
include $($(VEROBJS):.o=.d)

endif

clean::
	$(RM) $(LIBRARY) $(VERDIR)stamp $(VERDIR)objects.list

test::  $(foreach dir,test,$(dir)/Makefile)

test::
	@set -e; \
	case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in test ;\
	do \
	(cd $$i ; echo "testing" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) PACKAGE_LIB=$(PACKAGE_LIB) test)||exit $$?; \
	done

install.include::  $(foreach dir,kapack,$(dir)/Makefile)

install.include::
	@set -e; \
	case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in kapack ;\
	do \
	(cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR)  install.include)||exit $$?; \
	done

emptyrule::

.SUFFIXES: .d

.c.d:
	$(SHELL) -ec "gcc -M $(ALLDEFINES) $< \
                      | sed 's/^[ ]*$*\.o/& $@/g' >$@"

.F.d:
	-@if [ ! -d . ] ; then mkdir .; fi
	@ $(TOUCH) $@.tmp
	$(DEPEND) -f$@.tmp -p ./ -- $(FORTRANALLDEFMDEPEND)  $<
	@ sed 's=$*\.o=& $@=g' $@.tmp > $@
	@ $(RM) $@.tmp $@.tmp.bak

# -----------------------------------------------------------------------
# common rules for all Makefiles - do not edit

.c.i:
	$(RM) $@
	$(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@

emptyrule::

clean::
	$(RM_CMD) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut   "#"*

Makefile:: Imakefile
	-@if [ -f $@ ]; then set -x; \
	$(RM) $@.bak; $(MV) $@ $@.bak; \
	else exit 0; fi
	$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) \
	-DPackageTop=$(PACKAGETOP)	\
	-DPackageName=$(PACKAGE_NAME) \
	 -f $<

tags::
	$(TAGS) -w *.[ch]
	$(TAGS) -xw *.[ch] > TAGS

# -----------------------------------------------------------------------
# rules for building in SUBDIRS - do not edit

install::  $(foreach dir,$(SUBDIRS),$(dir)/Makefile)

install::
	@set -e; \
	case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) install)||exit $$?; \
	done

install.man::  $(foreach dir,$(SUBDIRS),$(dir)/Makefile)

install.man::
	@set -e; \
	case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo "installing man pages" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) install.man)||exit $$?; \
	done

install.linkkit::  $(foreach dir,$(SUBDIRS),$(dir)/Makefile)

install.linkkit::
	@set -e; \
	case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo "installing link kit" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install.linkkit)||exit $$?; \
	done

clean::  $(foreach dir,$(SUBDIRS),$(dir)/Makefile)

clean::
	@set -e; \
	case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo "cleaning" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) RM_CMD='$(RM_CMD)' clean)||exit $$?; \
	done

tags::  $(foreach dir,$(SUBDIRS),$(dir)/Makefile)

tags::
	@set -e; \
	case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo "tagging" "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) TAGS='$(TAGS)' tags)||exit $$?; \
	done

Makefiles::
	-@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	case '${MFLAGS}' in *n*) executeit="no";; esac; \
	for i in $(SUBDIRS) ;\
	do \
	case "$(CURRENT_DIR)" in \
	.) curdir= ;; \
	*) curdir=$(CURRENT_DIR)/ ;; \
	esac; \
	echo "making Makefiles in $$curdir$$i..."; \
	itmp="$$i" \
	curtmp="$(CURRENT_DIR)" \
	toptmp=""; \
	case "$$itmp" in \
	../?*) \
	while echo "$$itmp" | grep '^../' > /dev/null;\
	do \
	toptmp="/`basename $$curtmp`$$toptmp"; \
	curtmp="`dirname $$curtmp`"; \
	itmp="`echo $$itmp | sed 's;../;;'`"; \
	done \
	;; \
	esac; \
	case "$$itmp" in \
	*/?*/?*/?*/?*)	newtop=../../../../..;; \
	*/?*/?*/?*)	newtop=../../../..;; \
	*/?*/?*)	newtop=../../..;; \
	*/?*)		newtop=../..;; \
	*)		newtop=..;; \
	esac; \
	newtop="$$newtop$$toptmp"; \
	case "$(TOP)" in \
	/?*) imaketop=$(TOP) \
	imakeprefix= ;; \
	.) imaketop=$$newtop \
	imakeprefix=$$newtop/ ;; \
	*) imaketop=$$newtop/$(TOP) \
	imakeprefix=$$newtop/ ;; \
	esac; \
	cd $$i; \
	$(RM) Makefile.bak; \
	if [ -f Makefile ]; then \
	echo "	$(MV) Makefile Makefile.bak"; \
	if [ "$$executeit" != "no" ]; then \
	$(MV) Makefile Makefile.bak; \
	fi; \
	fi; \
	if [ "$$executeit" != "no" ]; then \
	$(IMAKE_CMD) -DTOPDIR=$$imaketop \
	-DCURDIR=$$curdir$$i \
	-DPackageTop=$(PACKAGETOP) \
	-DPackageName=$(PACKAGE_NAME); \
	fi; \
	$(MAKE) $(MFLAGS) Makefiles; \
	cd $$newtop; \
	done

includes::  $(foreach dir,$(SUBDIRS),$(dir)/Makefile)

includes::
	@set -e; \
	case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo including "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS)  includes)||exit $$?; \
	done
\

tree::  $(foreach dir,$(SUBDIRS),$(dir)/Makefile)

tree::
	@set -e; \
	case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(SUBDIRS) ;\
	do \
	(cd $$i ; echo Checking Makefiles "in $(CURRENT_DIR)/$$i..."; \
	$(MAKE) $(MFLAGS) VERSION=nil tree)||exit $$?; \
	done

$(foreach dir,$(SUBDIRS),$(dir)/Makefile):
	-@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	case '${MFLAGS}' in -*n*) executeit="no";; esac; \
	i=`dirname $@`; \
	case "$(CURRENT_DIR)" in \
	.) curdir= ;; \
	*) curdir=$(CURRENT_DIR)/ ;; \
	esac; \
	echo "making Makefiles in $$curdir$$i..."; \
	itmp="$$i" \
	curtmp="$(CURRENT_DIR)" \
	toptmp=""; \
	case "$$itmp" in \
	../?*) \
	while echo "$$itmp" | grep '^../' > /dev/null;\
	do \
	toptmp="/`basename $$curtmp`$$toptmp"; \
	curtmp="`dirname $$curtmp`"; \
	itmp="`echo $$itmp | sed 's;../;;'`"; \
	done \
	;; \
	esac; \
	case "$$itmp" in \
	*/?*/?*/?*/?*)	newtop=../../../../..;; \
	*/?*/?*/?*)	newtop=../../../..;; \
	*/?*/?*)	newtop=../../..;; \
	*/?*)		newtop=../..;; \
	*)		newtop=..;; \
	esac; \
	newtop="$$newtop$$toptmp"; \
	case "$(TOP)" in \
	/?*) imaketop=$(TOP) \
	imakeprefix= ;; \
	.) imaketop=$$newtop \
	imakeprefix=$$newtop/ ;; \
	*) imaketop=$$newtop/$(TOP) \
	imakeprefix=$$newtop/ ;; \
	esac; \
	if [ ! -d $$i ]; then \
	mkdirhier $$i; \
	fi; \
	cd $$i; \
	$(RM) Makefile.bak; \
	if [ -f Makefile ]; then \
	true;		\
	else \
	for imakedir in $$newtop $(VPATH); do \
	imakefile=`echo $$imakedir/$$i/Imakefile | \
	sed -e 's://:/:'`; \
	if [ -f $$imakefile ]; then break;fi; \
	done; \
	if [ ! -f $$imakefile ]; then \
	echo "No Imakefile found --> exit"; \
	exit 1; \
	fi; \
	if [ "$$executeit" != "no" ]; then \
	$(IMAKE_CMD) -DTOPDIR=$$imaketop \
	-DCURDIR=$$curdir$$i \
	-DPackageTop=$(PACKAGETOP) \
	-DPackageName=$(PACKAGE_NAME) \
	-f $$imakefile; \
	fi; \
	fi;

# -----------------------------------------------------------------------
# dependencies generated by makedepend