[Pkg-octave-devel] Built files left after make clean
John W. Eaton
jwe@bevo.che.wisc.edu
Fri, 8 Apr 2005 12:59:48 -0400
On 6-Apr-2005, Rafael Laboissiere <rafael@debian.org> wrote:
| This is a minor issue, but I came across it when building the Debian
| packages for Octave. A couple of files are left after "make "clean" and
| I have to delete them by hand (i.e. in debian/rules) when building the
| package:
|
| libcruft/libcruft.so
| libcruft/*/Makefile
| install.octave
| scripts/gethelp
| libcruft/misc/*.d
| scripts/autom4te.cache
| config.log
| Makefrag.f77
| src/PKG_ADD
| src/gplot.cc
|
| (some of those may be 2.9-specific.)
|
| Could the clean targets of the relevant Makefile.in files be changed to
| remove them?
Please try the following patch (for 2.9.x, relative to the current
CVS). I don't have time to make this change for 2.1.x also.
Note that some of the files you mention should not be removed by the
clean target, but are removed by the maintainer-clean or distclean
targets.
If this patch misses some files, please file another report.
Thanks,
jwe
ChangeLog:
2005-04-08 John W. Eaton <jwe@octave.org>
* octMakefile.in (maintainer-clean distclean):
Remove install-octave from the list of files to remove.
(install-octave.in): Delete file.
(DISTFILES): Remove it from the list.
libcruft/ChangeLog:
2005-04-08 John W. Eaton <jwe@octave.org>
* Makefile.in, Makerules.in (clean, distclean, maintainer-clean):
Avoid duplication in rules.
liboctave/ChangeLog:
2005-04-08 John W. Eaton <jwe@octave.org>
* Makefile.in (clean): Use exact filenames instead of *.xxx.
scripts/ChangeLog:
2005-04-08 John W. Eaton <jwe@octave.org>
* Makefile.in (clean, distclean, maintainer-clean):
Avoid duplication in rules.
src/ChangeLog:
2005-04-08 John W. Eaton <jwe@octave.org>
* Makefile.in (clean): Use exact filenames instead of *.xxx.
Also remove PKG_ADD.
(DISTFILES): Add gplot.cc to the list.
(maintainer-clean): Remove gplot.cc here.
Index: octMakefile.in
===================================================================
RCS file: /cvs/octave/octMakefile.in,v
retrieving revision 1.199
diff -u -r1.199 octMakefile.in
--- octMakefile.in 15 Mar 2005 19:13:53 -0000 1.199
+++ octMakefile.in 8 Apr 2005 16:55:32 -0000
@@ -28,7 +28,7 @@
NEWS.[0-9] PROJECTS README README.Linux README.Windows \
README.MachTen README.kpathsea ROADMAP SENDING-PATCHES \
THANKS move-if-change octave-sh octave-bug.in \
- octave-config.in install-octave.in mk-opts.pl mkinstalldirs \
+ octave-config.in mk-opts.pl mkinstalldirs \
mkoctfile.in ChangeLog ChangeLog.[0-9]
# Complete directory trees to distribute.
@@ -136,7 +136,7 @@
maintainer-clean distclean::
rm -f octMakefile Makefile Makeconf Makefrag.f77 Makerules.f77
- rm -f octave-bug octave-config mk-oct-links mkoctfile install-octave
+ rm -f octave-bug octave-config mk-oct-links mkoctfile
rm -f config.cache config.h config.log config.status
rm -rf autom4te.cache
Index: libcruft/Makefile.in
===================================================================
RCS file: /cvs/octave/libcruft/Makefile.in,v
retrieving revision 1.89
diff -u -r1.89 Makefile.in
--- libcruft/Makefile.in 9 Mar 2005 15:22:58 -0000 1.89
+++ libcruft/Makefile.in 8 Apr 2005 16:55:32 -0000
@@ -157,18 +157,15 @@
TAGS:: $(SOURCES)
etags $(SOURCES)
-clean mostlyclean::
- rm -f *.$(LIBEXT) *.o
- if $(SHARED_LIBS); then rm -f *.$(SHLEXT_VER) *.$(SHLEXT); fi
+clean mostlyclean distclean::
+ rm -f libcruft.$(LIBEXT) $(CRUFT_OBJ)
+ rm -f libcruft.$(SHLEXT_VER) libcruft.$(SHLEXT)
-distclean::
- rm -f *.$(LIBEXT) *.o Makefile Makerules so_locations
- if $(SHARED_LIBS); then rm -f *.$(SHLEXT_VER) *.$(SHLEXT); fi
+distclean maintainer-clean::
+ rm -f Makefile Makerules so_locations
maintainer-clean::
- rm -f *.$(LIBEXT) *.o configure Makefile Makerules
- rm -f so_locations tags TAGS
- if $(SHARED_LIBS); then rm -f *.$(SHLEXT_VER) *.$(SHLEXT); fi
+ rm -f tags TAGS
dist:
for dir in $(DISTSUBDIRS); do mkdir ../`cat ../.fname`/libcruft/$$dir; $(MAKE) -C $$dir $@; done
Index: libcruft/Makerules.in
===================================================================
RCS file: /cvs/octave/libcruft/Makerules.in,v
retrieving revision 1.31
diff -u -r1.31 Makerules.in
--- libcruft/Makerules.in 17 Mar 2005 17:25:40 -0000 1.31
+++ libcruft/Makerules.in 8 Apr 2005 16:55:32 -0000
@@ -76,30 +76,17 @@
TAGS: $(SOURCES)
etags $(SOURCES)
-clean::
- rm -f *.d *.a *.o pic/*.o
+clean mostlyclean distclean maintainer-clean::
+ rm -f $(MAKEDEPS) $(CRUFT_OBJ) $(CRUFT_PICOBJ)
-rmdir pic
rm -f stmp-pic
-.PHONY: clean
+.PHONY: clean mostlyclean
-mostlyclean::
- rm -f *.d *.o pic/*.o
- -rmdir pic
- rm -f stmp-pic
-.PHONY: mostlyclean
-
-distclean::
- rm -f *.d *.a *.o pic/*.o
- -rmdir pic
- rm -f stmp-pic
+distclean maintainer-clean::
rm -f Makefile
.PHONY: distclean
maintainer-clean::
- rm -f *.d *.a *.o pic/*.o
- -rmdir pic
- rm -f stmp-pic
- rm -f Makefile
rm -f tags TAGS
.PHONY: maintainer-clean
Index: liboctave/Makefile.in
===================================================================
RCS file: /cvs/octave/liboctave/Makefile.in,v
retrieving revision 1.201
diff -u -r1.201 Makefile.in
--- liboctave/Makefile.in 6 Apr 2005 19:20:22 -0000 1.201
+++ liboctave/Makefile.in 8 Apr 2005 16:55:33 -0000
@@ -305,10 +305,9 @@
etags $(SOURCES)
clean:
- rm -f *.$(LIBEXT) *.o *.d pic/*.o
+ rm -f liboctave.$(LIBEXT) liboctave.$(SHLEXT_VER) liboctave.$(SHLEXT)
+ rm -f $(OBJECTS) $(MAKEDEPS) $(LIBOCTAVE_PICOBJ) stmp-pic
-rmdir pic
- rm -f stmp-pic
- if $(SHARED_LIBS); then rm -f *.$(SHLEXT_VER) *.$(SHLEXT); fi
.PHONY: clean
mostlyclean: clean
Index: scripts/Makefile.in
===================================================================
RCS file: /cvs/octave/scripts/Makefile.in,v
retrieving revision 1.63
diff -u -r1.63 Makefile.in
--- scripts/Makefile.in 22 Mar 2005 16:16:30 -0000 1.63
+++ scripts/Makefile.in 8 Apr 2005 16:55:34 -0000
@@ -74,19 +74,14 @@
TAGS:: $(SOURCES)
etags $(SOURCES)
-clean::
+clean distclean maintainer-clean::
rm -f gethelp$(BUILD_EXEEXT)
-distclean::
- rm -f gethelp$(BUILD_EXEEXT)
+distclean maintainer-clean::
rm -f Makefile config.log config.status DOCSTRINGS
- -rm -rf autom4te.cache
maintainer-clean::
- rm -f gethelp$(BUILD_EXEEXT)
- rm -f Makefile config.log config.status DOCSTRINGS
rm -f tags TAGS configure
- -rm -rf autom4te.cache
dist:
ln $(DISTFILES) ../`cat ../.fname`/scripts
Index: src/Makefile.in
===================================================================
RCS file: /cvs/octave/src/Makefile.in,v
retrieving revision 1.369
diff -u -r1.369 Makefile.in
--- src/Makefile.in 6 Apr 2005 19:20:09 -0000 1.369
+++ src/Makefile.in 8 Apr 2005 16:55:37 -0000
@@ -249,7 +249,7 @@
DISTFILES = Makefile.in ChangeLog mkdefs mkops mkgendoc \
DOCSTRINGS mkbuiltins mk-oct-links \
defaults.h.in oct-conf.h.in octave.gperf oct-gperf.h \
- octave.cc parse.cc lex.cc y.tab.h \
+ octave.cc parse.cc lex.cc y.tab.h gplot.cc \
$(INCLUDES) $(DIST_SRC) $(OPT_HANDLERS) $(EXTRAS)
all: octave$(EXEEXT) stamp-oct-links PKG_ADD DOCSTRINGS
@@ -466,10 +466,13 @@
etags $(SOURCES) $(DLD_SRC)
clean:
- rm -f *.$(LIBEXT) *.o *.d *.df *.oct pic/*.o stmp-pic gendoc$(EXEEXT)
+ rm -f liboctinterp.$(LIBEXT)
+ rm -f liboctinterp.$(SHLEXT_VER) liboctinterp.$(SHLEXT)
+ rm -f $(OBJECTS) $(MAKEDEPS) $(DEF_FILES) $(VAR_FILES) $(OCT_FILES)
+ rm -f $(PICOBJ) stmp-pic gendoc$(EXEEXT)
rm -f builtins.cc ops.cc defaults.h oct-conf.h def-files var-files
+ rm -f PKG_ADD
-rmdir pic
- if $(SHARED_LIBS); then rm -f *.$(SHLEXT_VER) *.$(SHLEXT); fi
.PHONY: clean
mostlyclean: clean
@@ -483,7 +486,7 @@
maintainer-clean: distclean
rm -f tags TAGS y.tab.c y.tab.h y.output yy.lex.c lex.cc parse.cc
- rm -f oct-gperf.h $(OPT_HANDLERS)
+ rm -f oct-gperf.h gplot.cc $(OPT_HANDLERS)
.PHONY: maintainer-clean
dist: parse.cc lex.cc oct-gperf.h