diff --git a/Makefile b/Makefile
index eadd494..387be5b 100755
--- a/Makefile
+++ b/Makefile
@@ -17,9 +17,11 @@
GROUP_NUMBER = 39 # remplacez ceci par votre numéro de groupe #
GROUP = $(GROUP_NUMBER:%=compil%)
-COMPILER_MAIN = zweic.ParserTest
+COMPILER_MAIN = zweic.PrinterTest
EXAMPLES_DIR = $(ROOT)/examples
-TESTS_DIR = $(ROOT)/tests/2
+TESTS_DIR = $(ROOT)/tests/3
+
+TO_ADDRESS = compilation@lampsun1.epfl.ch
# Global
ROOT = .
@@ -44,6 +46,8 @@
SC_FILES += Tree
SC_FILES += Parser
SC_FILES += ParserTest
+SC_FILES += Printer
+SC_FILES += PrinterTest
SC_SOURCES += $(SC_FILES:%=sources/zweic/%.scala)
# Execution Scala
@@ -65,7 +69,9 @@
FIND = find
MKDIR = mkdir
MPACK = /home/iclamp/soft/bin/mpack
+PRINTF = printf
RM = rm -f
+SED = sed
TOUCH = touch
WC = wc
ZIP = zip
@@ -108,6 +114,24 @@
$(GREP_COMMAND) $(GREP_ARGS) $(GREP_FILES); \
fi
+stat :
+ @sorted=`echo $(JC_SOURCES) $(SC_SOURCES) | xargs -n 1 | sort`; \
+ total=0; total1=0; \
+ tmpfile="/tmp/$(USER)_bytes.tmp"; \
+ for file in $$sorted; do \
+ size=0; size1=0; \
+ if [ -f "$$file" ]; then \
+ size=`stat -L -c%s $$file`; \
+ total=`echo "$$total + $$size" | bc`; \
+ $(SED) -es"#^[ \t]*\(.*\)#\1#" $$file > $$tmpfile; \
+ size1=`stat -L -c%s $$tmpfile`; \
+ total1=`echo "$$total1 + $$size1" | bc`; \
+ fi; \
+ $(PRINTF) "%6d %6d %s\n" $$size $$size1 $$file; \
+ done; \
+ $(PRINTF) "%6d %6d\n" $$total $$total1; \
+ $(RM) $$tmpfile
+
fix-permissions : test-group
$(CHGRP) -R $(GROUP) .
$(CHMOD) -R g=u .
@@ -115,13 +139,19 @@
submit : test-group
$(ZIP) $(GROUP).zip $(SOURCES)
- $(MPACK) -s "$(GROUP)" $(GROUP).zip "compilation@lampsun1.epfl.ch"
+ $(MPACK) -s "$(GROUP)" $(GROUP).zip "$(TO_ADDRESS)"
$(RM) $(GROUP).zip
test-group :
@if [ -z "$(GROUP_NUMBER)" ]; then \
$(ECHO) "erreur : votre numero de groupe manque"; \
- $(ECHO) "solution: definissez le dans votre fichier Makefile"; \
+ $(ECHO) "solution: definissez-le dans votre fichier Makefile"; \
+ exit 1; \
+ fi
+ @exist=`groups | grep -c $(GROUP)`; \
+ if [ "$$exist" -lt 1 ]; then \
+ $(ECHO) "erreur : le groupe Unix \"$(GROUP)\" n'existe pas"; \
+ $(ECHO) "solution: verifiez votre numero de groupe"; \
exit 1; \
fi
@@ -145,6 +175,7 @@
.PHONY : distclean
.PHONY : wc
.PHONY : grep
+.PHONY : stat
.PHONY : fix-premissions
.PHONY : submit
.PHONY : test-group
diff --git a/build.properties b/build.properties
index 89292f4..93b7993 100755
--- a/build.properties
+++ b/build.properties
@@ -10,8 +10,10 @@
group=compil${group.number}
# The mail addresses for submitting the project work
-from.address=${group}@${env.HOST}
+from.address=${group}@${env.HOST}.epfl.ch
to.address=compilation@lampsun1.epfl.ch
+mailhost=mail.epfl.ch
+mailport=25
# The installation paths of your Scala distribution
# (if undefined, use value of ${env.SCALA_HOME})
@@ -29,13 +31,13 @@
tests5.dir=${basedir}/tests/5
# Default compiler phase
-compiler.main=zweic.ParserTest
+compiler.main=zweic.PrinterTest
# List of ignored source files
-exclude.files=mechant.zwei
+exclude.files=
# Default test file for task "run"
test.file=Factorial.zwei
# Default test suite for task "tests"
-tests.suite=tests1
+tests.suite=tests3
diff --git a/build.xml b/build.xml
index 0e82b88..84f7b4d 100755
--- a/build.xml
+++ b/build.xml
@@ -97,9 +97,10 @@
includes="**/*.scala"
excludes="**/.gen/**"/>
+ includes="Makefile,build.*"/>
-
+
You'll find attached the solution of group ${group}.
@@ -125,8 +126,4 @@
-
-