Explorar o código

+ Added varutils.pp

michael %!s(int64=25) %!d(string=hai) anos
pai
achega
bedfa85da5
Modificáronse 3 ficheiros con 97 adicións e 95 borrados
  1. 44 94
      rtl/os2/Makefile
  2. 5 1
      rtl/os2/Makefile.fpc
  3. 48 0
      rtl/os2/varutils.pp

+ 44 - 94
rtl/os2/Makefile

@@ -1,5 +1,5 @@
 #
-# Makefile generated by fpcmake v1.00 [2000/08/14]
+# Makefile generated by fpcmake v0.99.13 [2000/03/28]
 #
 
 defaultrule: all
@@ -193,7 +193,7 @@ endif
 # Targets
 
 override LOADEROBJECTS+=prt0 prt1 code2 code3
-override UNITOBJECTS+=$(SYSTEMUNIT) objpas strings ports os2def doscalls moncalls kbdcalls moucalls viocalls pmbitmap pmwin pmgpi dive pmerr dos crt objects printer sysutils math typinfo ucomplex cpu mmx getopts heaptrc lineinfo
+override UNITOBJECTS+=$(SYSTEMUNIT) objpas strings ports os2def doscalls moncalls kbdcalls moucalls viocalls pmbitmap pmwin pmgpi dive pmerr dos crt objects printer sysutils math typinfo ucomplex cpu mmx getopts heaptrc lineinfo varutils
 override RSTOBJECTS+=math
 
 # Clean
@@ -594,19 +594,6 @@ DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
 endif
 endif
 
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef inlinux
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
 # Where the some extra (data)files will be stored
 ifndef DATAINSTALLDIR
 DATAINSTALLDIR=$(BASEINSTALLDIR)
@@ -642,28 +629,28 @@ ifneq ($(OS_TARGET),$(OS_SOURCE))
 override FPCOPT+=-T$(OS_TARGET)
 endif
 
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+ifdef UNITSDIR
+override FPCOPT+=-Fu$(UNITSDIR)
 endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+
+ifdef NEEDINCDIR
+override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
 endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+
+
+# Target dirs
+ifdef TARGETDIR
+override FPCOPT+=-FE$(TARGETDIR)
 endif
 
 # Smartlinking
 ifdef LINKSMART
-override FPCOPT+=-XX
+override FPCOPT+=-CX
 endif
 
-# Smartlinking creation
+# Smartlinking
 ifdef CREATESMART
-override FPCOPT+=-CX
+override FPCOPT+=-XX
 endif
 
 # Debug
@@ -696,23 +683,21 @@ ifdef VERBOSE
 override FPCOPT+=-vwni
 endif
 
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
+# Add commandline options
+ifdef OPT
+override FPCOPT+=$(OPT)
 endif
-
-ifdef NEEDINCDIR
-override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
 endif
-
-
-# Target dirs
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
 endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+endif
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
 endif
 
 # Add defines from FPCOPTDEF to FPCOPT
@@ -765,14 +750,10 @@ install: fpc_install
 
 sourceinstall: fpc_sourceinstall
 
-exampleinstall: fpc_exampleinstall
-
 zipinstall: fpc_zipinstall
 
 zipsourceinstall: fpc_zipsourceinstall
 
-zipexampleinstall: fpc_zipexampleinstall
-
 clean: fpc_clean
 
 distclean: fpc_distclean
@@ -781,7 +762,7 @@ cleanall: fpc_cleanall
 
 info: fpc_info
 
-.PHONY:  all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
+.PHONY:  all debug smart shared showinstall install sourceinstall zipinstall zipsourceinstall clean distclean cleanall info
 
 #####################################################################
 # Loaders
@@ -829,11 +810,9 @@ fpc_units: $(UNITPPUFILES)
 # Resource strings
 #####################################################################
 
-ifdef RSTOBJECTS
 override RSTFILES=$(addsuffix $(RSTEXT),$(RSTOBJECTS))
 
 override CLEANRSTFILES+=$(RSTFILES)
-endif
 
 #####################################################################
 # General compile rules
@@ -877,12 +856,6 @@ fpc_debug:
 
 .PHONY: fpc_smart fpc_shared
 
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
 # Default sharedlib units are all unit objects
 ifndef SHAREDLIBUNITOBJECTS
 SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
