support slides in archive

This commit is contained in:
Mylloon 2023-04-07 16:40:06 +02:00
parent fcff1bf7ea
commit ff6f6be2b2
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -3,14 +3,18 @@ CXXFLAGS = -std=c++11
RM = rm -rf
RAPPORT_DIR = Rapport
SLIDES_DIR = Rapport/presentation
EXCLUSIONS = README.* $(RAPPORT_DIR)
$(foreach i, $(EXCLUSIONS), $(eval TAR_EXCLUDE = $(TAR_EXCLUDE) --exclude="$(i)"))
NAME = TP2 - Groupe 4
TAR = tar -czf
RAPPORT = $(RAPPORT_DIR)/rapport.pdf
RAPPORT = $(RAPPORT_DIR)/*.pdf
SLIDES = $(SLIDES_DIR)/*.pdf
CP = rsync -r $(TAR_EXCLUDE)
MV = mv
MKDIR = mkdir -p
TMP_DIR = temp
SOURCES_RAND = $(filter-out src/mcts_player.cpp, $(wildcard src/*.cpp))
OBJETS_RAND = $(patsubst %.cpp,%.cpp.o,$(notdir $(SOURCES_RAND)))
@ -47,17 +51,19 @@ compilation_mcts: $(OBJETS_MCTS)
tgz:
$(MAKE) clean
$(CP) * temp
mkdir temp/$(RAPPORT_DIR)
$(CP) * $(TMP_DIR)
$(MKDIR) $(TMP_DIR)/$(SLIDES_DIR)
$(CP) $(RAPPORT) temp/$(RAPPORT_DIR)
cd temp && \
$(CP) $(SLIDES) $(TMP_DIR)/$(SLIDES_DIR)
cd $(TMP_DIR) && \
$(TAR) "$(NAME).tar.gz" * && \
$(MV) "$(NAME).tar.gz" ..
$(RM) -r temp/
$(RM) -r $(TMP_DIR)/
clean:
$(RM) $(OBJETS_RAND) $(EXE_RAND) $(OBJETS_MCTS) $(EXE_MCTS)
$(RM) *.tar.gz
$(RM) $(TMP_DIR)
stats:
./mk_stats.sh