Skip to content

Commit

Permalink
remove confusing dependency; run "make" before "make test"
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed May 18, 2012
1 parent 7fdc423 commit 332565e
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions test/Makefile
Expand Up @@ -57,21 +57,16 @@ else
CFLAGS = -O3
endif
ALL_CFLAGS = -Wall -Werror-implicit-function-declaration $(CFLAGS)
ifeq ($(OS),Windows_NT)
MAKE_FLAGS = CC=$(CC) LL=$(LL) ALL_CFLAGS="$(ALL_CFLAGS)"
else
MAKE_FLAGS = CC='$(CC)' LL='$(LL)' ALL_CFLAGS='$(ALL_CFLAGS)'
endif

##############################
# generic build targets, rules

.PHONY : test
all : $(LIBR) $(EXE)
all : $(EXE)
./$(EXE)

# executable constructed using linker from object files
$(EXE) : $(LIBR) $(OBJS)
$(EXE) : $(OBJS)
$(LL) -o $@ $(CFLAGS) $(OBJS) $(LIBR) $(LIBS)

-include $(OBJS:.o=.d)
Expand All @@ -80,17 +75,10 @@ $(EXE) : $(LIBR) $(OBJS)
$(OBJS) : %.o : %.c
$(CC) $(ALL_CFLAGS) -MMD $(INCLUDES) -c $< -o $@

# C library compile
$(LIBR) :
@$(MAKE) -C $(BASEDIR) $(MAKE_FLAGS)

# Compile C source from merged mruby source
$(CLIB) : $(RLIB) $(MRBC) $(INIT)
$(MRBC) -Bmrbtest_irep -o$(DLIB) $(RLIB); cat $(INIT) $(DLIB) > $@

$(MRBC) : ../src/opcode.h ../src/codegen.c ../src/parse.y
$(MAKE) -C ../tools/mrbc $(MAKE_FLAGS)

# merge mruby sources
$(RLIB) : $(ASSLIB) $(MRBS)
cat $? > $@
Expand Down

4 comments on commit 332565e

@pbosetti
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better now.
Still, I have to make clean; make; make test every time I edit the test suite.

@matz
Copy link
Member Author

@matz matz commented on 332565e May 18, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you describe your problem?

@matz
Copy link
Member Author

@matz matz commented on 332565e May 18, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated test/Makefile in 53f74d5. Could you see if it works for you?

@pbosetti
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late. Yes, this perfectly fixed it, thx!

Please sign in to comment.