Bug 1869

Summary: in tree build of frysk-imports fails
Product: frysk Reporter: Sami Wagiaalla <swagiaal>
Component: generalAssignee: Andrew Cagney <cagney>
Severity: normal    
Priority: P1    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 2235    

Description Sami Wagiaalla 2005-11-15 17:01:55 UTC
The following error message is printed:

  File ./inua/dwarf/DebugAbbrev.java is specified more than once

And from IRC disscusion:

cagney \$(GEN_CLASSDIR)/files: lib${dir}.a
cagney         rm -rf \$(GEN_CLASSDIR)
cagney         mkdir -p \$(GEN_CLASSDIR)
cagney         for d in \$(top_builddir) \$(top_srcdir) ; do \
cagney                 for g in ${dirs} ; do \
cagney                         find \$\$d/\$\$g -name '*.java' -print ; \
cagney                 done ; \
cagney         done > \$@.tmp
cagney         echo TestRunner.java >> \$@.tmp
cagney         mv \$@.tmp \$@
cagney the logic assuming that $(top_builddir) != $(top_srcdir); no a way to
differentiate that?
Comment 1 Andrew Cagney 2005-11-15 17:28:51 UTC
Index: frysk-core/common/ChangeLog
2005-11-15  Andrew Cagney  <cagney@redhat.com>

        * Makefile.gen.sh ($(GEN_CLASSDIR)/files): Filter out duplicate

this is a standard trick:

            p=\`cd \$\$d && pwd\` ; \
            case " \$\$dirs " in \
                *\$\$p* ) continue ;; \
            esac ; \
            dirs="\$\$dirs \$\$p" ; \