|
Files left in src/ after make clean: msg#00035gnu.octave.bugs
On 26-Apr-2005, Rafael Laboissiere <rafael@xxxxxxxxxx> wrote: | Bug report for Octave 2.9.2 configured for i386-pc-linux-gnu | | Description: | ----------- | | While building the Debian package for Octave 2.9.2, I noticed that several | files are left after running make clean. The list is attached to this | message. | | Repeat-By: | --------- | | make clean | ls src/pic # for instance | | Fix: | --- | | Changes in src/Makefile.in (sorry, I do not have time to provide a patch). Please try the following patch. Thanks, jwe src/ChangeLog: 2005-04-26 John W. Eaton <jwe@xxxxxxxxxx> * mkbuiltins (VAR_FILES): Expect $(VAR_FILES) to have .df suffix. * Makefile.in (clean): Also remove $(DLD_PICOBJ). Use mk-oct-links --delete to remove links to .oct files. Remove $(DOC_FILES) not $(DEF_FILES) and $(VAR_FILES). * mk-oct-links (mk-oct-links): Handle --delete option. Rename -p option to be --print. Skip nonexistent .df files. Index: src/Makefile.in =================================================================== RCS file: /cvs/octave/src/Makefile.in,v retrieving revision 1.373 diff -u -r1.373 Makefile.in --- src/Makefile.in 21 Apr 2005 17:52:42 -0000 1.373 +++ src/Makefile.in 26 Apr 2005 19:19:01 -0000 @@ -226,11 +226,11 @@ VAR_4 := $(addprefix $(srcdir)/, $(SOURCES)) VAR_3 := $(notdir $(shell egrep -l $(DEFVAR_PATTERN) $(VAR_4))) -VAR_2 := $(patsubst %.y, %, $(VAR_3)) -VAR_1 := $(patsubst %.l, %, $(VAR_2)) -VAR_FILES := $(patsubst %.cc, %, $(VAR_1)) +VAR_2 := $(patsubst %.y, %.df, $(VAR_3)) +VAR_1 := $(patsubst %.l, %.df, $(VAR_2)) +VAR_FILES := $(patsubst %.cc, %.df, $(VAR_1)) -DOC_FILES := $(sort $(DEF_FILES) $(patsubst %, %.df, $(VAR_FILES))) +DOC_FILES := $(sort $(DEF_FILES) $(VAR_FILES)) OCTAVE_LFLAGS = -L$(TOPDIR)/liboctave -L$(TOPDIR)/libcruft \ -L$(TOPDIR)/src $(RLD_FLAG) @@ -466,10 +466,13 @@ etags $(SOURCES) $(DLD_SRC) clean: + if [ -n "$(OCT_FILES)" ]; then \ + $(srcdir)/mk-oct-links --delete . $(DLD_DEF_FILES); \ + fi 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 $(OBJECTS) $(MAKEDEPS) $(DOC_FILES) $(OCT_FILES) + rm -f $(PICOBJ) $(DLD_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 Index: src/mk-oct-links =================================================================== RCS file: /cvs/octave/src/mk-oct-links,v retrieving revision 1.4 diff -u -r1.4 mk-oct-links --- src/mk-oct-links 16 Jan 2003 20:15:15 -0000 1.4 +++ src/mk-oct-links 26 Apr 2005 19:19:01 -0000 @@ -3,7 +3,7 @@ # Create additional links to .oct files that define more than one # function. -# If the first arg is -p, only print the links we need to make. +# If the first arg is --print, only print the links we need to make. # The first non-option arg is taken as the directory where the .oct # files are installed. The remaining arguments should be the list of @@ -13,32 +13,40 @@ SED=${SED:-'sed'} print_only=false -if [ $1 = "-p" ]; then +delete_links=false +if [ $1 = "--print" -o $1 = "-p" ]; then print_only=true shift +elif [ $1 = "--delete" ]; then + delete_links=true + shift fi links_dir=$1 shift for f in "$@"; do - base=`basename $f | $SED 's/\.df$//'` - fcns=`grep '^ *XDEFUN_DLD_INTERNAL' $f |\ - $SED -e 's/XDEFUN_DLD_INTERNAL *( *//' -e 's/ *,.*$//' |\ - sort -u` - if [ -n "$fcns" ]; then - for n in $fcns; do - if [ "$n" = "$base" ]; then - true - else - if $print_only; then - echo $base.oct $n.oct - else - echo "creating link $n.oct -> $base.oct" - ( cd $links_dir; rm -f $n.oct; ln $base.oct $n.oct ) - fi - fi - done + if [ -f $f ]; then + base=`basename $f | $SED 's/\.df$//'` + fcns=`grep '^ *XDEFUN_DLD_INTERNAL' $f |\ + $SED -e 's/XDEFUN_DLD_INTERNAL *( *//' -e 's/ *,.*$//' |\ + sort -u` + if [ -n "$fcns" ]; then + for n in $fcns; do + if [ "$n" = "$base" ]; then + true + else + if $print_only; then + echo $base.oct $n.oct + elif $delete_links; then + rm -f $links_dir/$n.oct + else + echo "creating link $n.oct -> $base.oct" + ( cd $links_dir; rm -f $n.oct; ln $base.oct $n.oct ) + fi + fi + done + fi fi done Index: src/mkbuiltins =================================================================== RCS file: /cvs/octave/src/mkbuiltins,v retrieving revision 1.19 diff -u -r1.19 mkbuiltins --- src/mkbuiltins 16 Jan 2003 20:15:15 -0000 1.19 +++ src/mkbuiltins 26 Apr 2005 19:19:01 -0000 @@ -80,7 +80,7 @@ done for file in $VAR_FILES; do - f=`echo $file | $SED 's,^\./,,; s/-/_/g'` + f=`echo $file | $SED 's,^\./,,; s/\.df//; s/-/_/g'` echo "extern void symbols_of_${f} (void);" done @@ -92,7 +92,7 @@ EOF for file in $VAR_FILES; do - f=`echo $file | $SED 's,^\./,,; s/-/_/g'` + f=`echo $file | $SED 's,^\./,,; s/\.df//; s/-/_/g'` echo " symbols_of_${f} ();" done ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html ------------------------------------------------------------- |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Files left in src/ after make clean: 00035, Rafael Laboissiere |
|---|---|
| Next by Date: | delaunay: 00035, Kuhn, Jonathan |
| Previous by Thread: | Files left in src/ after make cleani: 00035, Rafael Laboissiere |
| Next by Thread: | delaunay: 00035, Kuhn, Jonathan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |