Propagate all variables between make
This commit is contained in:
24
Makefile
24
Makefile
@@ -6,7 +6,7 @@
|
|||||||
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
|
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2022/01/18 15:11:16 by gbaconni #+# #+# #
|
# Created: 2022/01/18 15:11:16 by gbaconni #+# #+# #
|
||||||
# Updated: 2022/04/26 19:22:10 by gbaconni ### lausanne.ch #
|
# Updated: 2022/04/29 08:10:10 by gbaconni ### lausanne.ch #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
#
|
#
|
||||||
@@ -77,24 +77,26 @@ fclean: clean
|
|||||||
re: fclean all
|
re: fclean all
|
||||||
|
|
||||||
bonus:
|
bonus:
|
||||||
@$(MAKE) all BONUS=1
|
@$(MAKE) -C $(LIBFTPRINTF) bonus DEBUG=$(DEBUG) LEAK=$(LEAKS) FAST=$(FAST)
|
||||||
|
@$(MAKE) fclean all BONUS=1 DEBUG=$(DEBUG) LEAK=$(LEAKS) FAST=$(FAST)
|
||||||
|
|
||||||
rebonus:
|
rebonus:
|
||||||
@$(MAKE) re BONUS=1
|
@$(MAKE) -C $(LIBFTPRINTF) rebonus DEBUG=$(DEBUG) LEAK=$(LEAKS) FAST=$(FAST)
|
||||||
|
@$(MAKE) fclean all BONUS=1 DEBUG=$(DEBUG) LEAK=$(LEAKS) FAST=$(FAST)
|
||||||
|
|
||||||
check:
|
check:
|
||||||
@$(MAKE) -C $(LIBFTPRINTF) check
|
@$(MAKE) -C $(LIBFTPRINTF) check
|
||||||
|
|
||||||
leak:
|
leak:
|
||||||
@$(MAKE) re LEAK=1
|
@$(MAKE) re LEAK=1 BONUS=1 DEBUG=$(DEBUG) FAST=$(FAST)
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
@$(MAKE) re DEBUG=1
|
@$(MAKE) re DEBUG=1 BONUS=1 LEAK=$(LEAKS) FAST=$(FAST)
|
||||||
|
|
||||||
fast:
|
fast:
|
||||||
@$(MAKE) re FAST=1
|
@$(MAKE) re FAST=1 BONUS=1 DEBUG=$(DEBUG) LEAK=$(LEAKS)
|
||||||
|
|
||||||
test: re
|
test: bonus
|
||||||
@$(PREFIX) ./$(NAME) "%c" C
|
@$(PREFIX) ./$(NAME) "%c" C
|
||||||
@$(PREFIX) ./$(NAME) "%s" "42 Lausanne"
|
@$(PREFIX) ./$(NAME) "%s" "42 Lausanne"
|
||||||
@$(PREFIX) ./$(NAME) "%s" ""
|
@$(PREFIX) ./$(NAME) "%s" ""
|
||||||
@@ -113,16 +115,16 @@ test: re
|
|||||||
|
|
||||||
ifeq ($(KERNEL),Linux)
|
ifeq ($(KERNEL),Linux)
|
||||||
test2: leak
|
test2: leak
|
||||||
@$(MAKE) test LEAK=1
|
@$(MAKE) test LEAK=1 DEBUG=$(DEBUG) FAST=$(FAST)
|
||||||
else
|
else
|
||||||
test2: debug
|
test2: debug
|
||||||
@$(MAKE) test DEBUG=1
|
@$(MAKE) test DEBUG=1 LEAK=$(LEAKS) FAST=$(FAST)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test3: fast
|
test3: fast
|
||||||
@$(MAKE) test FAST=1
|
@$(MAKE) test FAST=1
|
||||||
|
|
||||||
test42: re
|
test42: bonus
|
||||||
@$(PREFIX) ./$(NAME) "Hello World %% %44s %d %c %x %p" "Lausanne" 42 C 66 "C"
|
@$(PREFIX) ./$(NAME) "Hello World %% %44s %d %c %x %p" "Lausanne" 42 C 66 "C"
|
||||||
@$(PREFIX) ./$(NAME) "Characters: %c %c \n" 'a' 65
|
@$(PREFIX) ./$(NAME) "Characters: %c %c \n" 'a' 65
|
||||||
@$(PREFIX) ./$(NAME) "Decimals: %d\n" 1977
|
@$(PREFIX) ./$(NAME) "Decimals: %d\n" 1977
|
||||||
@@ -131,7 +133,7 @@ test42: re
|
|||||||
@$(PREFIX) ./$(NAME) "Some different radices: %d %x %#x\n" 100 100 100
|
@$(PREFIX) ./$(NAME) "Some different radices: %d %x %#x\n" 100 100 100
|
||||||
@$(PREFIX) ./$(NAME) "Width trick: %*d \n" 5 10
|
@$(PREFIX) ./$(NAME) "Width trick: %*d \n" 5 10
|
||||||
|
|
||||||
watch:
|
watch: fclean
|
||||||
@read -p "cmd: " cmd; while :; do clear; date "+%F %T (every 2.0s)"; echo; sh -c "$${cmd} 2>&1" | tail -n 10 || 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 10 || true; sleep 2; done
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
|
|||||||
Reference in New Issue
Block a user