This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
WinCE Makefile and make_ext.pl general and XS fixes
authorDaniel Dragan <bulk88@hotmail.com>
Wed, 9 Oct 2013 07:33:47 +0000 (03:33 -0400)
committerSteve Hay <steve.m.hay@googlemail.com>
Mon, 21 Oct 2013 16:27:58 +0000 (17:27 +0100)
commit27329181e393b988b7745c51463210b270f51c87
tree19de20700825bb674713eeb07ccaffd9f2ef414a
parent9d176cd8dda1d6b2f98386843a92abe96e8a328e
WinCE Makefile and make_ext.pl general and XS fixes

On a WinCE build. On the 2nd nmake run, using Makefile.ce, eventually calls
the Extensions target which calls make_ext.pl. What happens is nmake for CE
for each module is called on the Desktop per module makefile from the
earlier Desktop build. Since the Desktop Perl already was built
sucessfully, all rules/deps are met in the Desktop per module makefile, and
nothing happens during the module building phase for a CE build. Previously
I used external file management tools to delete the per module Makefiles
before running Makefile.ce.

*make_ext.pl
- implement deleting and rebuilding the per module makefile on a Cross
  build
- use constants for constant folding, there are opportunities for other
  variables to be converted to constants in the future
- fix a bug from commit baff067e71 where unlink() on a file with an open
  handle ($mfh) didn't delete the file from disk and a new per module
  makefile would be not be built by make_ext.pl later since the per module
  makefile was still on disk. This was observed on Win32. Also harden the
  unlink code with a new _unlink sub that is fatal if the file is still on
  disk after unlink supposedly deleted it.
- var $header and the quotemeta is because of an issue in Perl #119793

*Makefile.ce
- bring the debugging symbol generation flags and optimization flags
  to be closer to a Dekstop VC Perl build
- ICWD is obsolete as of commit f6b3c354c9 , remove it
- MINIMOD is obsolete as of commit 7b4d95f74b , remove it
- make a poisoned config.h so if there is a XS building mixup between
  a desktop and CE perl, the poisoned config.h for CE will stop the build
  gracefully
- $(MINIPERL) has never been defined in Makefile.ce from day 1 (10 years)
  replace with $(HPERL) everywhere, this was causing things to not run
  silently since $(MINIPERL) was empty string. Use HPERL instead of
  MINIPERL to allow flexibility to use the full perl binary if necessery
  one day
- better cleaning on root makefile clean target

*win32/win32.h
*win32/win32iop.h
- silence alot of redefinition warnings which gave pages of warnings on
  each WinCE compliand

*mg.c
- win32_get_errno is only on WIN32 build not WINCE

a "nmake -f Makefile.ce all" will now build the CE interp and all modules
in 1 shot with no user intervention
make_ext.pl
mg.c
win32/Makefile.ce
win32/win32.h
win32/win32iop.h