Implement a patch for jtoty/Libftest because nm -g libft.a on MacOS X return _ft_lstdelone (unlike Linux which returns ft_lstdelone with _ as prefix) so ./grademe.sh -u -ob does not work on MacOS X

This commit is contained in:
gbaconni
2021-10-28 21:49:45 +02:00
parent 1273f529e1
commit 37deef2589
2 changed files with 13 additions and 1 deletions

View File

@@ -6,7 +6,7 @@
# By: gbaconni <gbaconni@42lausanne.ch> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/10/22 09:10:00 by gbaconni #+# #+# #
# Updated: 2021/10/27 10:07:41 by gbaconni ### ########.fr #
# Updated: 2021/10/28 21:45:43 by gbaconni ### lausanne.ch #
# #
# **************************************************************************** #
#
@@ -89,6 +89,7 @@ b: compile _libftTester
@make -C libftTester m || true
_Libftest:
@patch -d Libftest -p1 --dry-run < Libftest.patch >/dev/null 2>&1 && patch -d Libftest -p1 < Libftest.patch || true
@test -f Libftest/my_config.sh || (cd Libftest && ./grademe.sh -u >/dev/null 2>&1) || true
@grep -q '^PATH_LIBFT=\.\./libft' Libftest/my_config.sh || sed -i'.orig' -e 's/^\(PATH_LIBFT\)=.*/\1=..\/libft/' Libftest/my_config.sh || true
@grep -q "'ft_memccpy'" Libftest/srcs/variables/functions/part_1.sh && sed -i'.orig' -e "/'ft_memccpy'/d" Libftest/srcs/variables/functions/part_1.sh || true