stoped putting file arount the system
This commit is contained in:
4
Makefile
4
Makefile
@@ -26,10 +26,10 @@ $(LIBFT):
|
|||||||
|
|
||||||
$(OBJDIR)/%.o: $(SRCDIR)/%.c
|
$(OBJDIR)/%.o: $(SRCDIR)/%.c
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
@$(CC) $(WFLAGS) -MMD -MP -I$(INCDIR) -c $< -o $@ $(LINK)
|
@$(CC) $(WFLAGS) -MMD -MP -I$(INCDIR) -D DIO_PATH="\"$(HOME)/ast.xml\"" -c $< -o $@ $(LINK)
|
||||||
|
|
||||||
$(NAME): $(LIBFT) $(OBJS)
|
$(NAME): $(LIBFT) $(OBJS)
|
||||||
@$(CC) $(WFLAGS) $(OBJS) $(LIBFT) -o $(NAME) $(LINK)
|
@$(CC) $(WFLAGS) $(OBJS) $(LIBFT) -D DIO_PATH="\"$(HOME)/ast.xml\"" -o $(NAME) $(LINK)
|
||||||
@echo "$(CYAN)Build completed: $(NAME)$(RESET)"
|
@echo "$(CYAN)Build completed: $(NAME)$(RESET)"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
@@ -13,7 +13,11 @@
|
|||||||
#ifndef MINISHELL_H
|
#ifndef MINISHELL_H
|
||||||
# define MINISHELL_H
|
# define MINISHELL_H
|
||||||
|
|
||||||
# define DEBUG 0
|
# define DEBUG 1
|
||||||
|
|
||||||
|
# ifndef DIO_PATH
|
||||||
|
# define DIO_PATH "ast.xml"
|
||||||
|
# endif
|
||||||
|
|
||||||
typedef struct s_ast_n t_ast_n;
|
typedef struct s_ast_n t_ast_n;
|
||||||
typedef struct s_node t_node;
|
typedef struct s_node t_node;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ t_ast_n *parser(char *input, t_msh *msh)
|
|||||||
create_heredoc(lst);
|
create_heredoc(lst);
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
{
|
{
|
||||||
dio = drawio_init("ast.xml");
|
dio = drawio_init(DIO_PATH);
|
||||||
gen_dio_linked_list(lst, dio);
|
gen_dio_linked_list(lst, dio);
|
||||||
}
|
}
|
||||||
ast = get_ast(msh, lst);
|
ast = get_ast(msh, lst);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ char *get_pwd()
|
|||||||
return (ft_strdup(""));
|
return (ft_strdup(""));
|
||||||
pwd_base = pwd;
|
pwd_base = pwd;
|
||||||
cpy = pwd;
|
cpy = pwd;
|
||||||
if (ft_strncmp(pwd, "/home", 5) == 0)
|
if (ft_strncmp(pwd, "/home/", 6) == 0)
|
||||||
{
|
{
|
||||||
pwd += 6;
|
pwd += 6;
|
||||||
while (pwd && *pwd && (*pwd) != '/')
|
while (pwd && *pwd && (*pwd) != '/')
|
||||||
|
|||||||
Reference in New Issue
Block a user