From 01551e02b6974b7cf0a855f8ba308479fe6bacc4 Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" <mkaply%us.ibm.com> Date: Sat, 27 Jan 2001 15:36:41 +0000 Subject: [PATCH] #65880 r=cls Enable OBJDIR builds for OS/2 --- build/autoconf/acoutput-fast.pl | 2 +- build/autoconf/make-makefile | 18 +++++++++--------- client.mk | 11 +++++++++-- config/rules.mk | 4 ++-- configure.in | 8 +++----- uriloader/exthandler/Makefile.in | 4 ---- 6 files changed, 24 insertions(+), 23 deletions(-) diff --git a/build/autoconf/acoutput-fast.pl b/build/autoconf/acoutput-fast.pl index 06f0668d5fe8c..0e5e8761b569d 100755 --- a/build/autoconf/acoutput-fast.pl +++ b/build/autoconf/acoutput-fast.pl @@ -132,7 +132,7 @@ foreach $ac_file (@makefiles) { $top_srcdir = $ac_dots; $top_srcdir =~ s%/$%%; } - } elsif ($ac_given_srcdir =~ m%^/%) { + } elsif ($ac_given_srcdir =~ m%^/% or $ac_given_srcdir =~ m%^.:/%) { $srcdir = "$ac_given_srcdir$ac_dir_suffix"; $top_srcdir = "$ac_given_srcdir"; } else { diff --git a/build/autoconf/make-makefile b/build/autoconf/make-makefile index 069958a7239c8..03940d8920b76 100755 --- a/build/autoconf/make-makefile +++ b/build/autoconf/make-makefile @@ -208,7 +208,7 @@ sub update_makefiles { $top_srcdir = $ac_dots; $top_srcdir =~ s%/$%%; } - } elsif ($ac_given_srcdir =~ m%^/%) { + } elsif ($ac_given_srcdir =~ m%^/% or $ac_given_srcdir =~ m%^.:/%) { $srcdir = "$ac_given_srcdir$ac_dir_suffix"; $top_srcdir = "$ac_given_srcdir"; } else { @@ -246,14 +246,14 @@ sub update_makefiles { }; while (<INFILE>) { - if (/\@[_a-zA-Z]*\@.*\@[_a-zA-Z]*\@/) { - #warn "Two defines on a line:$ac_file:$.:$_"; - push @unhandled, $ac_file; - last; - } - - s/\@srcdir\@/$srcdir/; - s/\@top_srcdir\@/$top_srcdir/; + #if (/\@[_a-zA-Z]*\@.*\@[_a-zA-Z]*\@/) { + # #warn "Two defines on a line:$ac_file:$.:$_"; + # push @unhandled, $ac_file; + # last; + #} + + s/\@srcdir\@/$srcdir/g; + s/\@top_srcdir\@/$top_srcdir/g; if (/\@[_a-zA-Z]*\@/) { #warn "Unknown variable:$ac_file:$.:$_"; diff --git a/client.mk b/client.mk index 5d35940617a54..c0f41a73b1040 100644 --- a/client.mk +++ b/client.mk @@ -78,8 +78,14 @@ ROOTDIR := $(CWD) TOPSRCDIR := $(CWD)/mozilla endif -ifeq "$(ROOTDIR)" "/" -ROOTDIR := /. +# on os2, TOPSRCDIR may have two forward slashes in a row, which doesn't +# work; replace first instance with one forward slash +TOPSRCDIR := $(shell echo $(TOPSRCDIR) | sed s%//%/%) + +# if ROOTDIR equals only drive letter (i.e. "C:"), set to "/" +DIRNAME := $(shell echo $(ROOTDIR) | sed s/^.://) +ifeq ($(DIRNAME),) +ROOTDIR := /. endif AUTOCONF := autoconf @@ -109,6 +115,7 @@ endif CVSCO = $(strip cvs $(CVS_FLAGS) co $(CVS_CO_FLAGS)) CVSCO_LOGFILE := $(ROOTDIR)/cvsco.log +CVSCO_LOGFILE := $(shell echo $(CVSCO_LOGFILE) | sed s%//%/%) ifdef MOZ_CO_TAG CVS_CO_FLAGS := -r $(MOZ_CO_TAG) diff --git a/config/rules.mk b/config/rules.mk index 4194ad12c5d62..fdf9af5a83fc6 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -606,8 +606,8 @@ endif endif # BeOS ifeq ($(OS_ARCH),OS2) ifdef OS2_PROGRAM_RESOURCE - rc -n -x2 -r $(OS2_PROGRAM_RESOURCE) - rc -n -x2 $(patsubst %.rc,%.res,$(OS2_PROGRAM_RESOURCE)) $@ + rc -n -x2 -i $(subst /,\,$(srcdir)) -r $(subst /,\,$(OS2_PROGRAM_RESOURCE)) $(patsubst %.rc, %.res, $(notdir $(OS2_PROGRAM_RESOURCE))) + rc -n -x2 -i $(subst /,\,$(srcdir)) $(patsubst %.rc, %.res, $(notdir $(OS2_PROGRAM_RESOURCE))) $@ endif # os2_prog_rsrc endif diff --git a/configure.in b/configure.in index 655fce8c9c679..aaf7730b706e5 100644 --- a/configure.in +++ b/configure.in @@ -4347,11 +4347,9 @@ dnl Where the NSPR stuff gets installed: $DIST/{bin,lib,include} dnl MOZ_NSPRENV_DIST=`pwd`/dist case "$target" in -*-*-os2_emx) - MOZ_NSPRENV_DIST=`pwd -D`'/dist' - ;; -*-*-os2_vacpp) - MOZ_NSPRENV_DIST="$ROOT"`pwd -D`'/dist' +*-*-os2*) + MOZ_NSPRENV_DIST=`pwd -D | sed s/^.://` + MOZ_NSPRENV_DIST="$ROOT""$MOZ_NSPRENV_DIST/dist" ;; esac diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in index 7f3bcba3ef3e6..d5cf1df76cf25 100644 --- a/uriloader/exthandler/Makefile.in +++ b/uriloader/exthandler/Makefile.in @@ -41,11 +41,7 @@ else OSDIR = unix endif -ifeq ($(MOZ_OS2_TOOLS),VACPP) -OSHELPER = $(OSDIR)/nsOSHelperAppService.cpp -else OSHELPER = nsOSHelperAppService.cpp -endif EXPORTS = nsExternalHelperAppService.h \ $(OSDIR)/nsOSHelperAppService.h \ -- GitLab