Issue 26833

Summary: The build somehow uses X11 makedepend
Product: Build Tools Reporter: quetschke
Component: codeAssignee: quetschke
Status: CLOSED FIXED QA Contact: issues@tools <issues>
Severity: Trivial    
Priority: P3 CC: hans-joachim.lankenau, issues, pavel, rodarvus
Version: OOo 1.1.1RC   
Target Milestone: OOo 2.0   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description quetschke 2004-03-22 19:30:15 UTC
The W32-tcsh build somehow picks the wrong makedepend.
Instead of using solver/645/wntmsci8.pro/bin/makedepend.exe
it uses /usr/X11R6/bin/makedepend.exe .

Workaround: rename/remove /usr/X11R6/bin/makedepend.exe.

vq->ause: What do you think, rehash issue? The solver dir comes first
in PATH, and after source winenv.set in a new shell the correct
makedepend is found.
Comment 1 quetschke 2004-03-23 01:08:25 UTC
OK, got it.

The standard /etc/csh.cshrc that comes with the cygwin
installation starts all /etc/profile.d/*.csh scripts, and
the 00XFree86-bin.csh script does:

    setenv PATH "/usr/X11R6/bin:${PATH}"

Adding /usr/X11R6/bin in front of the path in every case
doesn't sound right.

Workaround: Rename/remove /etc/profile.d/00XFree86-bin.csh

I'm not that familiar with tcsh, is it expected to parse
/etc/csh.cshrc in our case?
Comment 2 quetschke 2004-03-25 04:30:15 UTC
> I'm not that familiar with tcsh, is it expected to parse
> /etc/csh.cshrc in our case?
Yes, that's what the manpage says. Not fixable for OOo, change /etc/csh.cshrc.

Closing as WONTFIX.
Comment 3 quetschke 2004-03-25 04:30:33 UTC
close
Comment 4 quetschke 2004-07-13 17:32:27 UTC
OK, how about the following check?

#!/bin/sh
TPATH=`PATH="/nosuchpath:$PATH"; tcsh -c "echo \\\$PATH"`
# Works only with environment variables 
export TPATH
SUBSTPATH=`bash -c 'echo \${TPATH/"\/nosuchpath:*"/\/nosuchpath}`
if [ "$SUBSTPATH" != "/nosuchpath" ]; then
echo Warning csh is prepending to your path, do this on your own risk
  MAKEDEPENDFOUND=`tcsh -c "which makedepend"`
  MAKEDEPENDDIRNAME=`dirname "$MAKEDEPENDFOUND"`
  if [ "$MAKEDEPENDDIRNAME" != "." ]; then  
    echo found makedepend
    if ( echo $SUBSTPATH | grep -q "$MAKEDEPENDDIRNAME" ); then
      echo Error makedepend found in prepended path, see iz..
    fi
  fi
fi

Substitute the "echo Warning" with "AC_MSG_WARN([" and "echo Error" with
"AC_MSG_ERROR([" and eveything is OK.
Comment 5 hjs 2004-07-13 17:43:45 UTC
hmm, why not setting

MAKEDEPEND*=$(WRAPCMD) $(SOLARBINDIR)$/makedepend

in "unitools.mk"?
Comment 6 quetschke 2004-07-13 17:48:03 UTC
Because I had so much shell script fun ;)

No, seriously, your solution is much better!
Comment 7 quetschke 2004-07-13 17:58:29 UTC
... but doesn't work because there is no $(SOLARBINDIR) in winenv.*

I could write

MAKEDEPEND*=$(WRAPCMD) $(SOLARVERSION)$/$(INPATH)$/bin$/makedepend

but would that work for hamburg environment?

P.S.: Why is INPATH called INPATH and not OUTPATH?
Comment 8 hjs 2004-07-13 18:39:38 UTC
there is a set of "SOLAR*DIR" variables defined in "settings.mk".

from the view of the module, INPATH is where it gets its input (includes, libs,
etc) from. OUTPATH (except for the extension) is where results are written to.

historically, OUTPATH + extension may differ from inpath (e.g. to build an
instrumented profiling version of a module).
Comment 9 quetschke 2004-07-13 18:45:39 UTC
No more questioning of the true master! ;)

Sorry, all the shell scrips made me think only of environment variables.
Comment 10 quetschke 2004-07-13 20:25:10 UTC
Committed the

MAKEDEPEND*=$(WRAPCMD) $(SOLARBINDIR)$/makedepend

patch to cws_src680_ooo20040704.
Comment 11 quetschke 2004-10-04 23:34:13 UTC
Works for me in m54
Comment 12 quetschke 2004-10-04 23:37:34 UTC
close
Comment 13 quetschke 2005-01-07 04:24:16 UTC
I meant close!