
include_directories(${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )

add_subdirectory(Tutorial)


########### install files ###############




#original Makefile.am contents follow:

#include $(top_srcdir)/config/Makefile.for.ROSE.includes.and.libs
#include $(top_srcdir)/projects/compass/src/compassSupport/compass_dirs.inc
#
## When debugging latex documentation skip using the --interaction=batchmode option
## PDFLATEX = env TEXINPUTS=$(srcdir):$(top_srcdir)/tests:.: pdflatex --interaction=batchmode
#PDFLATEX = env TEXINPUTS=$(srcdir):$(top_srcdir)/tests:.: pdflatex 
#
## Later we will add ROSETTA documentation here ...
#SUBDIRS = Tutorial 
#
## Macros and code fragements that the Sage source code depends upon
## (this is where most of the documentation goes)
#SOURCE_FOR_SAGE_GENERATED_CODE = \
#     $(top_srcdir)/src/ROSETTA/Grammar/*.code \
#     $(top_srcdir)/src/ROSETTA/Grammar/*.macro
#
## Use Cxx_Grammar.h as a representative for all the generated source code
## that Doxygen will use and make sure that it has been generated before
## we try to generate the doxygen documentation from it.
#SAGE_GENERATED_CODE = $(top_builddir)/src/frontend/SageIII/Cxx_Grammar.h
#
## Name the Sage tag file used by Doxygen
#SAGE_DOXYGEN_TAG_FILE = $(top_builddir)/docs/Rose/SageIntermediateForm/sageDoxygen.tags
#
## Representative files from generated Doxygen documentation
## (This must be a single file to avoid spawning more than one parallel job when using parallel make)
#SageDoxygenDocumentation = $(top_builddir)/docs/Rose/SageIntermediateForm/html/index.html
#
#RoseDoxygenDocumentation = $(top_builddir)/docs/Rose/ROSE_WebPages/ROSE_HTML_Reference/index.html
#
## What the generation of doxygen output for Sage depends upon
#SageDocsDependencies = \
#     sage.cfg \
#     $(SAGE_GENERATED_CODE) \
#     $(top_builddir)/src/frontend/SageIII/sage.docs \
#     $(top_srcdir)/src/frontend/SageIII/sageClasses.docs
#
## What the generation of doxygen output for Rose depends upon
#RoseDocsDependencies = \
#     rose.cfg \
#     $(top_builddir)/rose.docs \
#     $(top_builddir)/src/frontend/SageIII/sage.docs \
#     $(top_srcdir)/src/frontend/Open64/documentation.docs \
#     $(top_srcdir)/src/frontend/SageIII/sage.docs.in \
#     $(top_srcdir)/src/extra.docs \
#     $(top_srcdir)/src/util/commandlineProcessing/commandlineProcessingDocumentation.docs \
#     $(top_srcdir)/src/util/stringSupport/stringSupportDocumentation.docs \
#     $(top_srcdir)/src/util/utilDocumentation.docs \
#     $(top_srcdir)/src/midend/astQuery/QueryLib.docs \
#     $(top_srcdir)/src/midend/astRewriteMechanism/ASTRewrite.docs \
#     $(top_srcdir)/src/midend/astProcessing/AstProcessing.docs \
#     $(top_srcdir)/src/backend/unparser/unparser.docs \
#     $(top_srcdir)/src/3rdPartyLibraries/MSTL/MSTL.docs \
#     $(top_srcdir)/src/roseExtensions/roseHPCToolkit/docs/roseHPCToolkit.docs \
#     $(top_srcdir)/rose.docs.in
#
## If the generated sage source code is older than the code used to
## generate the sage source code then regenerate the sage source code
## by calling make in the ROSE/ROSETTA directory.
#$(SAGE_GENERATED_CODE): $(SOURCE_FOR_SAGE_GENERATED_CODE)
#	cd $(top_builddir)/src/ROSETTA; $(MAKE)
#
## The tag file is generated by Doxygen using the sage-docs rule
## $(SAGE_DOXYGEN_TAG_FILE): sage-docs
#
#SAGE_MAINPAGE_DOCUMENTATION = $(top_builddir)/src/frontend/SageIII/sage.docs
#ROSE_MAINPAGE_DOCUMENTATION = $(top_builddir)/rose.docs
#
## Build rule to update rose.docs in ROSE/src/frontend/SageIII directory
#$(ROSE_MAINPAGE_DOCUMENTATION): $(top_srcdir)/rose.docs.in
#	cd $(top_builddir); $(MAKE) rose.docs
#
## A more complex dependence is defined that requires the sage.tag file
#$(RoseDoxygenDocumentation): $(RoseDocsDependencies) $(ROSE_MAINPAGE_DOCUMENTATION) rose.cfg
#	cd $(top_builddir)/src/frontend/SageIII; $(MAKE) sage.docs
#	doxygen rose.cfg
#
## DQ (7/11/2009): Added rule to force generation of Doxygen documentation.
#doxygen_docs: $(RoseDocsDependencies) $(ROSE_MAINPAGE_DOCUMENTATION) rose.cfg
#	cd $(top_builddir)/src/frontend/SageIII; $(MAKE) sage.docs
#	doxygen rose.cfg
#
## We can't specify the source directory to latex so we have to build
## links to the files in the source directory.  Other ideas?
#latexFiles = preface.tex acknowledgments.tex introduction.tex \
#             designOfRose.tex preprocessorDesign.tex examples.tex \
#             loopTransformDoc.tex mm.tex lu.tex \
#             tridvpk.tex appendix.tex glossary.tex bibliography.tex \
#             rose-processing-phases.pdf testing.tex \
#             writingYourFirstTranslator.tex overviewOfRose.tex \
#             developersAppendix.tex astMerge.tex installRose.tex \
#             binaryAnalysis.tex demo.tex OpenMPsupport.tex UPCsupport.tex
#
## DQ (3/4/2009): Removed requirements.tex since it is not longer used.
## requirements.tex
#
#roseDirectoryMap.pdf: Makefile
#	$(top_srcdir)/scripts/lsdot $(top_srcdir) --format=ps --exclude='CVS\|\.svn\|autom4te.cache\|developersScratchSpace\|testDoxygen\|ckpt\|compass' --basename -o=roseDirectoryMap.ps;
##	convert -geometry 5000 roseDirectoryMap.ps roseDirectoryMap.pdf
#	w=`grep '^%%BoundingBox: [0-9]' roseDirectoryMap.ps | awk '{print $$4*10;}'` ; \
#	h=`grep '^%%BoundingBox: [0-9]' roseDirectoryMap.ps | awk '{print $$5*10;}'` ; \
#	ps2pdf -g$${w}x$${h} roseDirectoryMap.ps roseDirectoryMap.pdf
#
#if USE_ROSE_IN_BUILD_TREE_VAR
#SET_ROSE_IN_BUILD_TREE=env ROSE_IN_BUILD_TREE=$(top_builddir)
#else
#SET_ROSE_IN_BUILD_TREE=
#endif
#
##	Generate output from the --help commandline option for use in documentation
#roseHelpOutput.txt:
#	if (test -x $(top_builddir)/src/testSharedRoseLib); then \
#	  env ROSE_IN_BUILD_TREE=$(top_builddir) $(top_builddir)/src/testSharedRoseLib --help >& roseHelpOutput.txt; \
#	  $(SET_ROSE_IN_BUILD_TREE) $(top_builddir)/src/testSharedRoseLib --help >& roseHelpOutput.txt; \
#	else \
#	  echo "--help option output is not available (build ROSE, then rebuild documentation)." > roseHelpOutput.txt; \
#	fi;
#
##	Generate sample output for inclusion into documentation
#roseCommandline.txt:
#	echo "exampleTranslator roseTestProgram.C" >& roseCommandline.txt;
#
## Generate an example of the output from running a test program
#roseExecutionOutput.txt:
#	if (test -x $(top_builddir)/src/testSharedRoseLib); then \
#	  echo "int main() { int x=0; return x; }" > roseTestProgram.C; \
#	  $(SET_ROSE_IN_BUILD_TREE) $(top_builddir)/src/testSharedRoseLib roseTestProgram.C >& roseExecutionOutput.txt; \
#	else \
#	  echo "Execution output is not available (build ROSE, then rebuild documentation)." > roseExecutionOutput.txt; \
#	fi;
#
#roseConfigureOptions.txt: $(top_srcdir)/configure
#	if test -x $(top_srcdir)/configure; then \
#	   $(top_srcdir)/configure --help >& roseConfigureOptions.txt; \
#	else \
#	   echo "Execution output is not available (build ROSE, then rebuild documentation)." > roseConfigureOptions.txt; \
#	fi
## Build smaller versions of this file (so it fits onto two separate pages)
#	split -80 roseConfigureOptions.txt roseConfigureOptions.
#
#latexDependences = \
#     roseDirectoryMap.pdf \
#     roseHelpOutput.txt \
#     roseCommandline.txt \
#     roseExecutionOutput.txt \
#     roseConfigureOptions.txt \
#     rosePlatformPrerequisites.txt \
#     rosePlatformConfigureOptions.txt
#
#html-local: AvailableDocumentation.docs $(RoseDoxygenDocumentation) $(PACKAGE_NAME)-$(PACKAGE_VERSION)-HTML-Docs.tar.gz
#
#footer.html: footer.html.in
#leftmenu.html: leftmenu.html.in
#AvailableDocumentation.docs: AvailableDocumentation.docs.in
## Liao, 6/11/2008. Added a new directory (Projects) for various ROSE projects 
## compass_build_tooldir=$(top_builddir)/projects/compass/tools
#COMPASS_MANUAL = $(compass_build_tooldir)/compass/doc/compass.pdf
#$(COMPASS_MANUAL):
#	cd $(compass_build_tooldir)/compass/doc && $(MAKE) docs
#
## Liao, 8/6/2009. tutorial for autotuning	
#AUTOTUNING_MANUAL = $(top_builddir)/projects/autoTuning/doc/autoTuning.pdf
#$(AUTOTUNING_MANUAL):
#	cd $(top_builddir)/projects/autoTuning/doc && $(MAKE) docs
#
## Liao, 8/11/2009. QROSE Manual
#QROSE_MANUAL = $(top_srcdir)/src/3rdPartyLibraries/qrose/docs/QROSE.pdf
#
#HASKELLPORT_APIDOCS = $(top_builddir)/projects/haskellport/dist/doc/html/rose
#$(HASKELLPORT_APIDOCS):
#	$(MAKE) -C$(top_builddir)/projects/haskellport docs
#
## DQ (9/15/2009): This appears to be a problem for Mac OSX
#RoseQtDoc:
#if !OS_MACOSX
#	@echo "Skipping doxygen processing of roseQtWidgets.doxygen (failing in OSX)"
##	doxygen roseQtWidgets.doxygen
#endif
#
#make-web-pages: $(RoseDoxygenDocumentation) $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf ROSE_InstallationInstructions.pdf ROSE_DeveloperInstructions.pdf ROSE_DemoGuide.pdf footer.html leftmenu.html $(COMPASS_MANUAL) $(AUTOTUNING_MANUAL) $(HASKELLPORT_APIDOCS) RoseQtDoc
#	cd Tutorial; $(MAKE) make-web-pages
#	mkdir -p ROSE_WebPages
#	mkdir -p ROSE_WebPages/ROSE_HTML_Reference;
#	cp -f $(srcdir)/compass_rose.gif ROSE_WebPages/compass_rose.gif
#	cp -f $(srcdir)/header.html ROSE_WebPages/header.html
#	cp -f leftmenu.html ROSE_WebPages/leftmenu.html
#	cp -f footer.html ROSE_WebPages/footer.html
#	cp -f $(srcdir)/rose.html ROSE_WebPages/rose.html
#	cp -f $(srcdir)/rose.html ROSE_WebPages/index.html
#	cp -f $(srcdir)/projects.html ROSE_WebPages/projects.html
#	cp -f $(srcdir)/documents.html ROSE_WebPages/documents.html
#	cp -f $(srcdir)/news.html ROSE_WebPages/news.html
#	cp -f $(srcdir)/regressionTest.html ROSE_WebPages/regressionTest.html
#	cp -f $(COMPASS_MANUAL) ROSE_WebPages/
#	cp -f $(AUTOTUNING_MANUAL) ROSE_WebPages/
#	cp -f $(QROSE_MANUAL) ROSE_WebPages/
#	mkdir -p ROSE_WebPages/ROSE_HaskellAPI
#	cp -fr $(HASKELLPORT_APIDOCS)/* ROSE_WebPages/ROSE_HaskellAPI/
##	cp -r $(top_srcdir)/ROSE_ResearchPapers ROSE_WebPages/ROSE_ResearchPapers
#	cp -fr $(top_srcdir)/ROSE_ResearchPapers ROSE_WebPages/
#	cp -f ROSE_InstallationInstructions.pdf ROSE_WebPages/ROSE_InstallationInstructions.pdf
#	cp -f ROSE_DeveloperInstructions.pdf ROSE_WebPages/ROSE_DeveloperInstructions.pdf
#	cp -f ROSE_DemoGuide.pdf ROSE_WebPages/ROSE_DemoGuide.pdf
#	mkdir -p ROSE_WebPages/ROSE_UserManual
#	cp -f $(srcdir)/WEB_DOCS_README ROSE_WebPages
#	cp -f $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf ROSE_WebPages/ROSE_UserManual/$(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf
## add a copy without version number as a permanent URL for external reference by 
## https://outreach.scidac.gov/docman/index.php?group_id=24&selected_doc_group_id=29&language_id=1
#	cp -f $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf ROSE_WebPages/ROSE_UserManual/ROSE-UserManual.pdf
#
## Upload web pages to the LBL server 
#copyWebPages: make-web-pages
##	cd ROSE_WebPages; rsync -avz * quinlan1@cmg-1:/green_dev/www/casc/rose
##	Liao, 7/13/2009, must ensure the file permissions here
#	cd ROSE_WebPages; chmod -R a+rx *; rsync -avz * liaoch@web-dev.nersc.gov:/www/host/rosecompiler
##	scp $(PACKAGE_NAME)-$(PACKAGE_VERSION)-HTML-Docs.tar.gz quinlan1@cmg-1.llnl.gov:/green_dev/www/casc/rose
#
#copyWebPagesPanas: make-web-pages
#	cd ROSE_WebPages; rsync -avz * panas2@web-dev.nersc.gov:/www/host/rosecompiler
#
#$(PACKAGE_NAME)-$(PACKAGE_VERSION)-HTML-Docs.tar.gz: make-web-pages
#	tar -zcf $(PACKAGE_NAME)-$(PACKAGE_VERSION)-HTML-Docs.tar.gz ROSE_WebPages
#
## Simpler rule
#latex-docs: pdf
#
## simpler target for building manual only
#manual: $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf
#
#pdf-local: $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf ROSE_InstallationInstructions.pdf ROSE_DeveloperInstructions.pdf ROSE_DemoGuide.pdf 
#
## DQ (9/9/2009): Added generated list of NMI compile farm platform prerequisites for ROSE documentation (ROSE_InstallationInstructions.pdf)
#rosePlatformPrerequisites.txt:
#	cd $(top_srcdir)/scripts/nmiBuildAndTestFarm/build_configs; grep -r PREREQS * | grep -v svn | grep minimal_default | grep -v minimal_default~ | grep -v "#" | sed 's/\/minimal_default:PREREQS=/ : /' >& rosePlatformPrerequisites.txt
#	mv $(top_srcdir)/scripts/nmiBuildAndTestFarm/build_configs/rosePlatformPrerequisites.txt .
#
## DQ (9/29/2009): Added generated list of NMI compile farm platform configure options for ROSE documentation (ROSE_InstallationInstructions.pdf)
#rosePlatformConfigureOptions.txt:
#	cd $(top_srcdir)/scripts/nmiBuildAndTestFarm/build_configs; grep -r CONFIGURE_OPTIONS * | grep -v svn | grep minimal_default | grep -v minimal_default~ | grep -v "#" | sed 's/\/minimal_default:CONFIGURE_OPTIONS=/ : /' >& rosePlatformConfigureOptions.txt
#	mv $(top_srcdir)/scripts/nmiBuildAndTestFarm/build_configs/rosePlatformConfigureOptions.txt .
#
#ROSE_InstallationInstructions.pdf: $(latexFiles) $(latexDependences) ROSE_InstallationInstructions.tex
#	$(PDFLATEX) ROSE_InstallationInstructions.tex && \
#	$(PDFLATEX) ROSE_InstallationInstructions.tex && \
#	$(PDFLATEX) ROSE_InstallationInstructions.tex
#
#ROSE_DeveloperInstructions.pdf: $(latexFiles) $(latexDependences) ROSE_DeveloperInstructions.tex
#	$(PDFLATEX) ROSE_DeveloperInstructions.tex && \
#	$(PDFLATEX) ROSE_DeveloperInstructions.tex && \
#	$(PDFLATEX) ROSE_DeveloperInstructions.tex
#
## DQ (1/18/2009): Added support for demo guide to support running and 
## presenting information from demos of different parts of ROSE.
#ROSE_DemoGuide.pdf: $(latexFiles) $(latexDependences) ROSE_DemoGuide.tex
#	$(PDFLATEX) ROSE_DemoGuide.tex && \
#	$(PDFLATEX) ROSE_DemoGuide.tex && \
#	$(PDFLATEX) ROSE_DemoGuide.tex
#
## DQ (7/25/2004): Need to include manual.tex and reference.tex since they are build from 
## manual.tex.in and reference.tex.in
#$(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf: manual.tex gettingStarted.tex $(latexFiles) $(latexDependences)
#	$(PDFLATEX) manual.tex && \
#	$(PDFLATEX) manual.tex && \
#	$(PDFLATEX) manual.tex && \
#	mv -f manual.pdf $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf
#
##docs: html-docs latex-docs
#docs: latex-docs html-docs 
#
#html-docs: html
#
#EXTRA_DIST = \
#   WEB_DOCS_README AvailableDocumentation.docs.in \
#   sage.cfg.in rose.cfg.in roseQtWidgets.doxygen.in \
#   fixme.sty  acknowledgments.tex bothlevel.c \
#   bibliography.tex  examples.tex fd-docs.tex overviewOfRose.tex pre-docs.tex loopTransformDoc.tex  \
#   mm.tex preprocessorDesign.tex tridvpk.tex writingYourFirstTranslator.tex appendix.tex \
#   developersAppendix.tex designOfRose.tex  FAQ.tex glossary.tex introduction.tex lu.tex \
#   preface.tex rose-processing-phases.pdf compass_rose.gif SageIII.tex QueryLibrary.tex \
#   AstRewrite.tex ProgramAnalysis.tex AstProcessing.tex testing.tex astMerge.tex installRose.tex \
#   roseExecutionOutput.txt roseHelpOutput.txt asm_code_samples_gcc.pdf
#
## DQ (3/4/2009): Removed requirements.tex since it is not longer used.
## requirements.tex
#
#clean-web-pages:
##	DQ (9/15/2009): wrong syntax for chmod, at least on OSX.
##	test ! -d ROSE_WebPages || (test -d ROSE_WebPages && ( chmod +w -R ROSE_WebPages ))
#	test ! -d ROSE_WebPages || (test -d ROSE_WebPages && ( chmod -R +w ROSE_WebPages ))
#	rm -rf ROSE_WebPages
#
#clean-local: clean-web-pages
#
#CLEANFILES = roseDoxygen.tags SageIntermediateForm *.log *.aux *.dvi \
#	     AstProcessing AstRewrite *.gz a.out roseDirectoryMap.ps roseDirectoryMap.pdf \
#	     $(PACKAGE_NAME)-$(PACKAGE_VERSION)-UserManual.pdf ROSE_InstallationInstructions.pdf \
#	     rose.cfg roseCommandline.txt roseConfigureOptions* roseExecutionOutput.txt \
#	     roseHelpOutput.txt rose_roseTestProgram.C roseTestProgram.C sage.cfg \
#	     $(PACKAGE_NAME)-$(PACKAGE_VERSION)-HTML-Docs.tar.gz footer.html \
#	     AvailableDocumentation.docs  leftmenu.html rosePlatformPrerequisites.txt \
#        rosePlatformConfigureOptions.txt
