Skip to content

Commit

Permalink
configure: rename build dir for thunk_gen [#146]
Browse files Browse the repository at this point in the history
  • Loading branch information
stsp committed Nov 10, 2023
1 parent 4e49cb3 commit 30b498c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ if [ ! -f configure ]; then
mkdir fdpp 2>/dev/null
cd fdpp
echo "srcdir = $SCRIPTPATH/fdpp" >config.mak
mkdir parsers 2>/dev/null
cd parsers
echo "srcdir = $SCRIPTPATH/fdpp/parsers" >config.mak
mkdir thunk_gen 2>/dev/null
cd thunk_gen
echo "srcdir = $SCRIPTPATH/fdpp/thunk_gen" >config.mak
ln -sf "$SCRIPTPATH"/fdpp/thunk_gen/makefile makefile
fi
6 changes: 3 additions & 3 deletions fdpp/configure
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ TOPDIR=`realpath "$SCRIPTPATH/.."`
if [ ! -f configure ]; then
ln -sf "$SCRIPTPATH"/makefile makefile
echo "srcdir = $SCRIPTPATH" >config.mak
mkdir parsers 2>/dev/null
cd parsers
echo "srcdir = $SCRIPTPATH/parsers" >config.mak
mkdir thunk_gen 2>/dev/null
cd thunk_gen
echo "srcdir = $SCRIPTPATH/thunk_gen" >config.mak
ln -sf "$SCRIPTPATH"/thunk_gen/makefile makefile
fi
16 changes: 8 additions & 8 deletions fdpp/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ endif
chmod -x $@

clean:
+cd parsers && $(MAKE) srcdir=$(abspath $(srcdir))/parsers clean
+cd thunk_gen && $(MAKE) srcdir=$(abspath $(srcdir))/thunk_gen clean
-$(RM) .tstamp *.map $(TARGET).elf *.inc \
*.o $(GEN_CC) $(FDPPDEVL) $(FDPPLIB) *.tmp $(GEN_HEADERS) \
$(GEN_HEADERS_FD) $(GEN_ASMS) \
Expand Down Expand Up @@ -227,22 +227,22 @@ plt.inc: thunk_calls.tmp
plt_asmc.h plt_asmp.h: thunk_asms.tmp
$(pars)

thunk_calls.h: thunk_calls.tmp parsers/thunk_gen
parsers/thunk_gen $(TFLAGS) <$< >$@ || ($(RM) $@ ; false)
thunk_calls.h: thunk_calls.tmp thunk_gen/thunk_gen
thunk_gen/thunk_gen $(TFLAGS) <$< >$@ || ($(RM) $@ ; false)

thunk_asms.h: thunk_asms.tmp parsers/thunk_gen $(srcdir)/parsers/thunks.m4
parsers/thunk_gen $(TFLAGS) 1 <$< | sort | uniq | autom4te -l m4sugar $(srcdir)/parsers/thunks.m4 - >$@_ \
thunk_asms.h: thunk_asms.tmp thunk_gen/thunk_gen $(srcdir)/parsers/thunks.m4
thunk_gen/thunk_gen $(TFLAGS) 1 <$< | sort | uniq | autom4te -l m4sugar $(srcdir)/parsers/thunks.m4 - >$@_ \
|| ($(RM) $@_ ; false)
parsers/thunk_gen $(TFLAGS) 2 <$< >$@__ \
thunk_gen/thunk_gen $(TFLAGS) 2 <$< >$@__ \
|| ($(RM) $@__ ; false)
cat $@_ $@__ >$@
rm -f $@_ $@__

glob_asmdefs.h: $(SRC)/glob_asm.h
$(srcdir)/parsers/mkasmdefs.sh $< >$@

parsers/thunk_gen: $(srcdir)/thunk_gen/thunk_gen.y $(srcdir)/thunk_gen/thunk_gen.l
+cd parsers && $(MAKE) srcdir=$(abspath $(srcdir))/thunk_gen
thunk_gen/thunk_gen: $(srcdir)/thunk_gen/thunk_gen.y $(srcdir)/thunk_gen/thunk_gen.l
+cd thunk_gen && $(MAKE) srcdir=$(abspath $(srcdir))/thunk_gen

INSTALL ?= install
install: $(ALL)
Expand Down

0 comments on commit 30b498c

Please sign in to comment.