update: allow makefile to do a fresh build
This commit is contained in:
parent
4f1a08cbe6
commit
09dbd2de91
3 changed files with 11 additions and 6 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
# By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ #
|
# By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2024/04/28 17:28:30 by maiboyer #+# #+# #
|
# Created: 2024/04/28 17:28:30 by maiboyer #+# #+# #
|
||||||
# Updated: 2024/09/26 18:27:18 by maiboyer ### ########.fr #
|
# Updated: 2024/10/03 21:41:55 by maiboyer ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
|
|
@ -82,6 +82,12 @@ $(NAME): $(LIBS_FILES)
|
||||||
@echo -e '$(GREY) Linking \t$(END)$(GOLD)$(NAME)$(END)'
|
@echo -e '$(GREY) Linking \t$(END)$(GOLD)$(NAME)$(END)'
|
||||||
@$(CC) $(CFLAGS) -o $(NAME) -L$(BUILD_DIR) $(call link_group,$(LIBS_FLAGS))
|
@$(CC) $(CFLAGS) -o $(NAME) -L$(BUILD_DIR) $(call link_group,$(LIBS_FLAGS))
|
||||||
|
|
||||||
|
# REMOVE THIS ONE DAY
|
||||||
|
libast.a: $(BUILD_DIR)/libast.a
|
||||||
|
$(BUILD_DIR)/libast.a:
|
||||||
|
@echo -e '$(GREY) Mocking \t$(END)$(GOLD)libast.a$(END)'
|
||||||
|
@ar rcs $(BUILD_DIR)/libast.a
|
||||||
|
|
||||||
lib$(ANAME).a: $(BUILD_DIR)/lib$(ANAME).a
|
lib$(ANAME).a: $(BUILD_DIR)/lib$(ANAME).a
|
||||||
|
|
||||||
$(BUILD_DIR)/lib$(ANAME).a: $(OBJ)
|
$(BUILD_DIR)/lib$(ANAME).a: $(OBJ)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/14 12:23:53 by maiboyer #+# #+# */
|
/* Created: 2024/09/14 12:23:53 by maiboyer #+# #+# */
|
||||||
/* Updated: 2024/09/16 19:08:04 by maiboyer ### ########.fr */
|
/* Updated: 2024/10/03 21:43:42 by maiboyer ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -53,8 +53,7 @@ t_error run_command(t_ast_command *command, t_state *state, t_cmd_pipe cmd_pipe,
|
||||||
if (command == NULL || state == NULL || out == NULL)
|
if (command == NULL || state == NULL || out == NULL)
|
||||||
return (ERROR);
|
return (ERROR);
|
||||||
hmap_env_clear(state->tmp_var);
|
hmap_env_clear(state->tmp_var);
|
||||||
red.redirections = vec_ast_new(command->suffixes_redirections.len, \
|
red.redirections = vec_ast_new(command->suffixes_redirections.len, NULL);
|
||||||
ast_free);
|
|
||||||
red.cmd_pipe = cmd_pipe;
|
red.cmd_pipe = cmd_pipe;
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < command->prefixes.len)
|
while (i < command->prefixes.len)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/06 16:31:41 by rparodi #+# #+# */
|
/* Created: 2024/09/06 16:31:41 by rparodi #+# #+# */
|
||||||
/* Updated: 2024/10/03 21:09:35 by maiboyer ### ########.fr */
|
/* Updated: 2024/10/03 21:44:22 by maiboyer ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ void exec_shcat(t_state *state)
|
||||||
if (state->ast != NULL && run_program(\
|
if (state->ast != NULL && run_program(\
|
||||||
&state->ast->data.program, state, &prog_res))
|
&state->ast->data.program, state, &prog_res))
|
||||||
printf("Error when execting the Command \n");
|
printf("Error when execting the Command \n");
|
||||||
ast_free(state->ast);
|
// ast_free(state->ast);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ft_take_args(t_state *state)
|
void ft_take_args(t_state *state)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue