--- rpl/Makefile.am 2013/02/23 12:39:44 1.60 +++ rpl/Makefile.am 2013/02/27 15:06:19 1.61 @@ -219,13 +219,15 @@ $(top_builddir)/tools/@GPP@/src/gpp$(EXE $(MAKE) -C $(top_builddir)/tools/@GPP@ $(AM_MAKEFLAGS) $(top_builddir)/tools/@UNITS@/units$(EXEEXT): - if [ $$subdir = @UNITS@ -a @OS@ = OpenBSD ]; then \ + if [ @OS@ = OpenBSD ]; then \ TMP=tmp.units; \ sed -e 's/^DEFS = -DUNITSFILE/DEFS = -Dmalloc=malloc -DUNITSFILE/g' \ @UNITS@/Makefile > $$TMP; \ mv -f $$TMP @UNITS@/Makefile; \ fi; \ - cp -f $(srcdir)/tools/@UNITS@/units_cur $(top_builddir)/tools/@UNITS@ + if [ x$(srcdir) != x$(top_builddir) ]; then \ + cp -f $(srcdir)/tools/@UNITS@/units_cur $(top_builddir)/tools/@UNITS@; \ + fi $(MAKE) -C $(top_builddir)/tools/@UNITS@ $(AM_MAKEFLAGS) .NOTPARALLEL: $(top_builddir)/tools/@FILE@/src/rplfile$(EXEEXT) \