Commits

Antoine Pietri committed 6ac9bb5

added new make rules

Comments (0)

Files changed (2)

 *.byte
 *.native
 *.swp
+*.tar.bz2
+blaise
 NAME := blaise
+FILES := AUTHORS ast.mli blaise.ml eval.ml lexer.ml Makefile parser.ml\
+	prettyprint.ml
 
-all:
-	ocamlbuild -Is . ${NAME}.native
+RENDU := pietri_a-mpoc2012
+TARBALL := ${RENDU}.tar.bz2
+
+HTTP_USER := pietri_a
+GROUPE := b2
+WGET := curl -u ${HTTP_USER}\
+	-H "Content-Type: multipart/form-data"\
+	-F "userfile=@${TARBALL};filename=${TARBALL};type=application/x-bzip"\
+	-F "GROUPE=${GROUPE}" -F "MAX_FILE_SIZE=2097152" -F "UPLOADED=DONE"
+URL := http://rendu.infoprepa.epita.fr/EPITA2016/index.php?TP=20130107
+
+all: ${FILES}
+	ocamlbuild ${NAME}.native
+	cp ${NAME}.native blaise
+	${MAKE} clean
+
+blaise: all
+
+rendu: ${FILES}
+	mkdir ${RENDU}
+	for f in ${FILES}; do cp $$f ${RENDU}; done
+	tar -cvjf ${TARBALL} ${RENDU}
+	rm -rf ${RENDU}
+
+rendu_upload: rendu
+	file ${TARBALL}
+	${WGET} ${URL}
 
 clean:
 	ocamlbuild -clean
+	rm -rf ${RENDU} ${TARBALL} ${NAME}