Fix return code of main and avoid rebase in make sync
This commit is contained in:
55
Makefile
55
Makefile
@@ -6,7 +6,7 @@
|
||||
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2022/01/18 15:11:16 by gbaconni #+# #+# #
|
||||
# Updated: 2022/04/23 21:57:08 by gbaconni ### lausanne.ch #
|
||||
# Updated: 2022/04/24 11:24:37 by gbaconni ### lausanne.ch #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
#
|
||||
@@ -87,20 +87,20 @@ fast:
|
||||
@$(MAKE) -C $(LIBFTPRINTF) re FAST=1
|
||||
|
||||
test: clean $(NAME)
|
||||
@$(PREFIX) ./$(NAME) "%c" C || true
|
||||
@$(PREFIX) ./$(NAME) "%s" "42 Lausanne" || true
|
||||
@$(PREFIX) ./$(NAME) "%d" 42 || true
|
||||
@$(PREFIX) ./$(NAME) "%i" 2147483647 || true
|
||||
@$(PREFIX) ./$(NAME) "%i" -2147483646 || true
|
||||
@$(PREFIX) ./$(NAME) "%u" 4294967295 || true
|
||||
@$(PREFIX) ./$(NAME) "%x" 42 || true
|
||||
@$(PREFIX) ./$(NAME) "%X" 42 || true
|
||||
@$(PREFIX) ./$(NAME) "%%" "" || true
|
||||
@$(PREFIX) ./$(NAME) "%p" "" || true
|
||||
@$(PREFIX) ./$(NAME) "%p" "\n" || true
|
||||
@$(PREFIX) ./$(NAME) "Forty Two" "" || true
|
||||
@$(PREFIX) ./$(NAME) "\t\r\n" "" || true
|
||||
@$(PREFIX) ./$(NAME) "%1d" 42 || true
|
||||
@$(PREFIX) ./$(NAME) "%c" C
|
||||
@$(PREFIX) ./$(NAME) "%s" "42 Lausanne"
|
||||
@$(PREFIX) ./$(NAME) "%d" 42
|
||||
@$(PREFIX) ./$(NAME) "%i" 2147483647
|
||||
@$(PREFIX) ./$(NAME) "%i" -2147483646
|
||||
@$(PREFIX) ./$(NAME) "%u" 4294967295
|
||||
@$(PREFIX) ./$(NAME) "%x" 42
|
||||
@$(PREFIX) ./$(NAME) "%X" 42
|
||||
@$(PREFIX) ./$(NAME) "%%" ""
|
||||
@$(PREFIX) ./$(NAME) "%p" ""
|
||||
@$(PREFIX) ./$(NAME) "%p" "\n"
|
||||
@$(PREFIX) ./$(NAME) "Forty Two" ""
|
||||
@$(PREFIX) ./$(NAME) "\t\r\n" ""
|
||||
@$(PREFIX) ./$(NAME) "%1d" 42
|
||||
|
||||
test2: leak
|
||||
@$(MAKE) test LEAK=1
|
||||
@@ -112,29 +112,36 @@ test4: fast
|
||||
@$(MAKE) test FAST=1
|
||||
|
||||
test42: clean $(NAME)
|
||||
@$(PREFIX) ./$(NAME) "Hello World %% %44s %d %c %x %p" "Lausanne" 42 C 66 "C" || true
|
||||
|
||||
@$(PREFIX) ./$(NAME) "Hello World %% %44s %d %c %x %p" "Lausanne" 42 C 66 "C"
|
||||
@$(PREFIX) ./$(NAME) "Characters: %c %c \n" 'a' 65
|
||||
@$(PREFIX) ./$(NAME) "Decimals: %d %ld\n" 1977 650000L
|
||||
@$(PREFIX) ./$(NAME) "Preceding with blanks: %10d \n" 1977
|
||||
@$(PREFIX) ./$(NAME) "Preceding with zeros: %010d \n" 1977
|
||||
@$(PREFIX) ./$(NAME) "Some different radices: %d %x %o %#x %#o \n" 100 100 100 100 100
|
||||
@$(PREFIX) ./$(NAME) "floats: %4.2f %+.0e %E \n" 3.1416 3.1416 3.1416
|
||||
@$(PREFIX) ./$(NAME) "Width trick: %*d \n" 5 10
|
||||
@$(PREFIX) ./$(NAME) "%s \n" "A string"
|
||||
|
||||
doc:
|
||||
@curl -s -L -z fr.subject.pdf -o fr.subject.pdf $(PDF_FR)
|
||||
@curl -s -L -z en.subject.pdf -o en.subject.pdf $(PDF_EN)
|
||||
|
||||
update: config online fetch
|
||||
update: config online pull
|
||||
|
||||
sync: config online fetch
|
||||
sync: config online pull
|
||||
@git status | grep -q 'nothing to commit' || (git diff; read -p "Comment: " comment; git add -A; git commit -am "$${comment-$$(date '+%F %T')}"; git push)
|
||||
|
||||
online:
|
||||
@dig +short vogsphere.baco.net A | grep -qF '213.5.156.25' || echo 'vogsphere.baco.net unresolvable'
|
||||
@nc -vzw3 vogsphere.baco.net 443 2>&1 | grep -qF 'succeeded' || echo 'vogsphere.baco.net unreachable'
|
||||
@nc -vzw3 vogsphere.baco.net 443 2>&1 | grep -qF '213.5.156.25' || echo 'vogsphere.baco.net unreachable'
|
||||
|
||||
fetch:
|
||||
@git fetch
|
||||
pull:
|
||||
@git pull
|
||||
|
||||
config:
|
||||
@git config user.name "gbaconni"
|
||||
@git config user.email "gbaconni@student.42lausanne.ch"
|
||||
@git config pull.rebase true
|
||||
@git config branch.autosetuprebase always
|
||||
@git config pull.rebase false
|
||||
|
||||
42:
|
||||
@git clone $(GIT_REPO) 42 || true
|
||||
|
||||
Reference in New Issue
Block a user