From 10386ee3e328c83e6c8083b3d20878a416693a23 Mon Sep 17 00:00:00 2001 From: Giles Atkinson <“gatk555@gmail.com”> Date: Thu, 9 Nov 2023 11:57:40 +0000 Subject: [PATCH] Commit [35d338]ngspice partly reverted commit 423f9a9db to fix deletion of source files if make was accidentally used in the source tree. That caused the original bug to return. Fix the problem by deleting the generated source files by name (no such files exist in source. Also make the generated files depend on cmpp, making 'make clean' unnecessary after a chenge to cmpp. --- src/xspice/icm/GNUmakefile.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xspice/icm/GNUmakefile.in b/src/xspice/icm/GNUmakefile.in index 7c01c9b26..e1344da26 100644 --- a/src/xspice/icm/GNUmakefile.in +++ b/src/xspice/icm/GNUmakefile.in @@ -97,12 +97,12 @@ cm-descr := \ # When recursively making clean, cm-objs and cm-gens do not contain # the files generated for individual code models, as cmpp has already gone -# and modlist and udnlist are empty. Those files are explicitly removed. +# and modlist and udnlist are empty. The files are explicitly removed. cm-clean : -rm -f $(cm)/$(cm).cm -rm -f $(cm-descr) $(cm-objs) $(cm-gens) - -rm -f $(cm)/*/*.o $(cm)/*/.deps/* + -rm -f $(cm)/*/ifspec.c $(cm)/*/cfunc.c $(cm)/*/*.o $(cm)/*/.deps/* -rm -f $(cm-deps) cm-distclean : @@ -135,10 +135,10 @@ $(cm-dirs) $(cm-dep-dirs) : %/cmextrn.h %/cminfo.h %/udnextrn.h %/udninfo.h %/objects.inc : $(srcdir)/%/modpath.lst $(srcdir)/%/udnpath.lst CMPP_IDIR=$(srcdir)/$(@D) CMPP_ODIR=$(@D) $(CMPP) -lst -%/ifspec.c : $(srcdir)/%/ifspec.ifs +%/ifspec.c : $(srcdir)/%/ifspec.ifs $(cmpp) CMPP_IDIR=$(srcdir)/$(@D) CMPP_ODIR=$(@D) $(CMPP) -ifs -%/cfunc.c : $(srcdir)/%/cfunc.mod +%/cfunc.c : $(srcdir)/%/cfunc.mod $(cmpp) CMPP_IDIR=$(srcdir)/$(@D) CMPP_ODIR=$(@D) $(CMPP) -mod