From c91e9f4f06563421e73f846fee4d55e3acddcd21 Mon Sep 17 00:00:00 2001 From: "ol.sc" Date: Mon, 22 Oct 2012 17:37:10 +0000 Subject: [PATCH] On Cywin with its (too) expensive fork() this change cuts down minimal re-build times from nearly 2 minutes to approx. 6 seconds. Additionally it looks in all directories in the first list for "override" files, not just in one. git-svn-id: svn://svn.cc65.org/cc65/trunk@5865 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/Makefile | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/libsrc/Makefile b/libsrc/Makefile index 700b01497..328b853c5 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -256,18 +256,14 @@ cbm610lib: geos-applelib: for i in geos-apple geos-common; do \ $(MAKE) SYS=geos-apple -C $$i || exit 1; \ + TARGET_OBJS="$$TARGET_OBJS`(cd $$i && printf '%s|' *.o)`"; \ $(AR) a geos-apple.lib $$i/*.o || exit 1; \ - done + done; \ + TARGET_OBJS="$${TARGET_OBJS%?}"; \ for i in runtime common conio em joystick tgi zlib; do \ $(MAKE) SYS=geos-apple -C $$i || exit 1; \ - for objfile in $$i/*.o; do \ - BASENAME=`basename $$objfile`; \ - if [ -f geos-common/$$BASENAME ]; then \ - $(AR) a geos-apple.lib geos-common/$$BASENAME; \ - else \ - $(AR) a geos-apple.lib $$objfile; \ - fi; \ - done \ + SHARED_OBJS=`ls $$i/*.o | grep -vwE "$$TARGET_OBJS"`; \ + $(AR) a geos-apple.lib $$SHARED_OBJS || exit 1; \ done if [ -d geos-apple/extra ]; then \ for i in geos-apple/extra/*.o; do \ @@ -282,18 +278,14 @@ geos-applelib: geos-cbmlib: for i in geos-cbm geos-common; do \ $(MAKE) SYS=geos-cbm -C $$i || exit 1; \ + TARGET_OBJS="$$TARGET_OBJS`(cd $$i && printf '%s|' *.o)`"; \ $(AR) a geos-cbm.lib $$i/*.o || exit 1; \ - done + done; \ + TARGET_OBJS="$${TARGET_OBJS%?}"; \ for i in runtime common conio em joystick tgi zlib; do \ $(MAKE) SYS=geos-cbm -C $$i || exit 1; \ - for objfile in $$i/*.o; do \ - BASENAME=`basename $$objfile`; \ - if [ -f geos-common/$$BASENAME ]; then \ - $(AR) a geos-cbm.lib geos-common/$$BASENAME; \ - else \ - $(AR) a geos-cbm.lib $$objfile; \ - fi; \ - done \ + SHARED_OBJS=`ls $$i/*.o | grep -vwE "$$TARGET_OBJS"`; \ + $(AR) a geos-cbm.lib $$SHARED_OBJS || exit 1; \ done cp geos-cbm/*.emd . cp geos-cbm/*.joy . -- 2.39.5