even more fixes
This commit is contained in:
parent
4b3df88e8a
commit
db4bf470ff
3 changed files with 11 additions and 13 deletions
|
|
@ -21,10 +21,10 @@ $(TARGET): $(OBJS)
|
||||||
$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
|
$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
|
||||||
@echo $(OBJS)
|
@echo $(OBJS)
|
||||||
|
|
||||||
# debug: CFLAGS += $(DBG_CFLAGS)
|
debug: CFLAGS += $(DBG_CFLAGS)
|
||||||
# debug: LDFLAGS += $(DBG_LDFLAGS)
|
debug: LDFLAGS += $(DBG_LDFLAGS)
|
||||||
# debug: $(OBJS)
|
debug: $(OBJS)
|
||||||
# $(CC) -o $(TARGET) $^ $(LDFLAGS) $(LDLIBS)
|
$(CC) -o $(TARGET) $^ $(LDFLAGS) $(LDLIBS)
|
||||||
|
|
||||||
check:
|
check:
|
||||||
dash ./tests/run.sh
|
dash ./tests/run.sh
|
||||||
|
|
|
||||||
|
|
@ -60,9 +60,6 @@ int run_command(char *command)
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
|
||||||
// char *executable;
|
|
||||||
// size_t args_offset = readword(command, strlen(command), &executable);
|
|
||||||
|
|
||||||
int id = fork();
|
int id = fork();
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
{
|
{
|
||||||
|
|
@ -72,14 +69,13 @@ int run_command(char *command)
|
||||||
|
|
||||||
if (id == 0)
|
if (id == 0)
|
||||||
{
|
{
|
||||||
int res = 0;
|
int res = execl("/bin/sh", "(make)", "-c", command, NULL);
|
||||||
wait(&res);
|
exit(res);
|
||||||
// printf("Got return code: %d\n", res);
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int res = execl("/bin/sh", "(make)", "-c", command, NULL);
|
int res = 0;
|
||||||
|
wait(&res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
rule1:
|
rule1:
|
||||||
echo Toto
|
echo Toto
|
||||||
|
echo Tata
|
||||||
|
echo Tutu
|
||||||
|
|
||||||
rule2:
|
rule2:
|
||||||
@echo Toto
|
@echo Toto encore
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue