On 20 Sep 2012, at 17:18, Reinier Olislagers wrote:

> Would looking into the actual fpmake bug make sense (i.e. is it doable
> for mere mortals like me?) Where would I look?

It's probably related to how the makefiles clean the packages since fpmake was 
introduced. Pierre posted a not really clean workaround recently to the core 
list, see below (I don't think the patch will apply as is though, because the 
formatting was changed by the mail client).


Jonas

***

E:\pas\trunk\fpcsrc\packages>svn diff Makefile.fpc
Index: Makefile.fpc
===================================================================
--- Makefile.fpc        (revision 22381)
+++ Makefile.fpc        (working copy)
@@ -13,11 +13,11 @@
fpcdir=..

[prerules]
-# Translate INSTALL_UNITDIR to fpmake's --unitinstalldir parameter
+# Translate INSTALL_UNITDIR to fpmake's --unitinstalldir parameter
ifdef INSTALL_UNITDIR
FPMAKE_INSTALL_OPT+=--unitinstalldir=$(INSTALL_UNITDIR)
endif
-# Translate OS_TARGET and CPU_TARGET to fpmake's --os and --cpu parameters
+# Translate OS_TARGET and CPU_TARGET to fpmake's --os and --cpu parameters
ifdef OS_TARGET
FPC_TARGETOPT+=--os=$(OS_TARGET)
endif
@@ -63,7 +63,7 @@
fpmake: fpmake.pp fpmkunit_bootstrap
       $(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix
-Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT)
all:   fpmake
-       $(LOCALFPMAKE) compile $(FPMAKE_OPT)
+       $(LOCALFPMAKE) compile $(FPMAKE_OPT)
smart: fpmake
       $(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
release:       fpmake
@@ -79,17 +79,29 @@
clean:
       $(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
endif
+
+
+ifeq ($(TARGET_DIRS),)
+TARGET_DIRS=$(subst /Makefile, ,$(wildcard */Makefile))
+endif
+
+%_distclean:
+       $(ECHO) calling distclean in $*
+       $(MAKE) -C $* distclean
+
# In case of a distclean, perform an 'old'-style distclean. This to avoid
problems
# when the package is compiled using fpcmake prior to running this clean
using fpmake
# It does not work well, though, since the sub-directories are not cleaned
at all.
ifeq ($(FPMAKE_BIN_CLEAN),)
-distclean:     $(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+distclean: fpc_cleanall  $(addsuffix _distclean,$(TARGET_DIRS))
+       @$(ECHO) Subdirs are $(TARGET_DIRS)
+
else
distclean:
ifdef inUnix
-        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ];
then { echo Something wrong with fpmake exect
able. Remove the executable and call make recursively to recover.; $(DEL)
$(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; };
fi;  }
+       { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ];
then { echo Something wrong with fpmake execta
ble. Remove the executable and call make recursively to recover.; $(DEL)
$(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; f
i;  }
else
-        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+       $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
endif
       -$(DEL) $(LOCALFPMAKE)
endif
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to