This commit is contained in:
Jack Halford 2017-03-25 21:38:28 +01:00
parent 66990a201b
commit 372a665e8b
2 changed files with 19 additions and 5 deletions

View file

@ -6,15 +6,14 @@
# By: wescande <wescande@student.42.fr> +#+ +:+ +#+ # # By: wescande <wescande@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2016/08/29 21:32:58 by wescande #+# #+# # # Created: 2016/08/29 21:32:58 by wescande #+# #+# #
# Updated: 2017/03/25 20:26:47 by jhalford ### ########.fr # # Updated: 2017/03/25 21:38:21 by jhalford ### ########.fr #
# # # #
# **************************************************************************** # # **************************************************************************** #
NAME = 42sh NAME = minishell
CC = gcc CC = gcc
FLAGS = -Wall -Wextra -Werror FLAGS = -Wall -Wextra -Werror
FLAGS = -Wall -Wextra -Werror #-fsanitize=address#-fvisibility=hidden
D_FLAGS = -g D_FLAGS = -g
DELTA = $$(echo "$$(tput cols)-47"|bc) DELTA = $$(echo "$$(tput cols)-47"|bc)
@ -282,7 +281,6 @@ line_editing/resize.c\
main/data_exit.c\ main/data_exit.c\
main/data_init.c\ main/data_init.c\
main/data_singleton.c\ main/data_singleton.c\
main/ft_putast.c\
main/main.c\ main/main.c\
main/shell_init.c\ main/shell_init.c\
main/shell_reset.c\ main/shell_reset.c\
@ -308,7 +306,6 @@ parser/parser_init.c\
parser/pop_stack.c\ parser/pop_stack.c\
parser/produce_sym.c\ parser/produce_sym.c\
parser/push_stack.c\ parser/push_stack.c\
parser/read_stack.c\
parser/redir_init.c\ parser/redir_init.c\
parser/stack_init.c\ parser/stack_init.c\
parser/sym_free.c\ parser/sym_free.c\

17
42sh/update_makefile.sh Executable file
View file

@ -0,0 +1,17 @@
MYPATH=$(pwd)
CUR_MAKEFILE=$MYPATH/Makefile
if [ -e $CUR_MAKEFILE ]
then
echo "regenerate Makefile"
sed "`grep -n 'SRC_BASE =' $CUR_MAKEFILE | sed 's/:.*//'`, \$d" $CUR_MAKEFILE > NEWMAKEFILE
grep 'SRC_BASE =' $CUR_MAKEFILE >> NEWMAKEFILE
expr "$(find ./src | grep "\.c$" | sed -e 's/src\///' -e 's/\.\///' -e 's/$/\\/')" : "\(.*\).$" >> NEWMAKEFILE
echo "" >> NEWMAKEFILE
grep 'SRCS =' $CUR_MAKEFILE >> NEWMAKEFILE
sed "1, `grep -n 'SRCS =' $CUR_MAKEFILE | sed 's/:.*//'`d" $CUR_MAKEFILE >> NEWMAKEFILE
mv $CUR_MAKEFILE ~/Documents/.OLDMakefile
mv NEWMAKEFILE $CUR_MAKEFILE
echo "Makefile done (copy still alive in ~/Documents/.OLDMakefile)"
else
echo "Makefile not found."
fi