This commit was manufactured by cvs2svn to create branch 'B3.14'.

This commit is contained in:
cvs2svn
2003-07-15 15:56:33 +00:00
parent 6ee9656f43
commit 1fef904a9e
6 changed files with 204 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# CONFIG.aix-ppc.aix-ppc
#
#
# Definitions for aix-ppc host - aix-ppc target builds
# Sites may override these definitions in CONFIG_SITE.aix-ppc.aix-ppc
#-------------------------------------------------------
# Include common gnu compiler definitions
include $(CONFIG)/CONFIG.gnuCommon
GNU_DIR = /usr/common/usg/gcc/3.2.1
CC = $(GNU_BIN)/gcc
CCC = $(GNU_BIN)/g++
AR = ar
ARFLAGS = rcv
RANLIB = ranlib -t
SHRLIB_LDFLAGS = -shared
LOADABLE_SHRLIB_LDFLAGS = -shared

View File

@@ -0,0 +1,11 @@
# CONFIG_SITE.darwin-ppc.Common
#
# $Id$
# This file is maintained by the build community.
#
# Site override definitions for darwin-ppc host builds
#-------------------------------------------------------
# JBA test override values
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 solaris-sparc
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040

View File

@@ -0,0 +1,45 @@
/*************************************************************************\
* Copyright (c) 2003 The University of Chicago, as Operator of Argonne
* National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* $Id$
*
* Macro expansion of environment variables
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define epicsExportSharedSymbols
#include <epicsAssert.h>
#include <epicsString.h>
#include "macLib.h"
char * epicsShareAPI
macEnvExpand(char *str)
{
MAC_HANDLE *handle;
static char *pairs[] = { "", "environ", NULL, NULL };
int destCapacity = 200;
char *dest = NULL;
int n;
char *ret;
assert(macCreateHandle(&handle, pairs) == 0);
do {
destCapacity *= 2;
assert((dest = realloc(dest, destCapacity)) != 0);
n = macExpandString(handle, str, dest, destCapacity);
} while (n >= (destCapacity - 1));
if (n < 0)
ret = NULL;
else
ret = epicsStrDup(dest);
free(dest);
assert(macDeleteHandle(handle) == 0);
return ret;
}

View File

@@ -0,0 +1,58 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
* $Id$
*/
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "macLib.h"
#include "envDefs.h"
int
check(char *str, char *expect)
{
char *got = macEnvExpand(str);
if(expect && !got) {
printf("Expand \"%s'\". Got NULL, expected \"%s\".\n", str, expect);
return 1;
}
if (!expect && got) {
printf("Expand \"%s'\". Got \"%s\", expected NULL.\n", str, got);
return 1;
}
if(expect && got && strcmp(got, expect)) {
printf("Expand \"%s'\". Got \"%s\", expected \"%s\".\n", str, got, expect);
return 1;
}
return 0;
}
int macEnvExpandTest(void)
{
int bad = 0;
epicsEnvSet("FOO","BLETCH");
epicsEnvSet("BAR","GLEEP");
bad |= check ("${FOO}", "BLETCH");
bad |= check ("${FOO}/${BAR}", "BLETCH/GLEEP");
bad |= check ("${FOOBAR}", NULL);
epicsEnvSet("FOO","${BAR}");
epicsEnvSet("BAR","${STR1}");
epicsEnvSet("STR1","VAL1");
epicsEnvSet("STR2","VAL2");
bad |= check ("${FOO}", "VAL1");
epicsEnvSet("BAR","${STR2}");
bad |= check ("${FOO}", "VAL2");
return bad;
}

View File

@@ -0,0 +1,20 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* $Id$
*/
extern "C" {
int macEnvExpandTest ( void );
}
int main ( int , char *[] )
{
return macEnvExpandTest ();
}

View File

@@ -0,0 +1,48 @@
ifdef T_A
ifeq ($(findstring Host,$(VALID_BUILDS)),Host)
SWIG ?= swig
vpath %.py $(USR_VPATH) $(ALL_SRC_DIRS)
# The optional PYTHON_INSTALL_LOCATION environment variable
# should be set to <python install site directory>/site-packages
PYTHON_INSTALL_LOCATION ?= $(INSTALL_LOCATION)/lang/python
INSTALL_PYTHON = $(PYTHON_INSTALL_LOCATION)/$(PYTHON_PACKAGE)
PYTHON_PACKAGE_PTH = $(addsuffix .pth,$(PYTHON_PACKAGE))
INSTALL_PYTHON_PACKAGE_PTH = $(addprefix $(PYTHON_INSTALL_LOCATION)/,$(PYTHON_PACKAGE_PTH))
PYTHON_SCRIPTS = $(filter-out $(LOADABLE_LIBRARY),$(PYTHON_MODULES))
PYTHON_LIBRARY = $(filter $(LOADABLE_LIBRARY),$(PYTHON_MODULES))
PYTHON_SHRLIBNAME = $(PYTHON_LIBRARY:%=$(LOADABLE_SHRLIB_PREFIX)%$(LOADABLE_SHRLIB_SUFFIX))
INSTALL_PYTHONS = $(addprefix $(INSTALL_PYTHON)/,$(PYTHON_SCRIPTS))
INSTALL_PYTHONS += $(addprefix $(INSTALL_PYTHON)/,$(PYTHON_SHRLIBNAME))
buildInstall: $(INSTALL_PYTHONS) $(INSTALL_PYTHON_PACKAGE_PTH)
$(INSTALL_PYTHON)/%: %
@echo "Installing python modules $@"
@$(INSTALL) -d -m 644 $< $(INSTALL_PYTHON)
$(INSTALL_PYTHON)/%: ../%
@echo "Installing python modules $@"
@$(INSTALL) -d -m 644 $< $(INSTALL_PYTHON)
$(PYTHON_INSTALL_LOCATION)/%: %
@echo "Installing python pth file $@"
@$(INSTALL) -d -m 644 $< $(PYTHON_INSTALL_LOCATION)
$(PYTHON_PACKAGE_PTH):
@echo $(PYTHON_PACKAGE) > $@
%_wrap.c: ../%.i
$(SWIG) -python -o $@ $<
clean::
@$(RM) *.py *.so *.pth
endif
endif