Explorar el Código

Merged Makefile from report with root level.

Taddeus Kroes hace 14 años
padre
commit
e96d64410a
Se han modificado 5 ficheros con 24 adiciones y 27 borrados
  1. 7 6
      Makefile
  2. 0 10
      report/Makefile
  3. 7 11
      report/report.tex
  4. 9 0
      report/rules.mk
  5. 1 0
      tests/rules.mk

+ 7 - 6
Makefile

@@ -1,22 +1,23 @@
 BUILD=build/
 BUILD=build/
-CLEAN=*.pyc src/*.pyc src/optimize/*.pycrm -f parser.out parsetab.py
+CLEAN=*.pyc src/*.pyc src/optimize/*.pyc parser.out parsetab.py
 
 
 # Fix pdflatex search path
 # Fix pdflatex search path
-TGT_DIR :=
-TGT_DOC :=
+TGT_DIR := report
 
 
 # Default target is 'all'. The 'build' target is defined here so that all
 # Default target is 'all'. The 'build' target is defined here so that all
 # sub rules.mk can add prerequisites to the 'build' target.
 # sub rules.mk can add prerequisites to the 'build' target.
 all:
 all:
 build:
 build:
 
 
-d := tests/
+d := report/
 include base.mk
 include base.mk
 include $(d)/rules.mk
 include $(d)/rules.mk
 
 
-.PHONY: doc
+d := tests/
+include base.mk
+include $(d)/rules.mk
 
 
-all: doc build
+all: report
 
 
 clean:
 clean:
 	rm -rf $(CLEAN)
 	rm -rf $(CLEAN)

+ 0 - 10
report/Makefile

@@ -1,10 +0,0 @@
-RM=rm -rf
-
-all: report.pdf
-
-%.pdf: %.tex
-	pdflatex $^
-	pdflatex $^
-
-clean:
-	$(RM) *.pdf *.aux *.log *.out *.toc *.snm *.nav

+ 7 - 11
report/report.tex

@@ -1,22 +1,17 @@
 \documentclass[10pt,a4paper]{article}
 \documentclass[10pt,a4paper]{article}
 \usepackage[latin1]{inputenc}
 \usepackage[latin1]{inputenc}
-\usepackage{amsmath}
-\usepackage{amsfonts}
-\usepackage{amssymb}
-\usepackage{booktabs}
-\usepackage{graphicx}
-\usepackage{listings}
-\usepackage{subfigure}
-\usepackage{float}
-\usepackage{hyperref}
+\usepackage{amsmath,amsfonts,amssymb,booktabs,graphicx,listings,subfigure}
+\usepackage{float,hyperref}
 
 
 \title{Peephole Optimizer}
 \title{Peephole Optimizer}
 \author{Jayke Meijer (6049885), Richard Torenvliet (6138861), Tadde\"us Kroes
 \author{Jayke Meijer (6049885), Richard Torenvliet (6138861), Tadde\"us Kroes
     (6054129)}
     (6054129)}
 
 
 \begin{document}
 \begin{document}
+
 \maketitle
 \maketitle
 \tableofcontents
 \tableofcontents
+
 \pagebreak
 \pagebreak
 
 
 \section{Introduction}
 \section{Introduction}
@@ -81,7 +76,7 @@ These are optimizations that simply look for a certain statement or pattern of
 statements, and optimize these. For example,
 statements, and optimize these. For example,
 \begin{verbatim}
 \begin{verbatim}
 mov $regA,$regB
 mov $regA,$regB
-instr $regA, $regA,... 
+instr $regA, $regA,...
 \end{verbatim}
 \end{verbatim}
 can be optimized into
 can be optimized into
 \begin{verbatim}
 \begin{verbatim}
@@ -184,7 +179,7 @@ more efficiently by shifting left a number of times. An example:
 optimization for any multiplication with a power of two.
 optimization for any multiplication with a power of two.
 
 
 There are a number of such cases, all of which are once again stated in
 There are a number of such cases, all of which are once again stated in
-appendix \ref{opt}. 
+appendix \ref{opt}.
 
 
 \section{Implementation}
 \section{Implementation}
 
 
@@ -372,4 +367,5 @@ mult $regA, $regB, 0    ->  li   $regA, 0
 
 
 mult $regA, $regB, 2    ->  sll  $regA, $regB, 1
 mult $regA, $regB, 2    ->  sll  $regA, $regB, 1
 \end{verbatim}
 \end{verbatim}
+
 \end{document}
 \end{document}

+ 9 - 0
report/rules.mk

@@ -0,0 +1,9 @@
+CLEAN := $(CLEAN) report/*.pdf report/*.aux report/*.log \
+	report/*.out report/*.toc report/*.snm report/*.nav
+
+report: report/report.pdf
+
+report/%.pdf: report/%.tex
+	cd report; \
+	pdflatex report.tex; \
+	pdflatex report.tex

+ 1 - 0
tests/rules.mk

@@ -1,6 +1,7 @@
 TESTS=$(wildcard tests/test_*.py)
 TESTS=$(wildcard tests/test_*.py)
 COVERAGE_OUTPUT_DIR := coverage
 COVERAGE_OUTPUT_DIR := coverage
 OMIT := /usr/share/pyshared/*,test*,*__init__.py
 OMIT := /usr/share/pyshared/*,test*,*__init__.py
+CLEAN := $(CLEAN) tests/*.pyc
 
 
 ifeq ($(findstring python-coverage,$(wildcard /usr/bin/*)), python-coverage)
 ifeq ($(findstring python-coverage,$(wildcard /usr/bin/*)), python-coverage)
 COVERAGE=/usr/bin/python-coverage
 COVERAGE=/usr/bin/python-coverage