#--------------------------------------------------------------------
# Configure these Macros for a new cube 
#--------------------------------------------------------------------

# What dimensions exist?
DIMENSIONS="Machine Time Page"

# What is the input log file
#LOG_FILE=logs/access_log
LOG_FILE=logs/joe

# A test query
TEST_QUERY=Australia@countries, 19 January 1997@days, SAMaker total@pages
TEST_QUERY2=World@world, All of Time@months, SAMaker total@cgi-bin scripts

# Parse specification internal commands, for configuring flex to run correctly.
FLEX=flex
GCC="gcc lex.yy.c -L/pack/flex/lib -lfl -o"

#--------------------------------------------------------------------
# Perhaps configure these Macros if you really want to
#--------------------------------------------------------------------

# DBM to use DBM files, set to GDBM or (best of all) BSD if you have
# these on your system.  Set to SMALLDBM for small (dangerous) DBM files.
DATABASE_MODE=SMALLDBM

#--------------------------------------------------------------------
# Probably do not have to configure these Macros
#--------------------------------------------------------------------

# In what directory will the index live.
DATABASE_NAME=dbs

# In what directory will the documents live.
DOCUMENT_DIRECTORY=docs

# Name of the IncompleteDataCube library directory
INCLUDES=lib

# Options for commands
OPTIONS=-verbose -databaseName $(DATABASE_NAME) -databaseMode $(DATABASE_MODE)

#--------------------------------------------------------------------
# END OF CONFIGURATION
#--------------------------------------------------------------------

newCube: cleanCube specs split count

cleanCube: 
	rm -f $(DATABASE_NAME)/*

query:
	perl -I$(INCLUDES) bin/query $(OPTIONS) $(TEST_QUERY)

count:
	perl -I$(INCLUDES) bin/countIt $(OPTIONS) 

specs:
	perl -I$(INCLUDES) bin/parseSpecifications $(OPTIONS) \
              -flex $(FLEX) -gcc $(GCC) -dimensions $(DIMENSIONS)

split:
	perl -I$(INCLUDES) bin/splitter $(OPTIONS) $(LOG_FILE)

protections: 
	chmod g+rwx $(DB)/*
	chgrp cgiperl $(DB)/*

reallyClean: cleanCube
	rm -f parser/* 
