Issue 29609 - "if exist .." used for non 4NT builds
Summary: "if exist .." used for non 4NT builds
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: solenv (show other issues)
Version: OOo 1.1.2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: hjs
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-27 17:05 UTC by quetschke
Modified: 2013-08-07 15:34 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Patch for solenv/inc (16.73 KB, patch)
2004-06-02 01:36 UTC, quetschke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description quetschke 2004-05-27 17:05:49 UTC
The DOS/4NT check "if exist ..." is used also for tcsh (cygwin) builds in some
places in solenv.
Comment 1 quetschke 2004-05-27 21:34:58 UTC
Oops, this was supposed to be a reminder issue for me. I take it!

Target 2.0 is good enough, nobody complained for 1.1.x.
Comment 2 quetschke 2004-05-28 20:55:17 UTC
I was just thinking about defining the following:

.IF "$(USE_SHELL)"=="4nt"
IFEXIST:=if exist
THEN:=
.ELSE
IFEXIST:=if ( -e
THEN:=)
.ENDIF

and add /Q to RMFLAGS in wnt/macros.mk

And then replacing the remaining

if exist $@ $(RM) /q $@ >& $(NULLDEF)

with

$(IFEXIST) $@ $(THEN) $(RM) >& $(NULLDEF)

vq->ause: What is the best place to put the $(IFEXIST)/$(THEN) definition?
unitools.mk?
Comment 3 hjs 2004-06-01 10:50:15 UTC
haven't seen this issue before. nice idea!

yes, "unitools.mk" is fine.
Comment 4 quetschke 2004-06-02 01:36:34 UTC
Created attachment 15627 [details]
Patch for solenv/inc
Comment 5 quetschke 2004-06-02 01:43:08 UTC
The previous patch exchanges all "if exist" constructs with $(IFEXIST)/$(THEN).
I didn't include the autogenerated _tg_* files and the issue also includes
some bits from issue 29607, but there would be a conflict anyway.

The patch is generated against ooo_20040509.

vq-hjs: Please check and approve. There are still other 4nt issues, e.g.
for/type/dir, but that can be fixed in a followup patch.
Comment 6 quetschke 2004-06-04 18:44:48 UTC
> vq-hjs: Please check and approve. There are still other 4nt issues, e.g.
> for/type/dir, but that can be fixed in a followup patch.
Just assign back to me, when you approve/agree, I'll commit an adjusted patch
to ooo20040620.
Comment 7 hjs 2004-06-07 17:05:51 UTC
patch looks fine! 
Comment 8 hjs 2004-06-09 16:59:48 UTC
didn't reassign...
Comment 9 stx123 2005-01-21 10:49:14 UTC
Hi Volker, as Martin pointed out on the releases list we are coming
closer to 2.0 Beta.
http://www.openoffice.org/servlets/ReadMsg?list=releases&msgNo=8258

Is your work making progress and would be ready for 2.0
as the target milestone indicates?

Thanks, Stefan
Comment 10 quetschke 2005-01-21 13:16:50 UTC
Later ...
Comment 11 quetschke 2005-02-20 18:21:33 UTC
Committed to vq12
Comment 12 quetschke 2005-02-20 18:26:01 UTC
vq->ause: Please verify.

I guess this patch touches some parts of the build system that are not used
for OOo files, because "type" and "dir" are used in some places and they have a
different meaning/give different results for tcsh compared to 4nt but the build
works nevertheless.
Comment 13 hjs 2005-03-15 18:26:35 UTC
.
Comment 14 hjs 2005-03-15 18:30:38 UTC
.
Comment 15 hjs 2005-04-05 11:30:31 UTC
.