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