Issue 81855 - Merge OS2 port into dmake 4.11
Summary: Merge OS2 port into dmake 4.11
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: dmake (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: hjs
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-22 22:42 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
New patch from Yuri Dario (24.33 KB, patch)
2007-09-23 23:00 UTC, quetschke
no flags Details | Diff
Comment about OS/2 (975 bytes, patch)
2007-10-11 21:38 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 2007-09-22 22:42:17 UTC
While resyncing cws_src680_dmake411 to m230 I found that dmake was ported to
OS2. Great, but unfortunately I found several issues with the changes that
where committed.

* C++ style comments. dmake is pure C, please refrain from using C++ comments.

* The change to Append_line() that converts whitespaces to newlines breaks
  seems to be rather OOo build specific - $(mktmp ..) is not only used to
  generate response files.
  Beside that it also breaks the group shell functionality of dmake and
  therefore should be solved differently. (Yes, I know it only breaks the OS2
  version of dmake.)
  The cleanest way to get the whitespace to newline transformation is either
  to use the :m modifier when constructing the response file, i.e. like this:

      MYRSPFILE := command1\ncommand2\ncommand3
      someprog $(mktmp $(MYRSPFILE:m)

  or to add a new control macro that allows for this behavior to be switched
  on or of, see OOODMAKEMODE for an example how this is done.

* The change to Create_temp() is also not completely right, DirSepStr should
  have been used, but this is an old bug.

* Several macro definitions are commented out. If they are unneeded they
  should be removed.

* Is it true that the OS2 (EMX) command line is only 8192 and that there is
  a process limit of 16? I ask because the change in unix/ruletab.c looks
  unneeded.

* Why is CacheStat() disabled, i.e. defined to really_dostat()? The CacheStat()
  function in unix/dcache.c should work, or be easily portable. If you do not
  want to use the directory cache you can always set .DIRCACHE=n in your
  startup file.

* No documentation was changed. If features are changed this has to be
  documented in the man page. ChangeLog and NEWS file are also nice.

I will back out the questionable changes again in cws_src680_dmake411, please
file issues to me (vq) or hjs if I break something by taking out the changes.
Comment 1 quetschke 2007-09-23 00:22:51 UTC
A correction first, I meant

      MYRSPFILE := command1\ncommand2\ncommand3
      someprog $(mktmp $(MYRSPFILE:m))

in the previous entry.

During the merge I took out the special treatment for Append_line(),
unfortunately `cwsresync -c` did not use the comment I left in the .resync file.

@ydario: I am sorry that I had to revert some of your changes, but IMHO patches
to dmake have to be as portable as possible as it is also used in other, non-OOo
projects.
Comment 2 quetschke 2007-09-23 23:00:45 UTC
Created attachment 48439 [details]
New patch from Yuri Dario
Comment 3 quetschke 2007-09-23 23:13:26 UTC
Patch committed to dmake411.
Comment 4 hjs 2007-10-11 10:00:26 UTC
@ydari: there is no way for me to test if this works out for os2. could you
please have a look at it and leave a note in the issue?
Comment 5 Yuri Dario 2007-10-11 15:51:21 UTC
Builds fine under OS/2. I just noted a minor issue, it is better to add a
warning for people running make.cmd (now deprecated):

Index: make.cmd
===================================================================
RCS file: /cvs/tools/dmake/make.cmd,v
retrieving revision 1.2.2.2
diff -r1.2.2.2 make.cmd
30a31
> echo This script is deprecated for libc 06x building: run configure.cmd, then
make.exe

and add a configure.cmd file:

REM YD do not use  -Zbin-files, we use text mode as default.
set CFLAGS=-g -Zomf -O3 -march=pentium -mcpu=pentium4
set CXXFLAGS=-g -Zomf -O3 -march=pentium -mcpu=pentium4
set LDFLAGS=-s -Zsym -Zmap -Zhigh-mem -Zomf -Zexe -Zargs-wild -Zargs-resp
set LN_CP_F=cp.exe
set RANLIb=echo
set AR=emxomfar -p128
sh -c "./configure --enable-spawn"

TIA
Yuri
Comment 6 quetschke 2007-10-11 21:36:47 UTC
I don't think a file that might be used on Windows should issue an OS/2 specific
warning. The same goes for creating a new file for calling configure, there are
no specific linux, bsd, windos/cygwin, macosx, you name it files that hardcode
OS specific configure settings. I put your configure settings as OS/2 specific
comments into dmake/make.cmd (see next patch) but the right place would have been
dmake/readme/public/os2.txt. That file would need some serious cleanup ;)

Maybe in the next dmake version? ;)
Comment 7 quetschke 2007-10-11 21:38:02 UTC
Created attachment 48846 [details]
Comment about OS/2
Comment 8 hjs 2007-10-15 16:22:30 UTC
i think this issue is done.

@ydario: if there is more to do, please file a new issue
Comment 9 hjs 2007-12-21 13:35:49 UTC
dmake 4.11 is in use now