better makefile
This commit is contained in:
parent
81b6126f23
commit
eb172ae621
1 changed files with 13 additions and 3 deletions
16
TP1/Makefile
16
TP1/Makefile
|
@ -2,21 +2,31 @@ NAME = TP1 - Groupe 4
|
||||||
CPP_NAME = C++
|
CPP_NAME = C++
|
||||||
PROLOG_NAME = Prolog
|
PROLOG_NAME = Prolog
|
||||||
|
|
||||||
TAR = tar czf
|
TAR = tar --exclude="*AidesCPP" --exclude="*TODO.md" -czf
|
||||||
RM = rm
|
CP = cp -r
|
||||||
|
RM = rm -r
|
||||||
|
|
||||||
RAPPORT = Rapport/rapport.pdf
|
RAPPORT = Rapport/rapport.pdf
|
||||||
CPP = C-Cpp/
|
CPP = C-Cpp/
|
||||||
PROLOG = Prolog/*.pl
|
TESTS = Screens-*
|
||||||
|
PROLOG = Prolog/
|
||||||
|
|
||||||
tgz-all:
|
tgz-all:
|
||||||
|
echo $(CPP) $(PROLOG) | xargs -n 1 $(CP) $(TESTS)
|
||||||
|
-make -C $(CPP) clean 2> /dev/null
|
||||||
$(TAR) "$(NAME).tar.gz" $(RAPPORT) $(CPP) $(PROLOG)
|
$(TAR) "$(NAME).tar.gz" $(RAPPORT) $(CPP) $(PROLOG)
|
||||||
|
$(RM) $(CPP)$(TESTS) $(PROLOG)$(TESTS)
|
||||||
|
|
||||||
tgz-cpp:
|
tgz-cpp:
|
||||||
|
$(CP) $(TESTS) $(CPP)
|
||||||
|
-make -C $(CPP) clean 2> /dev/null
|
||||||
$(TAR) "$(NAME) - $(CPP_NAME).tar.gz" $(RAPPORT) $(CPP)
|
$(TAR) "$(NAME) - $(CPP_NAME).tar.gz" $(RAPPORT) $(CPP)
|
||||||
|
$(RM) $(CPP)$(TESTS)
|
||||||
|
|
||||||
tgz-prolog:
|
tgz-prolog:
|
||||||
|
$(CP) $(TESTS) $(PROLOG)
|
||||||
$(TAR) "$(NAME) - $(PROLOG_NAME).tar.gz" $(RAPPORT) $(PROLOG)
|
$(TAR) "$(NAME) - $(PROLOG_NAME).tar.gz" $(RAPPORT) $(PROLOG)
|
||||||
|
$(RM) $(PROLOG)$(TESTS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) *.tar.gz
|
$(RM) *.tar.gz
|
||||||
|
|
Reference in a new issue