makefile
Jamey Sharp
jamey at gabe.freedesktop.org
Mon Oct 31 15:09:09 PST 2005
Update of /cvs/xtest/xtest/src
In directory gabe:/tmp/cvs-serv27930/src
Added Files:
makefile tetconfig
Log Message:
Importing TET 3.3h (unsupported) sources from http://tetworks.opengroup.org/tet/tet3.3h-unsup.src.tgz.
Omitted the contrib directory: we don't care, and the license situation wasn't entirely clear.
--- NEW FILE: makefile ---
#
# SCCS: @(#)makefile 1.7 (98/09/22)
#
# UniSoft Ltd., London, England
#
# (C) Copyright 1996 X/Open Company Limited
#
# All rights reserved. No part of this source code may be reproduced,
# stored in a retrieval system, or transmitted, in any form or by any
# means, electronic, mechanical, photocopying, recording or otherwise,
# except as stated in the end-user licence agreement, without the prior
# permission of the copyright owners.
# A copy of the end-user licence agreement is contained in the file
# Licence which accompanies this distribution.
#
# X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
# the UK and other countries.
#
# ************************************************************************
#
# SCCS: @(#)makefile 1.7 98/09/22 TETware release 3.3
# NAME: makefile
# PRODUCT: TETware
# AUTHOR: Geoff Clare, UniSoft Ltd.
# DATE CREATED: August 1996
#
# DESCRIPTION:
# TETWare top-level makefile
#
# MODIFICATIONS:
# Geoff Clare, UniSoft Ltd., Sept 1996
# Changes for TETware-Lite
#
# Geoff Clare, UniSoft Ltd., Oct 1996
# Skip perl API if perl not available
#
# Andrew Dingwall, UniSoft Ltd., June 1998
# Added the scripts directory.
#
# Andrew Dingwall, UniSoft Ltd., September 1998
# added compat_clean targets
#
# Andrew Josey, The Open Group, May 2001
# Minor update to make compat
# ************************************************************************
DIRS = tet3 xpg3sh/api ksh/api scripts # not perl
first_make_rule: all
all install CLEAN clean CLOBBER clobber FORCE FRC: defines.mk
@case $$MAKEFLAGS in *k*) set +e;; esac; \
for i in $(DIRS); do echo $$i...; ( cd $$i && $(MAKE) $@ ); done; \
x=`(perl -e 'exit 0') 2>&1 || true`; \
if test "$$x" = "" -o \( $@ != all -a $@ != install \); \
then echo perl...; ( cd perl && $(MAKE) $@ ); \
else echo 'perl... skipped (cannot execute perl)'; \
fi
# remainder is all to produce duplicate targets in TET/ETET/dTET2 locations
# on UNIX systems for backwards compatibility with previous TET implementations
include defines.mk
# source directories
INCDIR = ../inc/tet3
LIBDIR = ../lib/tet3
# directories that will hold the compatibility links
TETINC = ../inc/posix_c
TETLIB = ../lib/posix_c
DTETINC = ../inc/dtet2
DTETLIB = ../lib/dtet2
COMPAT_DIRS = $(TETINC) $(TETLIB) $(DTETINC) $(DTETLIB)
# compatibility links that are always installed
COMPAT_FILES = $(TETINC)/tet_api.h $(DTETINC)/tet_api.h \
$(TETINC)/tet_jrnl.h $(DTETINC)/tet_jrnl.h \
$(TETLIB)/libapi$A $(DTETLIB)/libapi$A \
$(TETLIB)/tcm$O $(DTETLIB)/tcm$O \
$(TETLIB)/tcmchild$O $(DTETLIB)/tcmchild$O
# compatibility links that are only installed if the corresponding TETware
# files are supported on this system
COMPAT_FILES_OPT = $(DTETLIB)/tcmrem$O \
$(TETLIB)/libCtcm$A $(TETLIB)/libCtcmc$A
# published targets
compat compat_clean:
@case `uname -s` in \
Windows_NT|Windows_95|DOS) \
echo "make $@ not suported on Win32 systems" \
exit 1 \
;; \
*) \
$(MAKE) unix_$@ \
;; \
esac
# targets below here are unpublished (private) targets
# and should not be invoked directly by a user
unix_compat: $(COMPAT_DIRS) $(COMPAT_FILES) compat_files_opt
unix_compat_clean:
rm -f $(COMPAT_FILES) $(COMPAT_FILES_OPT)
rmdir $(COMPAT_DIRS) 2> /dev/null || true
$(COMPAT_DIRS):
mkdir $@
# compatibility links that are always installed
$(TETINC)/tet_api.h $(DTETINC)/tet_api.h: $(INCDIR)/tet_api.h
rm -f $@
ln $(INCDIR)/tet_api.h $@
$(TETINC)/tet_jrnl.h $(DTETINC)/tet_jrnl.h: $(INCDIR)/tet_jrnl.h
rm -f $@
ln $(INCDIR)/tet_jrnl.h $@
$(TETLIB)/libapi$A $(DTETLIB)/libapi$A: $(LIBDIR)/libapi$A
rm -f $@
ln $(LIBDIR)/libapi$A $@
$(TETLIB)/tcm$O $(DTETLIB)/tcm$O: $(LIBDIR)/tcm$O
rm -f $@
ln $(LIBDIR)/tcm$O $@
$(TETLIB)/tcmchild$O $(DTETLIB)/tcmchild$O: $(LIBDIR)/tcmchild$O
rm -f $@
ln $(LIBDIR)/tcmchild$O $@
# compatibility links that are only installed if the corresponding TETware
# files are supported on this system
compat_files_opt:
@test ! -f $(LIBDIR)/tcmrem$O || $(MAKE) $(DTETLIB)/tcmrem$O
@test ! -f $(LIBDIR)/Ctcm$O || $(MAKE) $(TETLIB)/libCtcm$A
@test ! -f $(LIBDIR)/Ctcmchild$O || $(MAKE) $(TETLIB)/libCtcmc$A
$(DTETLIB)/tcmrem$O: $(LIBDIR)/tcmrem$O
rm -f $@
ln $(LIBDIR)/tcmrem$O $@
$(TETLIB)/libCtcm$A: $(LIBDIR)/Ctcm$O
$(AR) rv $@ $(LIBDIR)/Ctcm$O
$(RANLIB) $@
$(TETLIB)/libCtcmc$A: $(LIBDIR)/Ctcmchild$O
$(AR) rv $@ $(LIBDIR)/Ctcmchild$O
$(RANLIB) $@
--- NEW FILE: tetconfig ---
#
# SCCS: @(#)tetconfig 1.9 (98/08/28)
#
# UniSoft Ltd., London, England
#
# (C) Copyright 1993 X/Open Company Limited
# (C) Copyright 1994 UniSoft Ltd.
#
# All rights reserved. No part of this source code may be reproduced,
# stored in a retrieval system, or transmitted, in any form or by any
# means, electronic, mechanical, photocopying, recording or otherwise,
# except as stated in the end-user licence agreement, without the prior
# permission of the copyright owners.
#
# X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
# the UK and other countries.
#
#
# ************************************************************************
#
# SCCS: @(#)tetconfig 1.9 98/08/28 TETware release 3.3
# NAME: tetconfig
# PRODUCT: TETware
# AUTHOR: Denis McConalogue, UniSoft Ltd.
# DATE CREATED: September 1993
#
# DESCRIPTION:
# TETware configuration script
#
# MODIFICATIONS:
#
# Denis McConalogue, UniSoft Limited, December 1993
# added support for fifolib
#
# Geoff Clare, UniSoft Ltd., July 1996
# Changes for TETWare.
#
# Geoff Clare, UniSoft Ltd., Sept 1996
# Changes for TETWare-Lite and Windows NT.
# Moved from src/tet3/dtetcfg to src/tetconfig.
# Added check for defines.mk file.
#
# Andrew Dingwall, UniSoft Ltd., August 1998
# Added support for shared libraries.
# Removed fixup of tet3/common.mk.
#
# ************************************************************************
USAGE="Usage:${0} [-t transport]"
FIX=" To fix: specify \"-t xti\", \"-t inet\", or \"-t lite\""
PROMPT="Enter one of xti, inet, lite, or type 'q' to exit"
alldirs=". apithr apishlib apithrshlib tcc tcm"
distdirs="syncd tccd xresd"
# doconfig - configure tet3/*/ts.mk for selected transport
doconfig() {
cd tet3 || exit 1
tplib=${1:?}
for i in $alldirs
do
do1config $tplib $i
done
if test $tplib != lite
then
for i in $distdirs
do
do1config $tplib $i
done
fi
cd ..
return 0
}
# do1config - extend the doconfig processing for a single subdirectory
do1config()
{
name=${1:?}
dir=${2:?}
rm -f $dir/ts.mk
cp $dir/${name}lib.mk $dir/ts.mk
}
# index - return 0 if $1 is in the set $2 ...
# otherwise return 1
index(){
X=${1:?}
shift
for Y in $*
do
if test "$X" = "$Y"
then
return 0
fi
done
return 1
}
while :
do
case "$1" in
-t)
shift
TPLIB=${1:?"-t parameter not set"}
shift
;;
"")
break
;;
*)
echo "$USAGE" 1>&2
echo "$FIX" 1>&2
exit 2
esac
done
if test "$TPLIB" != "" && index ${TPLIB} inet xti lite
then
doconfig ${TPLIB}
else
echo "$PROMPT"
while read TPLIB
do
case $TPLIB in
inet|xti|lite)
doconfig $TPLIB
break
;;
q|Q)
exit 1
;;
*)
echo "$PROMPT"
;;
esac
done
fi
case $TPLIB in
lite) echo "TETware-Lite configuration completed" ;;
*) echo "TETware configuration for $TPLIB transport completed" ;;
esac
if test ! -f defines.mk
then
echo "
You need to create a defines.mk file before running make"
fi
exit 0
More information about the xorg-test-commit
mailing list