Propagate make variables to sub make

This commit is contained in:
gbaconni
2022-04-26 19:23:00 +02:00
parent d9fc240b0e
commit 95130a420a
3 changed files with 20 additions and 19 deletions

View File

@@ -6,7 +6,7 @@
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/01/18 15:11:16 by gbaconni #+# #+# #
# Updated: 2022/04/26 17:38:06 by gbaconni ### ########.fr #
# Updated: 2022/04/26 19:15:34 by gbaconni ### lausanne.ch #
# #
# **************************************************************************** #
#
@@ -65,13 +65,11 @@ endif
ifeq ($(DEBUG), 1)
CFLAGS += -g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=signed-integer-overflow
endif
ifeq ($(LEAK), 1)
CFLAGS += -g -O0
endif
VALGRIND = valgrind
VALGRINDFLAGS = --quiet --leak-check=full --show-leak-kinds=all
ifeq ($(LEAK), 1)
CFLAGS += -g -O0
PREFIX += $(VALGRIND) $(VALGRINDFLAGS)
endif
@@ -145,7 +143,7 @@ ft:
@nm $(NAME) | grep T | grep -o 'ft_.*' | sort -u
watch:
@read -p "cmd: " cmd; while :; do clear; date "+%F %T"; echo; $${cmd} 2>&1 | tail -n 20 || true; sleep 2; done
@read -p "cmd: " cmd; while :; do clear; date "+%F %T (every 2.0s)"; echo; sh -c "$${cmd} 2>&1" | tail -n 20 || true; sleep 2; done
update: sync

View File

@@ -6,7 +6,7 @@
/* By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/20 11:56:37 by gbaconni #+# #+# */
/* Updated: 2022/04/26 17:43:42 by gbaconni ### ########.fr */
/* Updated: 2022/04/26 18:41:30 by gbaconni ### lausanne.ch */
/* */
/* ************************************************************************** */
@@ -27,11 +27,12 @@ int ft_vprintf_string(const char *format, va_list ap)
}
const char *f;
int flags;
int precision;
int len;
int flags;
precision = 0;
flags = 0;
flags = ft_vprintf_flags_bonus(format, ap);
(void) flags;
f = format;
while (*f != '\0')
{