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.
This commit is contained in:
Giles Atkinson 2023-11-09 11:57:40 +00:00
parent f6f7319792
commit 10386ee3e3
1 changed files with 4 additions and 4 deletions

View File

@ -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