@@ -896,7 +869,7 @@ ifdef inlinux
 ifndef LIBNAME
 	@$(ECHO) "LIBNAME not set"
 else
-	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
+	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
 endif
 else
 	@$(ECHO) "Shared Libraries not supported"
@@ -914,9 +887,14 @@ endif
 
 ifdef INSTALLPPUFILES
 ifdef PPUFILES
+ifdef inlinux
 INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
+INSTALLPPULIBFILES:=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
+else
+INSTALLPPULINKFILES:=$(shell $(PPUFILES) $(INSTALLPPUFILES))
+endif
 else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
+INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
 endif
 endif
 
@@ -929,11 +907,8 @@ ifdef INSTALLPPUFILES
 ifneq ($(INSTALLPPULINKFILES),)
 	@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
 endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
-	@$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef inlinux
-	@$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
+ifneq ($(INSTALLPPULIBFILES),)
+	@$(ECHO) -e $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
 endif
 endif
 ifdef EXTRAINSTALLFILES
@@ -956,12 +931,9 @@ ifdef INSTALLPPUFILES
 ifneq ($(INSTALLPPULINKFILES),)
 	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
 endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
+ifneq ($(INSTALLPPULIBFILES),)
 	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inlinux
-	ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
+	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
 endif
 endif
 ifdef EXTRAINSTALLFILES
@@ -983,24 +955,6 @@ fpc_sourceinstall: clean
 	$(MKDIR) $(SOURCEINSTALLDIR)
 	$(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
 
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
-	$(MKDIR) $(EXAMPLEINSTALLDIR)
-	$(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
-	$(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
-	$(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
 #####################################################################
 # Zip
 #####################################################################
@@ -1062,11 +1016,6 @@ endif
 fpc_zipsourceinstall:
 	$(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
 
-.PHONY:  fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
 #####################################################################
 # Clean rules
 #####################################################################
@@ -1081,7 +1030,7 @@ ifdef CLEANPPUFILES
 ifdef PPUFILES
 CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
 else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
+CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
 endif
 endif
 
@@ -1100,9 +1049,6 @@ ifdef CLEANRSTFILES
 endif
 ifdef EXTRACLEANFILES
 	-$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
-	-$(DEL) $(LIBNAME) $(LIBFULLNAME)
 endif
 	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
 
@@ -1270,6 +1216,10 @@ typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
 math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
 	$(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
 
+varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
+		    $(OBJPASDIR)/varutilh.inc varutils.pp
+	$(COMPILER) -I$(OBJPASDIR) varutils.pp $(REDIR)
+
 #
 # Other system-independent RTL Units
 #

+ 5 - 1
rtl/os2/Makefile.fpc

@@ -9,7 +9,7 @@ units=$(SYSTEMUNIT) objpas strings \
       pmbitmap pmwin pmgpi dive pmerr \
       dos crt objects printer \
       sysutils math typinfo \
-      ucomplex cpu mmx getopts heaptrc lineinfo
+      ucomplex cpu mmx getopts heaptrc lineinfo varutils
 rst=math
 
 [require]
@@ -143,6 +143,10 @@ typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
 math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
         $(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
 
+varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
+                    $(OBJPASDIR)/varutilh.inc varutils.pp
+        $(COMPILER) -I$(OBJPASDIR) varutils.pp $(REDIR)
+
 #
 # Other system-independent RTL Units
 #

+ 48 - 0
rtl/os2/varutils.pp

@@ -0,0 +1,48 @@
+{
+    $Id$
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 1999-2000 by the Free Pascal development team
+
+    Interface and OS-dependent part of variant support
+       
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+{$MODE ObjFPC}
+
+Unit varutils;
+
+Interface
+
+Uses sysutils;
+
+// Read definitions.
+
+{$i varutilh.inc}
+
+Implementation
+
+// Code common to all platforms.
+
+{$i cvarutil.inc}
+
+// Code common to non-win32 platforms.
+
+{$i varutils.inc}
+
+end.
+
+{
+  $Log$
+  Revision 1.1  2000-08-30 08:56:54  michael
+  + Added varutils.pp
+
+
+}
+