This repository has been archived on 2023-04-18. You can view files and clone it, but cannot push or open issues or pull requests.
iaj/TP1/Makefile

36 lines
857 B
Makefile
Raw Permalink Normal View History

2023-02-22 11:50:06 +01:00
NAME = TP1 - Groupe 4
CPP_NAME = C++
PROLOG_NAME = Prolog
2023-03-19 23:18:56 +01:00
EXCLUSIONS = *AidesCPP *.md
$(foreach i, $(EXCLUSIONS), $(eval TAR_EXCLUDE = $(TAR_EXCLUDE) --exclude="$(i)"))
TAR = tar $(TAR_EXCLUDE) -czf
2023-02-28 17:40:51 +01:00
CP = cp -r
RM = rm -r
2023-02-22 11:50:06 +01:00
RAPPORT = Rapport/rapport.pdf
CPP = C-Cpp/
2023-02-28 17:40:51 +01:00
TESTS = Screens-*
PROLOG = Prolog/
2023-02-22 11:50:06 +01:00
tgz-all:
2023-02-28 17:40:51 +01:00
echo $(CPP) $(PROLOG) | xargs -n 1 $(CP) $(TESTS)
2023-02-28 17:48:11 +01:00
-$(MAKE) -C $(CPP) clean 2> /dev/null
2023-02-22 11:50:06 +01:00
$(TAR) "$(NAME).tar.gz" $(RAPPORT) $(CPP) $(PROLOG)
2023-02-28 17:40:51 +01:00
$(RM) $(CPP)$(TESTS) $(PROLOG)$(TESTS)
2023-02-22 11:50:06 +01:00
tgz-cpp:
2023-02-28 17:40:51 +01:00
$(CP) $(TESTS) $(CPP)
2023-02-28 17:48:11 +01:00
-$(MAKE) -C $(CPP) clean 2> /dev/null
2023-02-22 11:50:06 +01:00
$(TAR) "$(NAME) - $(CPP_NAME).tar.gz" $(RAPPORT) $(CPP)
2023-02-28 17:40:51 +01:00
$(RM) $(CPP)$(TESTS)
2023-02-22 11:50:06 +01:00
tgz-prolog:
2023-02-28 17:40:51 +01:00
$(CP) $(TESTS) $(PROLOG)
2023-02-22 11:50:06 +01:00
$(TAR) "$(NAME) - $(PROLOG_NAME).tar.gz" $(RAPPORT) $(PROLOG)
2023-02-28 17:40:51 +01:00
$(RM) $(PROLOG)$(TESTS)
2023-02-22 11:50:06 +01:00
clean:
$(RM) *.tar.gz