--- shapetools-1.4pl6.orig/ChangeLog +++ shapetools-1.4pl6/ChangeLog @@ -0,0 +1,19 @@ +Fri May 2 04:10:13 1997 Matthias Klose + + * src/shape/inherit.c: dont't append the derivation key with + AF_ADD to an existing key, but replace it. + + * src/atfs/afarchive.c (afReadAttrs): test ctime AND mtime for + busy versions that may have changed; this seems to be needed for + Solaris2.5 ... + +Wed Apr 30 12:04:35 1997 Matthias Klose + + * src/sttk/kbdio.c (stGetFromStdin): fixed binary & operator to logical + && operator + +Tue Apr 29 17:27:04 1997 Matthias Klose + + * configure.in, Makefile.in, src/atfs/Makefile.in, src/sttk/Makefile.in + src/atfstk/Makefile.in: + new files, added shared library support --- shapetools-1.4pl6.orig/Makefile +++ shapetools-1.4pl6/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. # # Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -15,12 +16,12 @@ # # Makefile for the ShapeTools # -# $Header: Makefile[5.1] Tue Aug 23 17:34:52 1994 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # The base directory of the shape source tree. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # The operating system. Supported platforms are: # s_aix -- AIX (tested on IBM RS6000 with AIX 3.2.0) @@ -28,26 +29,26 @@ # s_irix -- IRIX (tested on Silicon Graphics with IRIX 4.0.5) # s_mach -- mach (tested on NextStation with Mach 3.0) # s_sunos_4 -- SunOS 4 (tested on SUN 4 with SunOS 4.1.3) -# s_svr_4 -- Solaris 2 (tested on SUN 10 with SunOS 5.1) +# s_sol_2 -- Solaris 2 (tested on SUN 20 with SunOS 5.5) # s_svr_4 -- Sys V Rel.4 (tested on a '386 machine with ESIX) # s_ultrix_4 -- Ultrix (tested on DECStation 5000 with Ultrix 4.2) # For installing the toolkit on other operating systems see the # README file in this directory. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type (may be empty). -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. # Set "-DSYSLOG" if you want to have internal diagnostic messages # handled by the syslog package. -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Needed system libraries. -# As the shape toolkit uses "re_comp" (regular expressions), +# As the shape toolkit uses "re_comp" (regular expressions), # System V machines require an additional library to be linked. # This is usally "SYSLIBS = -lPW". @@ -56,7 +57,7 @@ # Path of a subsystem relative to the root of the system hierarchy # (e.g. vc/save) -NODEPATH = +NODEPATH = # A short name for the (sub)system (used for building the release ID) @@ -66,20 +67,23 @@ # Make sure, that the subdirectories "bin", "include", and "lib" # exist in installation directory. -INSTALLBASE = /usr/local +INSTALLBASE = /usr # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLSHAPELIBPATH = $(INSTALLBASE)/lib/shape INSTALLEMACSLISPPATH = $(INSTALLBASE)/lib/emacs/lisp INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -95,10 +99,10 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like TARGET1 TARGET2 or any better names). In this case you +# (like TARGET1 TARGET2 or any better names). In this case you # have to adjust the system building actions accordingly. -TARGET = +TARGET = # The release number generator. The version number of this file will # be used as release identifier for the whole system. @@ -108,14 +112,14 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = src/atfs src/sttk src/atfstk src/shape src/vc src/rms src/interface src/patches +SUBSYSTEMS = src/atfs src/sttk src/atfstk src/shape src/vc src/rms #SUBSYSTEMS = src/atfs src/sttk src/atfstk src/shape src/vc src/interface src/rms src/patches tutorial # The regular source and header files. SOURCES = CHANGES-1.4 README LICENSE INSTALL SUPPORT shape_conf.sh Questionnaire -HEADERS = +HEADERS = # All source components of the system (should not be changed) @@ -128,20 +132,27 @@ SHELL=/bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -O -DATFS_OWN_LOCKING -MAKELDFLAGS = -s +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro -CC = cc +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) -D$(HOSTSYSTEM) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) RANLIB = ranlib +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = + CONFIGSCRIPT = ./shape_conf.sh # System libraries, local libraries and lint libraries. -LOCALLIBS = +LOCALLIBS = LINTLIBS = # -------------------------------------------------------------------- @@ -163,6 +174,8 @@ DOLIBRARIES = yes +DOSHAREDLIBS = yes + DOEMACSLISP = yes installtargets: installmanuals @@ -181,7 +194,8 @@ then \ chmod u+w $(INSTALLMANPATH)/man1/$$i; \ fi; \ - cp man/man1/$$i $(INSTALLMANPATH)/man1/$$i; \ + sed -e 's|@INSTALLBASE@|$(INSTALLBASE)|' \ + < man/man1/$$i > $(INSTALLMANPATH)/man1/$$i; \ chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ done; \ if [ "$(DOLIBRARIES)" = yes ]; \ @@ -194,7 +208,8 @@ then \ chmod u+w $(INSTALLMANPATH)/man3/$$i; \ fi; \ - cp man/man3/$$i $(INSTALLMANPATH)/man3/$$i; \ + sed -e 's|@INSTALLBASE@|$(INSTALLBASE)|' \ + < man/man3/$$i > $(INSTALLMANPATH)/man3/$$i; \ chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man3/$$i; \ done; \ _manuals=`ls man/man5`; \ @@ -205,7 +220,8 @@ then \ chmod u+w $(INSTALLMANPATH)/man5/$$i; \ fi; \ - cp man/man5/$$i $(INSTALLMANPATH)/man5/$$i; \ + sed -e 's|@INSTALLBASE@|$(INSTALLBASE)|' \ + < man/man5/$$i > $(INSTALLMANPATH)/man5/$$i; \ chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man5/$$i; \ done; \ fi; \ @@ -217,21 +233,55 @@ then \ chmod u+w $(INSTALLMANPATH)/man7/$$i; \ fi; \ - cp man/man7/$$i $(INSTALLMANPATH)/man7/$$i; \ + sed -e 's|@INSTALLBASE@|$(INSTALLBASE)|' \ + < man/man7/$$i > $(INSTALLMANPATH)/man7/$$i; \ chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man7/$$i; \ done # The cleanup action. Removes all automatically rederivable files. +# XXX: shared libraries missing doclean: rm -f $(TARGET) $(ALIASES) $(OBJECTS) \ - lib/libAtFS.a.old lib/libAtFS.a lib/libsttk.old.a \ - lib/libsttk.a lib/libAtFStk.old.a lib/libAtFStk.a \ + lib/libAtFS.a.old lib/libAtFS.a lib/libsttk.a.old \ + lib/libsttk.a lib/libAtFStk.a.old lib/libAtFStk.a \ + lib/libAtFS.$(SHLIBSUFFIX)* \ + lib/libsttk.$(SHLIBSUFFIX)* \ + lib/libAtFStk.$(SHLIBSUFFIX)* \ include/atfs.h include/afsys.h include/config.h \ include/sttk.h include/atfstk.h # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @-_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ @@ -285,29 +335,7 @@ fi; \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - SWITCHES="$(SWITCHES)" \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$$installincpath \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$$installlibpath \ - INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ - INSTALLEMACSLISPPATH=$(INSTALLEMACSLISPPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$$libpath \ - LOCALINCLUDEPATH=$$includepath \ - MAKE="$(MAKE)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -328,7 +356,7 @@ clean: +clean $(ALLTARGETS) +all: - @-if [ ! -f .configured ]; \ + @-if [ ! -f .configured -a ! -f config.status ]; \ then \ echo; echo "Initial build of shapeTools on this machine."; \ ./shape_conf.sh `pwd`; \ @@ -339,29 +367,7 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - SWITCHES="$(SWITCHES)" \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ - INSTALLEMACSLISPPATH=$(INSTALLEMACSLISPPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -372,7 +378,7 @@ fi +install: - @-if [ ! -f .configured ]; \ + @-if [ ! -f .configured -a ! -f config.status ]; \ then \ echo; echo "Initial build of shapeTools on this machine."; \ ./shape_conf.sh `pwd`; \ @@ -382,31 +388,8 @@ if [ -n "$(ALLTARGETS)" ]; \ then : ; \ else \ - $(MAKE) ALLTARGETS="subsystems installtargets" \ - MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - SWITCHES="$(SWITCHES)" \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ - INSTALLEMACSLISPPATH=$(INSTALLEMACSLISPPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(MAKE) ALLTARGETS="subsystems installtargets" MAINTARGET=install \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -421,29 +404,7 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - SWITCHES="$(SWITCHES)" \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ - INSTALLEMACSLISPPATH=$(INSTALLEMACSLISPPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ --- shapetools-1.4pl6.orig/Makefile.in +++ shapetools-1.4pl6/Makefile.in @@ -0,0 +1,414 @@ +# # Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for the ShapeTools +# +# $__Header$ +# + +# The base directory of the shape source tree. + +BASE = @BASE@ + +# The operating system. Supported platforms are: +# s_aix -- AIX (tested on IBM RS6000 with AIX 3.2.0) +# s_hpux -- HP/UX (tested on HP 9000 with HP/UX 9.0) +# s_irix -- IRIX (tested on Silicon Graphics with IRIX 4.0.5) +# s_mach -- mach (tested on NextStation with Mach 3.0) +# s_sunos_4 -- SunOS 4 (tested on SUN 4 with SunOS 4.1.3) +# s_sol_2 -- Solaris 2 (tested on SUN 20 with SunOS 5.5) +# s_svr_4 -- Sys V Rel.4 (tested on a '386 machine with ESIX) +# s_ultrix_4 -- Ultrix (tested on DECStation 5000 with Ultrix 4.2) +# For installing the toolkit on other operating systems see the +# README file in this directory. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type (may be empty). + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. +# Set "-DSYSLOG" if you want to have internal diagnostic messages +# handled by the syslog package. + +SWITCHES = @SWITCHES@ + +# Needed system libraries. +# As the shape toolkit uses "re_comp" (regular expressions), +# System V machines require an additional library to be linked. +# This is usally "SYSLIBS = -lPW". + +SYSLIBS = @SYSLIBS@ + +# Path of a subsystem relative to the root of the system hierarchy +# (e.g. vc/save) + +NODEPATH = + +# A short name for the (sub)system (used for building the release ID) + +NODENAME = shapeTools + +# The installation base directory. +# Make sure, that the subdirectories "bin", "include", and "lib" +# exist in installation directory. + +INSTALLBASE = @prefix@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLSHAPELIBPATH = $(INSTALLBASE)/lib/shape +INSTALLEMACSLISPPATH = $(INSTALLBASE)/lib/emacs/lisp +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like TARGET1 TARGET2 or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = Release # source + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = src/atfs src/sttk src/atfstk src/shape src/vc src/rms +#SUBSYSTEMS = src/atfs src/sttk src/atfstk src/shape src/vc src/interface src/rms src/patches tutorial + +# The regular source and header files. + +SOURCES = CHANGES-1.4 README LICENSE INSTALL SUPPORT shape_conf.sh Questionnaire + +HEADERS = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +SHELL=/bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) -D$(HOSTSYSTEM) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CONFIGSCRIPT = ./shape_conf.sh + +# System libraries, local libraries and lint libraries. + +LOCALLIBS = +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +config: configure + +configure: + @$(CONFIGSCRIPT) `pwd` + +# The final system building action. + +targets: $(TARGET) + +DOLIBRARIES = yes + +DOSHAREDLIBS = yes + +DOEMACSLISP = yes + +installtargets: installmanuals + +installmanuals: $(MANUALS) + @-echo "installing manuals in $(INSTALLMANPATH)"; \ + if [ "$(INSTALLMANPATH)" = "$(BASE)/man" ]; \ + then \ + exit 0; \ + fi; \ + _manuals=`ls man/man1`; \ + for i in $$_manuals; \ + do \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + sed -e 's|@INSTALLBASE@|$(INSTALLBASE)|' \ + < man/man1/$$i > $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done; \ + if [ "$(DOLIBRARIES)" = yes ]; \ + then \ + _manuals=`ls man/man3`; \ + for i in $$_manuals; \ + do \ + if [ -f $(INSTALLMANPATH)/man3/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man3/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man3/$$i; \ + fi; \ + sed -e 's|@INSTALLBASE@|$(INSTALLBASE)|' \ + < man/man3/$$i > $(INSTALLMANPATH)/man3/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man3/$$i; \ + done; \ + _manuals=`ls man/man5`; \ + for i in $$_manuals; \ + do \ + if [ -f $(INSTALLMANPATH)/man5/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man5/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man5/$$i; \ + fi; \ + sed -e 's|@INSTALLBASE@|$(INSTALLBASE)|' \ + < man/man5/$$i > $(INSTALLMANPATH)/man5/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man5/$$i; \ + done; \ + fi; \ + _manuals=`ls man/man7`; \ + for i in $$_manuals; \ + do \ + if [ -f $(INSTALLMANPATH)/man7/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man7/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man7/$$i; \ + fi; \ + sed -e 's|@INSTALLBASE@|$(INSTALLBASE)|' \ + < man/man7/$$i > $(INSTALLMANPATH)/man7/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man7/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. +# XXX: shared libraries missing + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) \ + lib/libAtFS.a.old lib/libAtFS.a lib/libsttk.a.old \ + lib/libsttk.a lib/libAtFStk.a.old lib/libAtFStk.a \ + lib/libAtFS.$(SHLIBSUFFIX)* \ + lib/libsttk.$(SHLIBSUFFIX)* \ + lib/libAtFStk.$(SHLIBSUFFIX)* \ + include/atfs.h include/afsys.h include/config.h \ + include/sttk.h include/atfstk.h + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @-_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + maketarget=$(MAINTARGET); \ + installlibpath=$(INSTALLLIBPATH); \ + installincpath=$(INSTALLINCPATH); \ + libpath=$(LOCALLIBPATH); \ + includepath=$(LOCALINCLUDEPATH); \ + if [ $$i = src/atfs -o $$i = src/sttk -o $$i = src/atfstk ]; \ + then \ + if [ "$(MAINTARGET)" = all ]; \ + then \ + maketarget=localinstall; \ + if [ "$(INSTALLLIBPATH)" = "$(LOCALLIBPATH)" ]; \ + then \ + installlibpath=/tmp; \ + fi; \ + if [ "$(INSTALLINCPATH)" = "$(LOCALINCLUDEPATH)" ]; \ + then \ + installincpath=/tmp; \ + fi; \ + elif [ "$(MAINTARGET)" = install ]; \ + then \ + if [ "$(DOLIBRARIES)" = no ]; \ + then \ + maketarget="noinstall localinstall"; \ + else \ + maketarget="install localinstall"; \ + fi; \ + if [ "$(INSTALLLIBPATH)" = "$(LOCALLIBPATH)" ]; \ + then \ + libpath=/tmp; \ + maketarget=`echo $$maketarget | sed -e s/localinstall//`; \ + fi; \ + if [ "$(INSTALLINCPATH)" = "$(LOCALINCLUDEPATH)" ]; \ + then \ + includepath=/tmp; \ + maketarget=`echo $$maketarget | sed -e s/localinstall//`; \ + fi; \ + else \ + if [ "$(INSTALLLIBPATH)" = "$(LOCALLIBPATH)" ]; \ + then \ + installlibpath=/tmp; \ + fi; \ + if [ "$(INSTALLINCPATH)" = "$(LOCALINCLUDEPATH)" ]; \ + then \ + installincpath=/tmp; \ + fi; \ + fi; \ + fi; \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + ALLTARGETS= \ + MAINTARGET= \ + SHAPELIBPATH=$(SHAPELIBPATH) $$maketarget ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ ! -f .configured -a ! -f config.status ]; \ + then \ + echo; echo "Initial build of shapeTools on this machine."; \ + ./shape_conf.sh `pwd`; \ + echo; echo "Got it ! Now call 'make' again to start system build."; \ + exit 0; \ + fi; \ + if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) all; \ + fi + ++install: + @-if [ ! -f .configured -a ! -f config.status ]; \ + then \ + echo; echo "Initial build of shapeTools on this machine."; \ + ./shape_conf.sh `pwd`; \ + echo; echo "Got it ! Now call 'make install' again to start system build and installation."; \ + exit 0; \ + fi; \ + if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" MAINTARGET=install \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) clean; \ + fi --- shapetools-1.4pl6.orig/Makefile.org +++ shapetools-1.4pl6/Makefile.org @@ -0,0 +1,456 @@ +# # Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for the ShapeTools +# +# $Header: Makefile[5.1] Tue Aug 23 17:34:52 1994 andy@cs.tu-berlin.de frozen $ +# + +# The base directory of the shape source tree. + +BASE = /home/stone/shape/development + +# The operating system. Supported platforms are: +# s_aix -- AIX (tested on IBM RS6000 with AIX 3.2.0) +# s_hpux -- HP/UX (tested on HP 9000 with HP/UX 9.0) +# s_irix -- IRIX (tested on Silicon Graphics with IRIX 4.0.5) +# s_mach -- mach (tested on NextStation with Mach 3.0) +# s_sunos_4 -- SunOS 4 (tested on SUN 4 with SunOS 4.1.3) +# s_sol_2 -- Solaris 2 (tested on SUN 20 with SunOS 5.5) +# s_svr_4 -- Sys V Rel.4 (tested on a '386 machine with ESIX) +# s_ultrix_4 -- Ultrix (tested on DECStation 5000 with Ultrix 4.2) +# For installing the toolkit on other operating systems see the +# README file in this directory. + +HOSTSYSTEM = s_sol_2 + +# The processor type (may be empty). + +HOSTTYPE = sol2 + +# Preprocessor switches. +# Set "-DSYSLOG" if you want to have internal diagnostic messages +# handled by the syslog package. + +SWITCHES = + +# Needed system libraries. +# As the shape toolkit uses "re_comp" (regular expressions), +# System V machines require an additional library to be linked. +# This is usally "SYSLIBS = -lPW". + +SYSLIBS = + +# Path of a subsystem relative to the root of the system hierarchy +# (e.g. vc/save) + +NODEPATH = + +# A short name for the (sub)system (used for building the release ID) + +NODENAME = shapeTools + +# The installation base directory. +# Make sure, that the subdirectories "bin", "include", and "lib" +# exist in installation directory. + +INSTALLBASE = /usr/local + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib +INSTALLSHAPELIBPATH = $(INSTALLBASE)/lib/shape +INSTALLEMACSLISPPATH = $(INSTALLBASE)/lib/emacs/lisp +INSTALLLIBMODE = 644 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like TARGET1 TARGET2 or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = Release # source + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = src/atfs src/sttk src/atfstk src/shape src/vc src/rms src/interface src/patches +#SUBSYSTEMS = src/atfs src/sttk src/atfstk src/shape src/vc src/interface src/rms src/patches tutorial + +# The regular source and header files. + +SOURCES = CHANGES-1.4 README LICENSE INSTALL SUPPORT shape_conf.sh Questionnaire + +HEADERS = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +SHELL=/bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -O -DATFS_OWN_LOCKING +MAKELDFLAGS = -s + +CC = cc +CFLAGS = $(INCLUDES) $(MAKECFLAGS) -D$(HOSTSYSTEM) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = ranlib + +CONFIGSCRIPT = ./shape_conf.sh + +# System libraries, local libraries and lint libraries. + +LOCALLIBS = +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +config: configure + +configure: + @$(CONFIGSCRIPT) `pwd` + +# The final system building action. + +targets: $(TARGET) + +DOLIBRARIES = yes + +DOSHAREDLIBS = no + +DOEMACSLISP = yes + +installtargets: installmanuals + +installmanuals: $(MANUALS) + @-echo "installing manuals in $(INSTALLMANPATH)"; \ + if [ "$(INSTALLMANPATH)" = "$(BASE)/man" ]; \ + then \ + exit 0; \ + fi; \ + _manuals=`ls man/man1`; \ + for i in $$_manuals; \ + do \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp man/man1/$$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done; \ + if [ "$(DOLIBRARIES)" = yes ]; \ + then \ + _manuals=`ls man/man3`; \ + for i in $$_manuals; \ + do \ + if [ -f $(INSTALLMANPATH)/man3/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man3/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man3/$$i; \ + fi; \ + cp man/man3/$$i $(INSTALLMANPATH)/man3/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man3/$$i; \ + done; \ + _manuals=`ls man/man5`; \ + for i in $$_manuals; \ + do \ + if [ -f $(INSTALLMANPATH)/man5/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man5/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man5/$$i; \ + fi; \ + cp man/man5/$$i $(INSTALLMANPATH)/man5/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man5/$$i; \ + done; \ + fi; \ + _manuals=`ls man/man7`; \ + for i in $$_manuals; \ + do \ + if [ -f $(INSTALLMANPATH)/man7/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man7/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man7/$$i; \ + fi; \ + cp man/man7/$$i $(INSTALLMANPATH)/man7/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man7/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) \ + lib/libAtFS.a.old lib/libAtFS.a lib/libsttk.old.a \ + lib/libsttk.a lib/libAtFStk.old.a lib/libAtFStk.a \ + include/atfs.h include/afsys.h include/config.h \ + include/sttk.h include/atfstk.h + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @-_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + maketarget=$(MAINTARGET); \ + installlibpath=$(INSTALLLIBPATH); \ + installincpath=$(INSTALLINCPATH); \ + libpath=$(LOCALLIBPATH); \ + includepath=$(LOCALINCLUDEPATH); \ + if [ $$i = src/atfs -o $$i = src/sttk -o $$i = src/atfstk ]; \ + then \ + if [ "$(MAINTARGET)" = all ]; \ + then \ + maketarget=localinstall; \ + if [ "$(INSTALLLIBPATH)" = "$(LOCALLIBPATH)" ]; \ + then \ + installlibpath=/tmp; \ + fi; \ + if [ "$(INSTALLINCPATH)" = "$(LOCALINCLUDEPATH)" ]; \ + then \ + installincpath=/tmp; \ + fi; \ + elif [ "$(MAINTARGET)" = install ]; \ + then \ + if [ "$(DOLIBRARIES)" = no ]; \ + then \ + maketarget="noinstall localinstall"; \ + else \ + maketarget="install localinstall"; \ + fi; \ + if [ "$(INSTALLLIBPATH)" = "$(LOCALLIBPATH)" ]; \ + then \ + libpath=/tmp; \ + maketarget=`echo $$maketarget | sed -e s/localinstall//`; \ + fi; \ + if [ "$(INSTALLINCPATH)" = "$(LOCALINCLUDEPATH)" ]; \ + then \ + includepath=/tmp; \ + maketarget=`echo $$maketarget | sed -e s/localinstall//`; \ + fi; \ + else \ + if [ "$(INSTALLLIBPATH)" = "$(LOCALLIBPATH)" ]; \ + then \ + installlibpath=/tmp; \ + fi; \ + if [ "$(INSTALLINCPATH)" = "$(LOCALINCLUDEPATH)" ]; \ + then \ + installincpath=/tmp; \ + fi; \ + fi; \ + fi; \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + SWITCHES="$(SWITCHES)" \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$$installincpath \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$$installlibpath \ + INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ + INSTALLEMACSLISPPATH=$(INSTALLEMACSLISPPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$$libpath \ + LOCALINCLUDEPATH=$$includepath \ + MAKE="$(MAKE)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + ALLTARGETS= \ + MAINTARGET= \ + SHAPELIBPATH=$(SHAPELIBPATH) $$maketarget ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ ! -f .configured ]; \ + then \ + echo; echo "Initial build of shapeTools on this machine."; \ + ./shape_conf.sh `pwd`; \ + echo; echo "Got it ! Now call 'make' again to start system build."; \ + exit 0; \ + fi; \ + if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + SWITCHES="$(SWITCHES)" \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ + INSTALLEMACSLISPPATH=$(INSTALLEMACSLISPPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) all; \ + fi + ++install: + @-if [ ! -f .configured ]; \ + then \ + echo; echo "Initial build of shapeTools on this machine."; \ + ./shape_conf.sh `pwd`; \ + echo; echo "Got it ! Now call 'make install' again to start system build and installation."; \ + exit 0; \ + fi; \ + if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + SWITCHES="$(SWITCHES)" \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ + INSTALLEMACSLISPPATH=$(INSTALLEMACSLISPPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + SWITCHES="$(SWITCHES)" \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ + INSTALLEMACSLISPPATH=$(INSTALLEMACSLISPPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) clean; \ + fi --- shapetools-1.4pl6.orig/TODO +++ shapetools-1.4pl6/TODO @@ -0,0 +1,56 @@ +shape_conf.sh: Flags in Makefile ersetzen: + + SHLIBCFLAGS = -DPIC -fPIC + SHLIBLD = /usr/ccs/bin/ld -G -z text + SHLIBSUFFIX = .so + SHLIBLOCALLDFLAGS = -L$(LOCALLIBPATH) -R$(LOCALLIBPATH) + SHLIBINSTALLLDFLAGS = -L$(INSTALLLIBPATH) -R$(INSTALLLIBPATH) + + +in jedes Makefile einfuegen: + %.pic_o: %.c + $(COMPILE).c $< $(OUTPUT_OPTION) + + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + +in Makfiles fuer die drei Bibliotheken: + SHLIBVERSION bestimmen. Wie? + SHLIBNAME bestimmen; haengt vom System ab. am besten autoconf ... + +---------------------------------------------------------------------------- +autoconf: + in Makefiles zu ersetzen + +BASE +HOSTTYPE +HOSTSYSTEM +INSTALLBASE +CC +MAKECFLAGS +MAKLDFLAGS +SWITCHES + +ATFSVERSION + +DOLIBRARIES +DOSHAREDLIBS +DOEMACSLISP + +SYSLIBS +LOCALLIBS +LINTLIBS + +SHLIBCFLAGS = -DPIC -fpic +SHLIBLD = /usr/ccs/bin/ld -G -z text +SHLIBSUFFIX = .so +SHLIBLOCALLDFLAGS = -L$(LOCALLIBPATH) -R$(LOCALLIBPATH) +SHLIBINSTALLLDFLAGS = -L$(INSTALLLIBPATH) -R$(INSTALLLIBPATH) + +SHLIBNAME +SHLIBTARGET + +im toplevel-Makfile: SUBSYSTEMS --- shapetools-1.4pl6.orig/configure +++ shapetools-1.4pl6/configure @@ -0,0 +1,1392 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help +Build the library as a shared library" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=src/atfs/afarchive.c + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + +BASE=`pwd` + + +#-------------------------------------------------------------------- +# Find the compiler +#-------------------------------------------------------------------- +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:537: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:567: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:618: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:650: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 661 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:692: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:697: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:725: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:757: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + + +#-------------------------------------------------------------------- +# Find some programs +#-------------------------------------------------------------------- +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:843: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:871: checking whether ln -s works" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +# configuration + +subsystems= + + +DOLIBRARIES=yes +DOSHAREDLIBS=yes +DOEMACSLISP=yes + + + + + +SYSLIBS= +LOCALLIBS= +LINTLIBS= + + + + +#-------------------------------------------------------------------- +# Header checks +#-------------------------------------------------------------------- +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:916: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + + + +#-------------------------------------------------------------------- +# Make a shared library? +#-------------------------------------------------------------------- +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + SHLIBTARGET='lib$(LIBNAME).so.$(SHLIBVERSION)' +else + SHLIBTARGET= +fi + + + +SHLIBCFLAGS='-DPIC -fPIC' +SHLIBLD='/usr/ccs/bin/ld -G -z text' + +# Flags to pass to $(CC) for making a shared library +#CFLAGS_SHAREDLIB_GNU = \ +# -shared -Wl,-soname,lib$(LIBRARY_NAME).so.$(MAJOR_VERSION) +#CFLAGS_SHAREDLIB_SOLARIS = -G +#CFLAGS_SHAREDLIB = @CFLAGS_SHAREDLIB@ +SHLIBLD='/usr/ccs/bin/ld -G -z text -h' +SHLIBSUFFIX='so' +SHLIBLOCALLDFLAGS='-R$(LOCALLIBPATH)' +SHLIBINSTALLLDFLAGS='-R$(INSTALLLIBPATH)' + +SHLIBCFLAGS='-DPIC -fPIC' +SHLIBLD='gcc -shared' +SHLIBSUFFIX='so' +SHLIBLOCALLDFLAGS= +SHLIBINSTALLLDFLAGS= + +#LOCALLIBS='$(STATICLOCALLIBS)' +LOCALLIBS='$(SHAREDLOCALLIBS)' + + + + + + + + +#-------------------------------------------------------------------- +# What flags to pass for making a shared library? +# xxx This should be smarter and more general +#-------------------------------------------------------------------- + + + + +shapehostsystem=s_sol_2 +shapehosttype=sol2 +shapehostsystem=s_linux +shapehosttype=linux + + + +# Preprocessor switches. (eg. -DDEBUG, -DSYSLOG) +SWITCHES='-DATFS_OWN_LOCKING' + + +# get these automatically from the release files ... +# src/atfs/af_version.c src/atfstk/version.c src/sttk/sttk_version.c + +ATFSVERSION=1.71 +ATFSTKVERSION=7.0 +STTKVERSION=1.7 + + + + +set -x +if test "x$MAKECFLAGS" = x; then + MAKECFLAGS='-W -Wall -O2 -g' +fi +if test "x$MAKELDFLAGS" = x; then + MAKELDFLAGS= +fi +set +x + + + + + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +cat > conftest.defs <<\EOF +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs + + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir + +trap 'rm -fr `echo "Makefile src/atfs/Makefile src/sttk/Makefile src/atfstk/Makefile + src/shape/Makefile src/vc/Makefile + src/vc/atfsit/Makefile src/vc/rcs2atfs/Makefile + src/vc/retrv/Makefile src/vc/save/Makefile src/vc/scripts/Makefile + src/vc/vadm/Makefile src/vc/vfind/Makefile src/vc/vl/Makefile + src/rms/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@BASE@%$BASE%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g +s%@RANLIB@%$RANLIB%g +s%@LN_S@%$LN_S%g +s%@subsystems@%$subsystems%g +s%@DOLIBRARIES@%$DOLIBRARIES%g +s%@DOSHAREDLIBS@%$DOSHAREDLIBS%g +s%@DOEMACSLISP@%$DOEMACSLISP%g +s%@SYSLIBS@%$SYSLIBS%g +s%@LOCALLIBS@%$LOCALLIBS%g +s%@LINTLIBS@%$LINTLIBS%g +s%@SHLIBTARGET@%$SHLIBTARGET%g +s%@SHLIBCFLAGS@%$SHLIBCFLAGS%g +s%@SHLIBLD@%$SHLIBLD%g +s%@SHLIBSUFFIX@%$SHLIBSUFFIX%g +s%@SHLIBLOCALLDFLAGS@%$SHLIBLOCALLDFLAGS%g +s%@SHLIBINSTALLLDFLAGS@%$SHLIBINSTALLLDFLAGS%g +s%@CFLAGS_SHAREDLIB@%$CFLAGS_SHAREDLIB%g +s%@shapehostsystem@%$shapehostsystem%g +s%@shapehosttype@%$shapehosttype%g +s%@SWITCHES@%$SWITCHES%g +s%@ATFSVERSION@%$ATFSVERSION%g +s%@ATFSTKVERSION@%$ATFSTKVERSION%g +s%@STTKVERSION@%$STTKVERSION%g +s%@MAKECFLAGS@%$MAKECFLAGS%g +s%@MAKELDFLAGS@%$MAKELDFLAGS%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + --- shapetools-1.4pl6.orig/configure.in +++ shapetools-1.4pl6/configure.in @@ -0,0 +1,148 @@ +# configure.in for ShapeTools +# Process this file with autoconf to produce a configure script. +# +# $__Header$ + +AC_INIT(src/atfs/afarchive.c) + +BASE=`pwd` +AC_SUBST(BASE) + +#-------------------------------------------------------------------- +# Find the compiler +#-------------------------------------------------------------------- +AC_PROG_CC +AC_PROG_CPP + +#-------------------------------------------------------------------- +# Find some programs +#-------------------------------------------------------------------- +dnl AC_PROG_INSTALL +AC_PROG_RANLIB +AC_LN_S + +# configuration + +subsystems= +AC_SUBST(subsystems) + +DOLIBRARIES=yes +DOSHAREDLIBS=yes +DOEMACSLISP=yes +AC_SUBST(DOLIBRARIES) +AC_SUBST(DOSHAREDLIBS) +AC_SUBST(DOEMACSLISP) + + +dnl SYSLIBS='-lnsl -lgen' +dnl SYSLIBS=-lc +SYSLIBS= +LOCALLIBS= +LINTLIBS= +AC_SUBST(SYSLIBS) +AC_SUBST(LOCALLIBS) +AC_SUBST(LINTLIBS) + +#-------------------------------------------------------------------- +# Header checks +#-------------------------------------------------------------------- +AC_HEADER_STDC +dnl AC_CHECK_HEADERS(string.h memory.h) + +dnl checks for typedefs +dnl checks for structures +dnl checks for compiler characteristics + +#-------------------------------------------------------------------- +# Make a shared library? +#-------------------------------------------------------------------- +AC_ARG_ENABLE(shared, Build the library as a shared library, + SHLIBTARGET='lib$(LIBNAME).so.$(SHLIBVERSION)', + SHLIBTARGET=) +AC_SUBST(SHLIBTARGET) + +SHLIBCFLAGS='-DPIC -fPIC' +SHLIBLD='/usr/ccs/bin/ld -G -z text' + +# Flags to pass to $(CC) for making a shared library +#CFLAGS_SHAREDLIB_GNU = \ +# -shared -Wl,-soname,lib$(LIBRARY_NAME).so.$(MAJOR_VERSION) +#CFLAGS_SHAREDLIB_SOLARIS = -G +#CFLAGS_SHAREDLIB = @CFLAGS_SHAREDLIB@ +SHLIBLD='/usr/ccs/bin/ld -G -z text -h' +SHLIBSUFFIX='so' +SHLIBLOCALLDFLAGS='-R$(LOCALLIBPATH)' +SHLIBINSTALLLDFLAGS='-R$(INSTALLLIBPATH)' + +SHLIBCFLAGS='-DPIC -fPIC' +SHLIBLD='gcc -shared' +SHLIBSUFFIX='so' +SHLIBLOCALLDFLAGS= +SHLIBINSTALLLDFLAGS= + +#LOCALLIBS='$(STATICLOCALLIBS)' +LOCALLIBS='$(SHAREDLOCALLIBS)' +AC_SUBST(LOCALLIBS) + +AC_SUBST(SHLIBCFLAGS) +AC_SUBST(SHLIBLD) +AC_SUBST(SHLIBSUFFIX) +AC_SUBST(SHLIBLOCALLDFLAGS) +AC_SUBST(SHLIBINSTALLLDFLAGS) + +#-------------------------------------------------------------------- +# What flags to pass for making a shared library? +# xxx This should be smarter and more general +#-------------------------------------------------------------------- +dnl AC_CHECKING(for flags to use when making a shared lib...) +dnl if ($srcdir/config.guess | grep solaris); then +dnl CFLAGS_SHAREDLIB='$(CFLAGS_SHAREDLIB_SOLARIS)' +dnl else +dnl CFLAGS_SHAREDLIB='$(CFLAGS_SHAREDLIB_GNU)' +dnl fi + +AC_SUBST(CFLAGS_SHAREDLIB) + +dnl checks for library functions +dnl checks for system services + +shapehostsystem=s_sol_2 +shapehosttype=sol2 +shapehostsystem=s_linux +shapehosttype=linux +AC_SUBST(shapehostsystem) +AC_SUBST(shapehosttype) + +# Preprocessor switches. (eg. -DDEBUG, -DSYSLOG) +dnl SWITCHES='-DSYSLOG -DATFS_OWN_LOCKING' +SWITCHES='-DATFS_OWN_LOCKING' +AC_SUBST(SWITCHES) + +# get these automatically from the release files ... +# src/atfs/af_version.c src/atfstk/version.c src/sttk/sttk_version.c + +ATFSVERSION=1.71 +ATFSTKVERSION=7.0 +STTKVERSION=1.7 +AC_SUBST(ATFSVERSION) +AC_SUBST(ATFSTKVERSION) +AC_SUBST(STTKVERSION) + +if test "x$MAKECFLAGS" = x; then + MAKECFLAGS='-W -Wall -O2 -g' +fi +if test "x$MAKELDFLAGS" = x; then + MAKELDFLAGS= +fi + + +AC_SUBST(CC) +AC_SUBST(MAKECFLAGS) +AC_SUBST(MAKELDFLAGS) + +AC_OUTPUT(Makefile src/atfs/Makefile src/sttk/Makefile src/atfstk/Makefile + src/shape/Makefile src/vc/Makefile + src/vc/atfsit/Makefile src/vc/rcs2atfs/Makefile + src/vc/retrv/Makefile src/vc/save/Makefile src/vc/scripts/Makefile + src/vc/vadm/Makefile src/vc/vfind/Makefile src/vc/vl/Makefile + src/rms/Makefile) --- shapetools-1.4pl6.orig/configure.scan +++ shapetools-1.4pl6/configure.scan @@ -0,0 +1,43 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(src/atfs/afarchive.c) + +dnl Checks for programs. +AC_PROG_CXX +AC_PROG_AWK +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_RANLIB + +dnl Checks for libraries. +dnl Replace `main' with a function in -lgen: +AC_CHECK_LIB(gen, main) +dnl Replace `main' with a function in -lnsl: +AC_CHECK_LIB(nsl, main) + +dnl Checks for header files. +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h syslog.h unistd.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_UID_T +AC_TYPE_MODE_T +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_STRUCT_TM + +dnl Checks for library functions. +AC_TYPE_GETGROUPS +AC_PROG_GCC_TRADITIONAL +AC_FUNC_MEMCMP +AC_TYPE_SIGNAL +AC_FUNC_UTIME_NULL +AC_FUNC_VFORK +AC_CHECK_FUNCS(getcwd gethostname getwd mkdir mktime re_comp regcmp strdup) + +AC_OUTPUT(src/vc/vfind/Makefile src/sttk/Makefile src/patches/Makefile src/vc/vl/Makefile src/atfstk/Makefile src/atfs/Makefile src/vc/rcs2atfs/Makefile src/vc/scripts/Makefile src/vc/vadm/Makefile src/shape/Makefile src/interface/Makefile src/rms/Makefile src/vc/atfsit/Makefile src/vc/save/Makefile src/vc/Makefile Makefile src/vc/retrv/Makefile) --- shapetools-1.4pl6.orig/debian/README.Debian +++ shapetools-1.4pl6/debian/README.Debian @@ -0,0 +1,31 @@ +shapetools for DEBIAN +---------------------- + +All documentation in /usr/share/doc/shapetools. + +A first debianized shapeTools package. It should work ... Most of the +patches to the shape mailing list are applied. These patches should be +reintegrated into the upstream sources, but I believe the authors have +lost interest ... + +Some Debian specifics: + +- shapeTools is split into Debian packages atfs, atfs-dev, + shapetools (Binaries) and shapetools-tutorial. + +- If an environment variable ATFS_DOMAIN is set, this one is + taken. + +- an AtFS'ized grep-2.0 is included. + +On my TODO list. + +- add tcl-atfs and python-atfs to the package. + +- emacs mode installation. + +- how can shared libraries be built, such that the Makefiles are + usable with shape _and_ make? + + +Matthias Klose , Fri, 4 Sep 1998 15:18:43 +0200 --- shapetools-1.4pl6.orig/debian/changelog +++ shapetools-1.4pl6/debian/changelog @@ -0,0 +1,97 @@ +shapetools (1.4pl6-14) unstable; urgency=medium + + * Bump debhelper and standards versions. + + -- Matthias Klose Thu, 01 Feb 2018 09:23:44 +0100 + +shapetools (1.4pl6-13) unstable; urgency=medium + + * Bump debhelper level to 5. Closes: #800249. + + -- Matthias Klose Mon, 12 Oct 2015 01:08:56 +0200 + +shapetools (1.4pl6-12) unstable; urgency=medium + + * Update standards version. + * Fix some lintian warnings. + * Build using dpkg-buildflags. + + -- Matthias Klose Sat, 15 Aug 2015 10:25:36 +0200 + +shapetools (1.4pl6-11) unstable; urgency=low + + * Fix build failure with eglibc-2.10. Closes: #552823. + + -- Matthias Klose Thu, 31 Dec 2009 16:59:46 +0100 + +shapetools (1.4pl6-10) unstable; urgency=low + + * Fix build error with glibc-2.7 on amd64. Closes: #454875. + * Fix some lintian warnings. + + -- Matthias Klose Sat, 08 Dec 2007 08:08:03 +0000 + +shapetools (1.4pl6-9) unstable; urgency=low + + * Fix shapetools package dependency. + * Add watch file. + + -- Matthias Klose Sun, 19 Sep 2004 20:22:19 +0200 + +shapetools (1.4pl6-8) unstable; urgency=low + + * Fix implicit pointer conversions (closes: #226648). + + -- Matthias Klose Thu, 8 Jan 2004 07:02:12 +0100 + +shapetools (1.4pl6-7) unstable; urgency=low + + * Fix vp(1) man page (closes: #210618). + * Improve package description (closes: #209429). + * Add missing man pages. + * Move shared libraries to its own package (closes: #145888). + + -- Matthias Klose Mon, 22 Sep 2003 22:25:32 +0200 + +shapetools (1.4pl6-6) unstable; urgency=low + + * Add symlinks for all names in man pages (closes: #99552, #99539). + + -- Matthias Klose Sat, 21 Jul 2001 21:00:58 +0200 + +shapetools (1.4pl6-5) unstable; urgency=low + + * Recompiled with glibc-2.2. + * Updated standards version. + * Fix build failure (#84589). + + -- Matthias Klose Fri, 13 Apr 2001 01:31:40 +0200 + +shapetools (1.4pl6-4) unstable; urgency=low + + * usr/doc -> usr/share/doc transition. + * Install man pages in /zsr/share/man. + + -- Matthias Klose Sun, 5 Dec 1999 18:26:46 +0100 + +shapetools (1.4pl6-3) frozen unstable; urgency=low + + * Link shared libraries against libc. + * debian/control: Fix typo. + + -- Matthias Klose Thu, 26 Nov 1998 22:40:11 +0200 + +shapetools (1.4pl6-2) frozen unstable; urgency=low + + * Changed config.h to acconfig.h in _all_ source files (fixes #28185), + so that the package can be compiled without installed atfs-dev. + * Use cc instead of egcc for compiling. + + -- Matthias Klose Mon, 19 Oct 1998 15:25:52 +0200 + +shapetools (1.4pl6-1) unstable; urgency=low + + * Initial Release. + * Applied various patches collected ... + + -- Matthias Klose Fri, 4 Sep 1998 15:18:43 +0200 --- shapetools-1.4pl6.orig/debian/compat +++ shapetools-1.4pl6/debian/compat @@ -0,0 +1 @@ +9 --- shapetools-1.4pl6.orig/debian/control +++ shapetools-1.4pl6/debian/control @@ -0,0 +1,65 @@ +Source: shapetools +Section: devel +Priority: optional +Maintainer: Matthias Klose +Standards-Version: 4.1.3 +Build-Depends: debhelper (>= 9) + +Package: shapetools +Section: devel +Architecture: any +Depends: atfs (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Configuration and Release management using AtFS + ShapeTools is a collection of programs to support software + configuration management in an UNIX environment. It consists of a set + of version and attribute control commands, and a configuration + interpreter and build tool ("shape"). The toolkit is integrated on top + of the Attributed File System (AtFS). + . + ShapeTools is designed to live meaningfully together + with any other UNIX tool operating on regular files. This distribution + also contains a prototype for a comprehensive change control and + release management system designed to manage the evolution of system + releases in multi programmer software development efforts. +Homepage: http://swt.cs.tu-berlin.de/~shape/index.html + +Package: atfs +Section: devel +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Attributed File System (AtFS) + AtFS is a storage system supporting multiple versions of files and + associating an arbitrary number of application defined attributes + of the form "name=value" with each version. AtFS comes as a function + library that is meant as an extension to the UNIX file system. It does + this without the need for kernel modifications and without imposing any + restrictions to existing file system applications. It is part of ShapeTools, + a software configuration management system. +Homepage: http://swt.cs.tu-berlin.de/~shape/index.html + +Package: libatfs1 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Attributed File System (AtFS runtime libraries) + AtFS is a storage system supporting multiple versions of files and + associating an arbitrary number of application defined attributes + of the form "name=value" with each version. It is part of ShapeTools, a + software configuration management system. + . + This package contains the runtime libararies. +Homepage: http://swt.cs.tu-berlin.de/~shape/index.html + +Package: atfs-dev +Section: libdevel +Architecture: any +Depends: atfs (= ${binary:Version}), ${misc:Depends} +Description: Attributed File System (AtFS development libraries) + AtFS is a storage system supporting multiple versions of files and + associating an arbitrary number of application defined attributes + of the form "name=value" with each version. It is part of ShapeTools, a + software configuration management system. + . + This package contains the development files needed to compile and link + programs with AtFS. +Homepage: http://swt.cs.tu-berlin.de/~shape/index.html --- shapetools-1.4pl6.orig/debian/copyright +++ shapetools-1.4pl6/debian/copyright @@ -0,0 +1,75 @@ +This package was debianized by Matthias Klose doko@cs.tu-berlin.de +on Fri, 4 Sep 1998 15:18:43 +0200. + +It was downloaded from + ftp://ftp.cs.tu-berlin.de/pub/local/shapeTools/shapeTools-1.4pl6.tar.gz + +Note: You can find the tutorial in the separate shapetools-tutorial package. + +Copyright: + + ShapeTools Public License (Version 4.0, June 1993) + ------------------------------------------------- + + Copyright (c) 1992,1993 by Andreas Lampen and Axel Mahler. + + You may produce verbatim copies of this license document and + distribute them, but you are not allowed to change this document. + The "NO WARRANTY" part of this document is taken from the GNU + General Public License. + +0) This license applies to all parts of the shape toolkit (ShapeTools). +Note the special regulations for the tutorial expressed in paragraph 2. + +1) Permission is granted to use, copy, modify, or distribute any part +of ShapeTools, except the tutorial, as long as this is done without +asking for charge, and provided that the copyright notice is retained +as part of the source files. Additionally, this license document has +to be included in any distributed copy of any part of the system. You +may charge a distribution fee for the physical act of transferring a +copy, and you may at your option offer warranty protection in exchange +for a fee. + +2) The tutorial included in the ShapeTools distribution +("tutorial/tutorial.ps") may *not* be modified. It may *only* be +distributed as a whole. You are not allowed to take any excerpts from +it. When not contradicting to the limitations expressed in this +paragraph, all other regulations in this document apply to the +tutorial too. + +-------------------- +This part is + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + NO WARRANTY + + BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +-------------------- + +Direct questions to: Tech. Univ. Berlin + "ShapeTools" + Secr. FR 5-6 + Franklinstr. 28/29 + D-10587 Berlin, Germany + + E-mail: shape@cs.tu-berlin.de --- shapetools-1.4pl6.orig/debian/cphist.1 +++ shapetools-1.4pl6/debian/cphist.1 @@ -0,0 +1,15 @@ +.TH CPHIST 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +cphist \- copy an AtFS history to another directory +.SH SYNOPSIS +.PP +\fBcphist\fP \fIhistory-name\fP \fIdestination-dir\fP +.PP +.SH "DESCRIPTION" +.PP +.B cphist +copies an AtFS history to another directory. +.SH "SEE ALSO" +shape_RMS(1), atfsrepair(1), rmhist(1) --- shapetools-1.4pl6.orig/debian/lastrelease.1 +++ shapetools-1.4pl6/debian/lastrelease.1 @@ -0,0 +1,20 @@ +.TH LASTRELEASE 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +lastrelease \- print information about last release of a system managed withs shapeTools +.SH SYNOPSIS +.PP +\fBlastrelease\fP [ \fI-s\fP ] +.PP +.SH "DESCRIPTION" +.PP +.B lastrelease +prints essential information about the last release of a (sub-)system +managed with the shapeTools release management system (RMS). +.SH OPTIONS +.TP +-s +print a short description only. +.SH "SEE ALSO" +vl(1) --- shapetools-1.4pl6.orig/debian/rmhist.1 +++ shapetools-1.4pl6/debian/rmhist.1 @@ -0,0 +1,28 @@ +.TH RMHIST 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +rmhist \- remove an AtFS history +.SH SYNOPSIS +.PP +\fBcphist\fP [ \fI-f\fP ] [ \fI-h\fP ] [ \fI-q\fP ] [ \fI-v\fP ] \fInames\fP +.PP +.SH "DESCRIPTION" +.PP +.B rmhist +removes an AtFS history. +.SH OPTIONS +.TP +-f +force removal of history. +.TP +-h +print usage string. +.TP +-q +quiet operation. +.TP +-v +print version info, then exit. +.SH "SEE ALSO" +shape_RMS(1), cphist(1) --- shapetools-1.4pl6.orig/debian/rules +++ shapetools-1.4pl6/debian/rules @@ -0,0 +1,377 @@ +#! /usr/bin/make -f +# -*- mode: makefile -*- +# Made with the iad of dh_make, by Craig Small +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# Also some stuff taken from debmake scripts, by Cristopt Lameter. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +export SHELL = /bin/bash + +p_shape = shapetools +p_atfslib = libatfs1 +p_atfs = atfs +p_atfsdev = atfs-dev + +d = debian/tmp +d_shape = debian/$(p_shape) +d_atfslib = debian/$(p_atfslib) +d_atfs = debian/$(p_atfs) +d_atfsdev = debian/$(p_atfsdev) + +dh_compat2 := $(shell dpkg --compare-versions "$$(dpkg-query -f '$${Version}' -W debhelper)" lt 9.20150811ubuntu2 && echo DH_COMPAT=2) + +dirs_shape = \ + usr/share/doc \ + usr/bin \ + usr/lib/shape \ + usr/include \ + usr/share/man/{man1,man3,man5,man7} +files_shape = \ + usr/bin/{lastrelease,sfind,shape} \ + usr/share/man/man1/{lastrelease,sfind,shape} \ + usr/lib/shape/* + +dirs_atfslib = \ + usr/share/doc/$(p_atfslib) \ + usr/lib/shape \ + usr/share/man/man7 +files_atfslib = \ + usr/lib/lib*.so.* \ + usr/lib/shape/BindRules \ + usr/share/man/man7/bindrules.7 + +dirs_atfs = \ + usr/share/doc/$(p_atfs) \ + usr/lib/shape \ + usr/share/man/{man1,man5} +files_atfs = \ + usr/bin/{vbind,vcat,vdiff,vgrep,vegrep,vfgrep,vfind,vl,vlog,vp} \ + usr/bin/{retrv,Save,save,vsave} \ + usr/bin/{accs,frze,publ,sbmt,vadm,vattr,vrm} \ + usr/bin/{atfsit,atfsrepair,cacheadm,cphist,mkatfs,rmhist} \ + usr/bin/{rcs2atfs,utime} \ + usr/share/man/man1/{vbind,vcat,vdiff,vgrep,vegrep,vfgrep,vfind,vl,vlog,vp}.1 \ + usr/share/man/man1/{retrv,Save,save,vsave}.1 \ + usr/share/man/man1/{accs,frze,publ,sbmt,vadm,vattr,vrm}.1 \ + usr/share/man/man1/{atfsit,atfsrepair,cacheadm,mkatfs}.1 \ + usr/share/man/man1/{rcs2atfs,utime}.1 \ + usr/share/man/man1/{cphist,rmhist}.1 + +dirs_atfsdev = \ + usr/share/doc \ + usr/lib \ + usr/include \ + usr/share/man/man3 +files_atfsdev = \ + usr/lib/lib*.a \ + usr/lib/lib*.so \ + usr/include/* \ + usr/share/man/man3 + +v_atfs = 1.71 +v_atfstk= 7.0 +v_sttk = 1.7 + +CC := gcc +cflags := $(shell dpkg-buildflags --get CFLAGS; dpkg-buildflags --get CPPFLAGS) \ + -fno-strict-aliasing \ + -Wno-unused-result -Wno-implicit-int -Wno-discarded-qualifiers \ + -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +ldflags := $(shell dpkg-buildflags --get LDFLAGS) + +build-arch: build +build-indep: build +build: build-stamp build-grep-stamp +build-stamp: + dh_testdir + rm -f build-stamp + -chmod a+x configure + MAKECFLAGS="$(cflags)" \ + MAKELDFLAGS="$(ldflags)" \ + CC=$(CC) ./configure --prefix=/usr --enable-shared + if [ -z "$$LD_LIBRARY_PATH" ]; then \ + LD_LIBRARY_PATH="$(CURDIR)/lib" $(MAKE); \ + else \ + LD_LIBRARY_PATH="$(CURDIR)/lib:$$LD_LIBRARY_PATH" $(MAKE); \ + fi + touch build-stamp + +build-grep-stamp: + dh_testdir + rm -f build-grep-stamp + cd vgrep-2.0 && CC=$(CC) ./configure --prefix/usr + LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(CURDIR)/lib \ + $(MAKE) -C vgrep-2.0 \ + SHAPETOOLS=$(CURDIR) \ + MAKECFLAGS="$(cflags)" \ + MAKELDFLAGS="$(ldflags)" + touch build-grep-stamp + +clean: + dh_testdir + dh_testroot + rm -f *-stamp + $(MAKE) clean + $(MAKE) doclean + $(MAKE) -C vgrep-2.0 -f Makefile.in distclean + rm -f config.{cache,log,status} + -find src -name '*.so*' | xargs rm -f + dh_clean + +install: install-stamp first-move-stamp +install-stamp: build-stamp build-grep-stamp + dh_testdir + dh_testroot + dh_prep + mkdir -p $(foreach dir, $(dirs_shape), $(d)/$(dir)) + dh_installdirs -p$(p_shape) $(dirs_shape) + dh_installdirs -p$(p_atfs) $(dirs_atfs) + dh_installdirs -p$(p_atfslib) $(dirs_atfslib) + dh_installdirs -p$(p_atfsdev) $(dirs_atfsdev) + if [ -z "$$LD_LIBRARY_PATH" ]; then \ + LD_LIBRARY_PATH=$(CURDIR)/lib \ + $(MAKE) install INSTALLBASE=$(CURDIR)/$(d)/usr \ + INSTALLMANPATH=$(CURDIR)/$(d)/usr/share/man; \ + else \ + LD_LIBRARY_PATH=$(CURDIR)/lib:$$LD_LIBRARY_PATH \ + $(MAKE) install INSTALLBASE=$(CURDIR)/$(d)/usr \ + INSTALLMANPATH=$(CURDIR)/$(d)/usr/share/man; \ + fi + ( \ + set -e; \ + cd $(d)/usr/bin; \ + ln -sf save Save; \ + ln -sf save vsave; \ + ln -sf vl vlog; \ + ln -sf retrv vcat; \ + for i in accs frze publ sbmt vattr vrm; do \ + ln -sf vadm $$i; \ + done; \ + ) + ( \ + set -e; \ + cd $(d)/usr/share/man/man1; \ + ln -sf save.1 Save.1; \ + ln -sf save.1 vsave.1; \ + ln -sf vl.1 vlog.1; \ + ln -sf retrv.1 vcat.1; \ + for i in accs frze publ sbmt vattr vrm; do \ + ln -sf vadm.1 $$i.1; \ + done; \ + ) + ( \ + set -e; \ + cd $(d)/usr/share/man/man3; \ + ln -sf af_attrs.3 af_allattrs.3; \ + ln -sf af_attrs.3 af_freeattr.3; \ + ln -sf af_attrs.3 af_freeattrbuf.3; \ + ln -sf af_attrs.3 af_isstdval.3; \ + ln -sf af_attrs.3 af_retattr.3; \ + ln -sf af_attrs.3 af_retnumattr.3; \ + ln -sf af_attrs.3 af_rettimeattr.3; \ + ln -sf af_attrs.3 af_retuserattr.3; \ + ln -sf af_attrs.3 af_setattr.3; \ + ln -sf af_cache.3 af_cachesize.3; \ + ln -sf af_cache.3 af_savecache.3; \ + ln -sf af_error.3 af_cleanup.3; \ + ln -sf af_error.3 af_errmsg.3; \ + ln -sf af_error.3 af_errno.3; \ + ln -sf af_error.3 af_perror.3; \ + ln -sf af_files.3 af_close.3; \ + ln -sf af_files.3 af_crkey.3; \ + ln -sf af_files.3 af_establish.3; \ + ln -sf af_files.3 af_open.3; \ + ln -sf af_files.3 af_restore.3; \ + ln -sf af_files.3 af_rm.3; \ + ln -sf af_history.3 af_access.3; \ + ln -sf af_history.3 af_histories.3; \ + ln -sf af_lock.3 af_testlock.3; \ + ln -sf af_lock.3 af_unlock.3; \ + ln -sf af_misc.3 af_afname.3; \ + ln -sf af_misc.3 af_afpath.3; \ + ln -sf af_misc.3 af_aftype.3; \ + ln -sf af_misc.3 af_afuser.3; \ + ln -sf af_misc.3 af_setarchpath.3; \ + ln -sf af_protect.3 af_chauthor.3; \ + ln -sf af_protect.3 af_chmod.3; \ + ln -sf af_protect.3 af_chowner.3; \ + ln -sf af_retrieve.3 af_cachefind.3; \ + ln -sf af_retrieve.3 af_dropall.3; \ + ln -sf af_retrieve.3 af_dropkey.3; \ + ln -sf af_retrieve.3 af_dropset.3; \ + ln -sf af_retrieve.3 af_find.3; \ + ln -sf af_retrieve.3 af_getkey.3; \ + ln -sf af_retrieve.3 af_initattrs.3; \ + ln -sf af_sets.3 af_copyset.3; \ + ln -sf af_sets.3 af_diff.3; \ + ln -sf af_sets.3 af_initset.3; \ + ln -sf af_sets.3 af_intersect.3; \ + ln -sf af_sets.3 af_nrofkeys.3; \ + ln -sf af_sets.3 af_setaddkey.3; \ + ln -sf af_sets.3 af_setgkey.3; \ + ln -sf af_sets.3 af_setposrmkey.3; \ + ln -sf af_sets.3 af_setrmkey.3; \ + ln -sf af_sets.3 af_sortset.3; \ + ln -sf af_sets.3 af_subset.3; \ + ln -sf af_sets.3 af_union.3; \ + ln -sf af_transact.3 af_abort.3; \ + ln -sf af_transact.3 af_commit.3; \ + ln -sf af_transact.3 af_transaction.3; \ + ln -sf af_version.3 af_newgen.3; \ + ln -sf af_version.3 af_saverev.3; \ + ln -sf af_version.3 af_setbusy.3; \ + ln -sf af_version.3 af_sstate.3; \ + ln -sf af_version.3 af_svnum.3; \ + ln -sf atattribute.3 atAllAttrs.3; \ + ln -sf atattribute.3 atAttrName.3; \ + ln -sf atattribute.3 atAttrValue.3; \ + ln -sf atattribute.3 atFreeAttrs.3; \ + ln -sf atattribute.3 atRetAttr.3; \ + ln -sf atattribute.3 atSetAttr.3; \ + ln -sf atbind.3 atBindCache.3; \ + ln -sf atbind.3 atBindExpandMacro.3; \ + ln -sf atbind.3 atBindModeOption.3; \ + ln -sf atbind.3 atBindNoMsg.3; \ + ln -sf atbind.3 atBindOptions.3; \ + ln -sf atbind.3 atBindSet.3; \ + ln -sf atbind.3 atBindSetArgv.3; \ + ln -sf atbind.3 atBindTrace.3; \ + ln -sf atbind.3 atBindUsage.3; \ + ln -sf atbind.3 atBindVersion.3; \ + ln -sf atbind.3 atScanBinding.3; \ + ln -sf atbindrule.3 atBindAddRule.3; \ + ln -sf atbindrule.3 atBindDelRule.3; \ + ln -sf atbindrule.3 atBindDisplayErrors.3; \ + ln -sf atbindrule.3 atBindListRules.3; \ + ln -sf atbindrule.3 atBindRuleFile.3; \ + ln -sf atbindrule.3 atBindShowRules.3; \ + ln -sf atbindrule.3 atBindTestRule.3; \ + ln -sf atcache.3 atCacheKey.3; \ + ln -sf atcache.3 atSaveCache.3; \ + ln -sf atclass.3 atFileClassExt.3; \ + ln -sf atclass.3 atIsDerived.3; \ + ln -sf atexpand.3 atExpand.3; \ + ln -sf atexpand.3 atExpandAttrs.3; \ + ln -sf atlog.3 atSetComment.3; \ + ln -sf atlog.3 atUnlock.3; \ + ln -sf atnetwork.3 atLocalPath.3; \ + ln -sf atnetwork.3 atNetworkPath.3; \ + ln -sf atprint.3 atScanStatus.3; \ + ln -sf atprint.3 atWriteDate.3; \ + ln -sf atprint.3 atWriteMode.3; \ + ln -sf atprint.3 atWriteName.3; \ + ln -sf atprint.3 atWriteStatus.3; \ + ln -sf atread.3 atCloseExpand.3; \ + ln -sf atread.3 atOpenExpand.3; \ + ln -sf atread.3 atReadExpand.3; \ + ln -sf atuser.3 atScanUser.3; \ + ln -sf atuser.3 atUserName.3; \ + ln -sf atuser.3 atUserUid.3; \ + ln -sf atuser.3 atUserValid.3; \ + ln -sf atversion.3 atDelVersAlias.3; \ + ln -sf atversion.3 atGen.3; \ + ln -sf atversion.3 atRev.3; \ + ln -sf atversion.3 atSetVersAlias.3; \ + ln -sf atversion.3 atVno.3; \ + ln -sf stcall.3 stCallCmd.3; \ + ln -sf stcall.3 stCallCmdErrno.3; \ + ln -sf stcall.3 stCallEditor.3; \ + ln -sf stcall.3 stFindProgram.3; \ + ln -sf stparseargs.3 stParseArgs.3; \ + ln -sf stparseargs.3 stShortUsage.3; \ + ln -sf stsignal.3 stCatchSigs.3; \ + ln -sf stsignal.3 stCleanup.3; \ + ln -sf stsignal.3 stExit.3; \ + ln -sf stsignal.3 stInterruptAction.3; \ + ln -sf stsignal.3 stQuitAction.3; \ + ln -sf stsignal.3 stTermAction.3; \ + ln -sf ststring.3 stConvertPattern.3; \ + ln -sf ststring.3 stStrEnter.3; \ + ln -sf ststring.3 stStrtok.3; \ + ln -sf ststring.3 stSubstituteString.3; \ + ln -sf sttime.3 stMktime.3; \ + ln -sf sttime.3 stWriteTime.3; \ + ln -sf sttmpfiles.3 stRegisterFile.3; \ + ln -sf sttmpfiles.3 stRmRegisteredFiles.3; \ + ln -sf sttmpfiles.3 stTmpFile.3; \ + ln -sf sttmpfiles.3 stUnRegisterFile.3; \ + ln -sf sttransaction.3 stAbortThis.3; \ + ln -sf sttransaction.3 stThisTransaction.3; \ + ln -sf stuserio.3 stAskConfirm.3; \ + ln -sf stuserio.3 stGetFromStdin.3; \ + ln -sf stuserio.3 stGetTermWidth.3; \ + ln -sf stuserio.3 stLog.3; \ + ln -sf stuserio.3 stMessage.3; \ + ln -sf stuserio.3 stProgramName.3; \ + ln -sf stuserio.3 stQuietFlag.3; \ + ln -sf stuserio.3 stShutupFlag.3; \ + ) + ( \ + set -e; \ + cd $(d)/usr/share/man/man7; \ + for i in Makefile.tmpl Release.tmpl Shapefile.tmpl release.c.tmpl; do \ + ln -sf shape_tmpl.7 $$i.7; \ + done; \ + ) + cp -p debian/vp.1 $(d)/usr/share/man/man1/ + cp -p debian/cphist.1 $(d)/usr/share/man/man1/ + cp -p debian/rmhist.1 $(d)/usr/share/man/man1/ + cp -p debian/lastrelease.1 $(d)/usr/share/man/man1/ + chmod a-x $(d)/usr/lib/lib*.a + if [ -z "$$LD_LIBRARY_PATH" ]; then \ + LD_LIBRARY_PATH=$(CURDIR)/lib \ + $(MAKE) -C vgrep-2.0 install prefix=$(CURDIR)/$(d)/usr \ + mandir=$(CURDIR)/$(d)/usr/share/man/man1; \ + else \ + LD_LIBRARY_PATH=$(CURDIR)/lib:$$LD_LIBRARY_PATH \ + $(MAKE) -C vgrep-2.0 install prefix=$(CURDIR)/$(d)/usr \ + mandir=$(CURDIR)/$(d)/usr/share/man/man1; \ + fi + mv $(d)/usr/share/man/man1/grep.1 $(d)/usr/share/man/man1/vgrep.1 + ln -sf vgrep.1 $(d)/usr/share/man/man1/vegrep.1 + ln -sf vgrep.1 $(d)/usr/share/man/man1/vfgrep.1 + ln -sf vgrep $(d)/usr/bin/vegrep + ln -sf vgrep $(d)/usr/bin/vfgrep + touch install-stamp + +first-move-stamp: install-stamp + dh_testdir + dh_testroot + rm -f install-stamp + $(dh_compat2) dh_movefiles -p$(p_atfs) $(files_atfs) + $(dh_compat2) dh_movefiles -p$(p_atfslib) $(files_atfslib) + $(dh_compat2) dh_movefiles -p$(p_atfsdev) $(files_atfsdev) + (cd $(d); tar cf - .) | (cd $(d_shape); tar xf -) + touch first-move-stamp + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + + dh_installdocs -p$(p_atfslib) + dh_installdocs -p$(p_atfs) Questionnaire README SUPPORT TODO + ln -sf $(p_atfs) $(d_atfsdev)/usr/share/doc/$(p_atfsdev) + ln -sf $(p_atfs) $(d_shape)/usr/share/doc/$(p_shape) + dh_installchangelogs -p$(p_atfslib) + dh_installchangelogs -p$(p_atfs) CHANGES-1.4 + dh_strip -a -X.a + dh_compress -a + dh_fixperms -a + LD_LIBRARY_PATH=$(d_atfslib)/usr/lib:$$LD_LIBRARY_PATH \ + dh_makeshlibs -V -p$(p_atfslib) + dh_shlibdeps -a -L$(p_atfslib) -l $(d_atfslib)/usr/lib + -find debian -type d -empty -delete + dh_installdeb -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary --- shapetools-1.4pl6.orig/debian/substvars +++ shapetools-1.4pl6/debian/substvars @@ -0,0 +1 @@ +shlibs:Depends=libatfs1 (>= 1.4pl6-10), libc6 (>= 2.7-1) --- shapetools-1.4pl6.orig/debian/vp.1 +++ shapetools-1.4pl6/debian/vp.1 @@ -0,0 +1,21 @@ +.TH VP 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +vp \- page a revision of a file +.SH SYNOPSIS +.PP +\fBvp\fP [ \fIvcat options\fP ] \fIfiles\fP \&.\&.\&. +.PP +.SH "DESCRIPTION" +.PP +.B vp +retrieves a specified, previously saved version of the files from the +version object base and displays them using the pager program given in +the environment variable PAGER. +.SH OPTIONS +All options are interpreted as options for vcat(1). +.SH "SEE ALSO" +vcat(1), vbind(1) +.SH BUGS +Only options without argument supported. --- shapetools-1.4pl6.orig/include/afconfig.h +++ shapetools-1.4pl6/include/afconfig.h @@ -0,0 +1,402 @@ +/* Copyright (C) 1993,1994 by the author(s). + + This software is published in the hope that it will be useful, but + WITHOUT ANY WARRANTY for any part of this software to work correctly + or as described in the manuals. See the ShapeTools Public License + for details. + + Permission is granted to use, copy, modify, or distribute any part of + this software but only under the conditions described in the ShapeTools + Public License. A copy of this license is supposed to have been given + to you along with ShapeTools in a file named LICENSE. Among other + things, this copyright notice and the Public License must be + preserved on all copies. +*/ +/* + * AtFS -- Attribute Filesystem + * + * config.h -- system dependent definitions + * + * Author: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) + * + * $Header: config.h[7.1] Tue Aug 23 16:58:49 1994 andy@cs.tu-berlin.de frozen $ + */ + +/* do only once */ +#ifndef _af_defs_ +#define _af_defs_ + +/* if no explicit system type is defined */ +#if (!defined(s_aix) && !defined(s_hpux) && !defined(s_irix) && !defined(s_mach) && !defined(s_sunos_4) && !defined(s_sol_2) && !defined(s_svr_4) && !defined(s_ultrix) && !defined(s_linux)) +# define s_linux +#endif + +#ifdef __STDC__ +# define A(alist) alist +#else +# define A(alist) () +#endif + +/*===================== + * includes + *=====================*/ + + +/* POSIX include files */ +#include +#if defined(s_linux) +# include +#else +# include +#endif +#include +#include +#if !defined(s_irix) && !defined(s_linux) +#ifdef NULL +# undef NULL +#endif +#endif +#include +#include +#include +#include +#include +#include +#if defined(s_mach) +# include +# include +# include +# include +#else +# include +# include +# include +# include +# include +#endif + +/* system dependent includes */ +#if !defined(_POSIX_SOURCE) +# include +# include +#endif + +/* debugging */ +#ifdef DEBUG_MALLOC +#include "malloc.h" +#endif + +/*================================== + * constants and macros and types + *==================================*/ + +/*** general ***/ + +#define Sfunc_t int /* type of function argument to signal call */ +#define Sigret_t void /* return type of signal system call */ + +#if defined(s_aix) +# if defined(_POSIX_SOURCE) +# include +# include +# define NAME_MAX _D_NAME_MAX +# else +# define NAME_MAX MAXNAMLEN +# define MAXHOSTNAMELEN 32 +# endif +# define MAXDOMAIN 255 +# define NEED_MNTENT +# define vfork fork + +#elif defined(s_hpux) +# define MAXDOMAIN 255 +# define PATH_MAX MAXPATHLEN +# define NAME_MAX MAXNAMLEN +# define OPEN_MAX NOFILE +# define NEED_REGEX +# define HAS_MNTENT + +#elif defined(s_irix) +# define MAXDOMAIN 255 +# define vfork fork +# define HAS_MNTENT + +#elif defined(s_mach) +# define MAXDOMAIN 255 +# define PATH_MAX MAXPATHLEN +# define NAME_MAX MAXNAMLEN +# define OPEN_MAX NOFILE +# define NGROUPS_MAX NGROUPS +typedef unsigned short mode_t; +typedef int pid_t; +# define dirent direct +# define NO_SIGSET +# define NEED_GETCWD +# define NEED_STRDUP +# define NEED_UTIMBUF +# define HAS_MNTENT + +#elif defined(s_osf1) +# include +# include +# define MAXDOMAIN 255 +# define OPEN_MAX NOFILE +# define NEED_MNTENT + +#elif defined(s_sunos_4) +# if defined(_POSIX_SOURCE) +# define MAXDOMAIN 255 +# define MAXHOSTNAMELEN 64 +# define PATH_MAX 1024 +# define NAME_MAX 255 +# define OPEN_MAX 64 +# else +# define PATH_MAX MAXPATHLEN +# define NAME_MAX MAXNAMLEN +# define OPEN_MAX NOFILE +# endif +# define HAS_MNTENT + +#elif defined(s_svr_4) +# define MAXDOMAIN 255 +# define MAXHOSTNAMELEN 64 +# if defined(_POSIX_SOURCE) +# define NAME_MAX 512 +# define OPEN_MAX 64 +# else +# ifndef PATH_MAX +# define PATH_MAX MAXPATHLEN +# endif +# ifndef NAME_MAX +# define NAME_MAX MAXNAMLEN +# endif +# ifndef OPEN_MAX +# define OPEN_MAX NOFILE +# endif +# endif +# define NEED_REGEX +# define HAS_MNTTAB + +#elif defined(s_sol_2) +#include +# define MAXDOMAIN 255 +# define MAXHOSTNAMELEN 64 +# if defined(_POSIX_SOURCE) +# define NAME_MAX 512 +# define OPEN_MAX 64 +# else +# ifndef PATH_MAX +# define PATH_MAX MAXPATHLEN +# endif +# ifndef NAME_MAX +# define NAME_MAX MAXNAMLEN +# endif +# ifndef OPEN_MAX +# define OPEN_MAX NOFILE +# endif +# endif +# define HAS_MNTTAB + +#elif defined(s_linux) +# include +# include +# include +# define MAXDOMAIN 255 +# define HAS_MNTENT +# ifndef OPEN_MAX +# define OPEN_MAX NOFILE +# endif + +#elif defined(s_ultrix) +# define MAXDOMAIN 255 +# define NEED_MNTENT +# define NEED_STRDUP +#endif + +/*** mount table stuff ***/ + +#if defined(HAS_MNTENT) +# include +# define atMntent mntent +# define at_mnt_dir mnt_dir +# define at_mnt_fsname mnt_fsname +# define atSetmntent setmntent +# define atGetmntent getmntent +# define atEndmntent endmntent +#elif defined(HAS_MNTTAB) +# include +# define atMntent mnttab +# define at_mnt_dir mnt_mountp +# define at_mnt_fsname mnt_special +# define atSetmntent fopen +# define atEndmntent fclose + struct atMntent* atGetmntent A((FILE *file)); + +#else /* NEED_MNTENT */ + struct atMntent { + char *at_mnt_fsname; + char *at_mnt_dir; + char *at_mnt_type; + char *at_mnt_opts; + int at_mnt_freq; + int at_mnt_passno; + }; + + int atEndmntent A((FILE *file)); + struct atMntent* atGetmntent A((FILE *file)); + FILE* atSetmntent A((const char *path, const char *type)); +#endif + + +/*** specials ***/ + +#if defined(s_mach) +#define S_IRWXU 0000700 /* rwx------ */ +#define S_IRUSR 0000400 /* r-------- */ +#define S_IWUSR 0000200 /* -w------- */ +#define S_IXUSR 0000100 /* --x------ */ +#define S_IRWXG 0000070 /* ---rwx--- */ +#define S_IRGRP 0000040 /* ---r----- */ +#define S_IWGRP 0000020 /* ----w---- */ +#define S_IXGRP 0000010 /* -----x--- */ +#define S_IRWXO 0000007 /* ------rwx */ +#define S_IROTH 0000004 /* ------r-- */ +#define S_IWOTH 0000002 /* -------w- */ +#define S_IXOTH 0000001 /* --------x */ + +#define S_ISBLK(mode) ((mode & S_IFMT) == S_IFBLK) +#define S_ISCHR(mode) ((mode & S_IFMT) == S_IFCHR) +#define S_ISDIR(mode) ((mode & S_IFMT) == S_IFDIR) +#define S_ISFIFO(mode) ((mode & S_IFMT) == S_IFIFO) +#define S_ISREG(mode) ((mode & S_IFMT) == S_IFREG) + +#define WEXITSTATUS(a) ((a).w_T.w_Retcode) +#endif + +/*** own definitions ***/ +#define TYPE_MAX NAME_MAX +#define HOST_MAX MAXHOSTNAMELEN +#define DOMAIN_MAX MAXDOMAIN + +/*** obsolete definitions ***/ +#define MAXUSERNAMELEN 64 + +/*===================== + * types + *=====================*/ + +#if defined(s_mach) +#define Wait_t union wait +#else +#define Wait_t int /* type of argument for wait call */ +#endif + +#if defined(NEED_UTIMBUF) +struct utimbuf { + time_t actime; /* set the access time */ + time_t modtime; /* set the modification time */ +}; +#endif + +/*===================== + * prototypes + *=====================*/ + +/*** missing POSIX prototypes ***/ + +#if defined(s_aix) +#elif defined(s_mach) +void _exit A((int status)); +int access A((const char *path, int amode)); +int chdir A((const char *path)); +int chmod A((const char *path, mode_t mode)); +int chown A((const char *path, uid_t owner, gid_t group)); +int close A((int filedes)); +int creat A((const char *path, mode_t mode)); +int dup A((int filedes)); +int execve A((const char *path, const char *argv[], const char *envp[])); +int execvp A((const char *file, const char *argv[])); +int fcntl A((int filedes, int cmd, ...)); +FILE *fdopen A((int filedes, const char *type)); +int fileno A((FILE *stream)); +pid_t fork A((void)); +char *getcwd A((char *buf, size_t size)); +gid_t getegid A((void)); +uid_t geteuid A((void)); +int getgroups A((int gidsetsize, gid_t grouplist[])); +pid_t getpid A((void)); +pid_t getppid A((void)); +int isatty A((int filedes)); +int kill A((pid_t oid, int signal)); +int link A((const char *existing, const char *new)); +int mkdir A((const char *path, mode_t mode)); +int open A((const char *path, int oflag, ...)); +int pipe A((int filedes[2])); +int read A((int filedes, void *buf, unsigned int nbyte)); +unsigned int sleep A((unsigned int seconds)); +int tolower A((int c)); +mode_t umask A((mode_t cmask)); +int unlink A((const char *path)); +int utime A((const char *path, const struct utimbuf *times)); +int write A((int filedes, const void*buf, unsigned int nbyte)); +#elif defined(s_sunos_4) +int fflush A((FILE *stream)); +int fclose A((FILE *stream)); +int fprintf A((FILE *stream, const char *format, ...)); +int printf A((const char *format, ...)); +int fscanf A((FILE *stream, const char *format, ...)); +int fputs A((const char *s, FILE *stream)); +int fgetc A((FILE *stream)); +int fputc A((int c, FILE *stream)); +size_t fread A((void *ptr, size_t size, size_t nobj, FILE *stream)); +size_t fwrite A((const void *ptr, size_t size, size_t nobj, FILE *stream)); +void perror A((const char *s)); + +#ifndef DEBUG_MALLOC +void *memmove A((void *dest, const void *source, size_t len)); +void *memchr A((const void *string, int chr, size_t len)); +void *memset A((void *string, int c, size_t len)); +#endif + +time_t time A((time_t *timeptr)); +time_t mktime A((struct tm *timeptr)); + +int system A((const char *string)); +int tolower A((int c)); +#elif defined(s_svr_4) || defined(s_sol_2) +int tolower A((int c)); +#endif + +/*** non POSIX prototypes ***/ + +int openlog A((char *ident, int logopt, int facility)); +int syslog A((int priority, char *message, ...)); +int closelog A((void)); +FILE* popen A((const char *command, const char *mode)); +int pclose A((FILE *stream)); +#if (!defined(s_linux)) +int getdomainname A((char *name, int namelen)); +#endif +#if !defined(s_irix) +char* re_comp A((char *string)); +int re_exec A((char *string)); +#endif +char* strdup A((const char *string)); +int symlink A((const char *name1, const char *name2)); +#if (!defined(s_hpux) && !defined(s_svr_4) && !defined(s_sol_2) && !defined(s_irix)) +int ioctl A((int fd, int request, caddr_t arg)); +int vfork A((void)); +#if (!defined(s_linux) && !defined(s_sol_2)) +int getopt A((int argc, char **argv, char *optstring)); +#endif +#endif +#if (!defined(s_hpux) && !defined(s_linux)) +int gethostname A((char *name, int namelen)); +#endif + +/*** own prototypes ***/ + +void disableSig A((int signo)); +void enableSig A((void)); + +#endif /* _af_defs_ */ --- shapetools-1.4pl6.orig/make.sed +++ shapetools-1.4pl6/make.sed @@ -0,0 +1,62 @@ +/^BASE *=/s/.*/BASE = @BASE@/ +/^HOSTSYSTEM *=/s/.*/HOSTSYSTEM = @shapehostsystem@/ +/^HOSTTYPE *=/s/.*/HOSTTYPE = @shapehosttype@/ +/^SWITCHES *=/s/.*/SWITCHES = @SWITCHES@/ +/^# files, libraries and manuals/a\ +\ +prefix = $(INSTALLBASE)\ +exec_prefix = $(INSTALLBASE) + +/^INSTALLBASE *=/s/.*/INSTALLBASE = @prefix@/ +/^INSTALLBINPATH *=/s/.*/INSTALLBINPATH = @bindir@/ +/^INSTALLINCPATH *=/s/.*/INSTALLINCPATH = @includedir@/ +/^INSTALLLIBPATH *=/s/.*/INSTALLLIBPATH = @libdir@/ +/^INSTALLMANPATH *=/s/.*/INSTALLMANPATH = @mandir@/ +/^LIBTARGET *=/{ + s/.*/LIBTARGET = lib$(LIBNAME).a/ + i\ +LIBNAME = XXX + a\ +SHLIBVERSION = XXX\ +SHLIBTARGET = @SHLIBTARGET@ +} +/^LIBOBJECTS *=/,/^$/{ + /^$/a\ +SHLIBOBJECTS = $(LIBOBJECTS:.o=.pic_o)\ +\ +%.pic_o: %.c\ + $(CC) -c $(SHLIBCFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)\ + +} + +/^MAKECFLAGS *=/s/.*/MAKECFLAGS = @MAKECFLAGS@/ +/^MAKELDFLAGS *=/{ + s/.*/MAKELDFLAGS = @MAKELDFLAGS@/ + a\ +\ +SHLIBTARGET = @SHLIBTARGET@\ +SHLIBCFLAGS = @SHLIBCFLAGS@\ +SHLIBLD = @SHLIBLD@\ +SHLIBSUFFIX = @SHLIBSUFFIX@\ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@\ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ +} + +/^CC *=/s/.*/CC = @CC@/ +/^RANLIB *=/s/.*/RANLIB = @RANLIB@/ +/^SYSLIBS *=/s/.*/SYSLIB = @SYSLIBS@/ +/^LOCALLIBS *=/{ + s/.*/LOCALLIBS = @LOCALLIBS@/ + i\ +STATICLOCALLIBS = $(LOCALLIBPATH)/$(LIBTARGET)\ +SHAREDLOCALLIBS = $(LOCALLIBPATH)/$(SHLIBTARGET) + a\ +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lXXXX\ +\ +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lXXXX\ + +} + +/^LINTLIBS *=/s/.*/LINTLIBS = @LINTLIBS@/ + +/^targets: $(LIBTARGET)/s/\(\$(LIBTARGET)\)/\1 $(SHLIBTARGET)/ --- shapetools-1.4pl6.orig/man/man1/atfsit.1 +++ shapetools-1.4pl6/man/man1/atfsit.1 @@ -104,7 +104,7 @@ [1-9] Manual (digits 1 - 9) .fi .PP -If the environement variable ``ATFSDIR'' is present, then +If the environment variable ``ATFSDIR'' is present, then .I atfsit will attempt to make a link from it to ``AtFS'' in the current directory if the \-\fII\fP option is used and --- shapetools-1.4pl6.orig/man/man1/shape_RMS.1 +++ shapetools-1.4pl6/man/man1/shape_RMS.1 @@ -20,7 +20,7 @@ .. .TH "SHAPE_RMS" 1 "" \n(dy.\n(mo.\n(yr .SH NAME -shape_RMS \(em Introduction to the shapeTools Release Management System +shape_RMS \- Introduction to the shapeTools Release Management System .SH SYNOPSIS \fBshape rms\fP \- show synopsis of shapeTools Release Management System Functions --- shapetools-1.4pl6.orig/man/man1/shape_build.1 +++ shapetools-1.4pl6/man/man1/shape_build.1 @@ -20,7 +20,7 @@ .. .TH "SHAPE_BUILD" 1 "" \n(dy.\n(mo.\n(yr .SH NAME -shape build \(em shapeTools RMS system building and installation +shape_build \- shapeTools RMS system building and installation .SH SYNOPSIS .ta 1c 2.2c \fBshape [all] [VERSIONS=] [variants] [macro settings] --- shapetools-1.4pl6.orig/man/man1/shape_depend.1 +++ shapetools-1.4pl6/man/man1/shape_depend.1 @@ -20,7 +20,7 @@ .. .TH "SHAPE_DEPEND" 1 "" \n(dy.\n(mo.\n(yr .SH NAME -shape depend \(em shapeTools RMS determine source-include dependencies +shape_depend \- shapeTools RMS determine source-include dependencies .SH SYNOPSIS \fBshape depend [VERSIONS=] [variants]\fP .sp --- shapetools-1.4pl6.orig/man/man1/shape_patch.1 +++ shapetools-1.4pl6/man/man1/shape_patch.1 @@ -20,7 +20,7 @@ .. .TH "SHAPE_PATCH" 1 "" \n(dy.\n(mo.\n(yr .SH NAME -shape patch \(em shapeTools RMS generate patch file +shape_patch \- shapeTools RMS generate patch file .SH SYNOPSIS \fBshape\ patch\ OLDRELEASE=\ NEWRELEASE=\ [PATCHFILE=] .sp --- shapetools-1.4pl6.orig/man/man1/shape_releas.1 +++ shapetools-1.4pl6/man/man1/shape_releas.1 @@ -20,7 +20,7 @@ .. .TH "SHAPE_RELEAS" 1 "" \n(dy.\n(mo.\n(yr .SH NAME -shape releas \(em shapeTools RMS construction of releases and prereleases +shape_releas \- shapeTools RMS construction of releases and prereleases .SH SYNOPSIS \fBshape prerelease .sp --- shapetools-1.4pl6.orig/man/man1/shape_tar.1 +++ shapetools-1.4pl6/man/man1/shape_tar.1 @@ -20,7 +20,7 @@ .. .TH "SHAPE_TAR" 1 "" \n(dy.\n(mo.\n(yr .SH NAME -shape tar \(em shapeTools RMS bundle up subsystem in a tar or shar archive +shape_tar \- shapeTools RMS bundle up subsystem in a tar or shar archive .SH SYNOPSIS .ta 2c \fB --- shapetools-1.4pl6.orig/man/man1/vl.1 +++ shapetools-1.4pl6/man/man1/vl.1 @@ -96,8 +96,8 @@ .IP "\fB\-1\fP (ls)" Force single column output. .IP "\fB\-a\fP (ls)" -List all entries, even those with a name beginning with a '.' and the -'AtFS' entry. This option is default when vl is called by the super +List all entries, even those with a name beginning with a '.' and +the 'AtFS' entry. This option is default when vl is called by the super user. .IP "\fB\-all\fP" List all available information. --- shapetools-1.4pl6.orig/man/man3/af_intro.3 +++ shapetools-1.4pl6/man/man3/af_intro.3 @@ -20,7 +20,7 @@ .. .TH af_intro 3 "Fri Jun 25 14:32:56 1993" "AtFS-1.71" "Attribute Filesystem (AtFS)" .SH NAME -introduction to AtFS library functions and error codes +AtFS \- introduction to AtFS library functions and error codes .SH SYNOPSIS #include .sp --- shapetools-1.4pl6.orig/man/man3/atfstkintro.3 +++ shapetools-1.4pl6/man/man3/atfstkintro.3 @@ -20,7 +20,7 @@ .. .TH atfstk_intro 3 "Fri Jun 25 16:39:27 1993" "AtFStk-1.12" "AtFS Toolkit Library" .SH NAME -introduction to the AtFS (Attribute Filesystem) Toolkit Library +AtFSTK \- introduction to the AtFS (Attribute Filesystem) Toolkit Library .SH SYNOPSIS #include .br --- shapetools-1.4pl6.orig/man/man3/atprint.3 +++ shapetools-1.4pl6/man/man3/atprint.3 @@ -65,6 +65,6 @@ \fIatScanStatus\fP converts an status string to an internal numeric status value. It understands various abbreviations, including the one character status strings generated by atWriteStatus. -.BUGS +.SH .BUGS The format switch in afWriteDate (for dates older than six months) does not happen at exactly the right time. It may be a few days later. --- shapetools-1.4pl6.orig/man/man3/stcall.3 +++ shapetools-1.4pl6/man/man3/stcall.3 @@ -110,7 +110,7 @@ In the case of CHILD_KILLED, stCallCmdErrno contains the statßus of the child process as reported by wait(2). .SH BUGS -On systems where no useable vfork(2) is available, the value of +On systems where no usable vfork(2) is available, the value of stCallCmdErrno does not make sense in case of EXEC_FAILED. .LP Under IRIX stCallCmd sometimes (or always?) returns WAIT_ERROR where --- shapetools-1.4pl6.orig/man/man3/stparseargs.3 +++ shapetools-1.4pl6/man/man3/stparseargs.3 @@ -41,7 +41,7 @@ filters out all known (from the option list) options and their arguments and returns the remaining tokens from the command line in \fInewArgVector\fP with \fInewArgCount\fP. Options on the command -line must be preceeded by a minus sign, otherwise they will not be +line must be preceded by a minus sign, otherwise they will not be recognized. The first entry in the argument vector, the program name, passes the function without any damage. stParseArgs may be invoked multiple times with different --- shapetools-1.4pl6.orig/man/man3/stuserio.3 +++ shapetools-1.4pl6/man/man3/stuserio.3 @@ -56,11 +56,11 @@ Message to be sent to standard error. .TP ST_LOG_WARNING -Warning message, preceeded by the string `programName - warning:', +Warning message, preceded by the string `programName - warning:', going to standard error. .TP ST_LOG_ERROR -Error message, preceeded by the string `programName - error:', +Error message, preceded by the string `programName - error:', going to standard error. .LP Additionally, when the flag @@ -86,7 +86,7 @@ and an additional short message. It's size is MAXPATHLEN+128. .LP \fIstGetFromStdin\fP reads from stdin a text terminated by ^D or by the -specified single charcter \fItermChar\fP at the beginning of a new +specified single character \fItermChar\fP at the beginning of a new line. If termChar is -1 text is terminated by ^D. .LP \fIstAskConfirm\fP returns true if the answer is equivalent to --- shapetools-1.4pl6.orig/man/man7/bindrules.7 +++ shapetools-1.4pl6/man/man7/bindrules.7 @@ -116,7 +116,6 @@ \fCfrom_release (release_name):\fP .sp \fClast_released (library_path, include_path):\fP -.fo .LP .SH EVALUATION ALGORITHM The basic idea of the rule evaluation algorithm is, that in every --- shapetools-1.4pl6.orig/man/man7/shape_stdrul.7 +++ shapetools-1.4pl6/man/man7/shape_stdrul.7 @@ -20,7 +20,7 @@ .. .TH "SHAPE_STDRUL" 7 "" \n(dy.\n(mo.\n(yr .SH NAME -shape stdrul \(em shapeTools RMS general version selection rules +shape_stdrul \- shapeTools RMS general version selection rules .SH DESCRIPTION The shape release management system requires a set of standard version selection rules to be accessible project wide. These are defined in --- shapetools-1.4pl6.orig/man/man7/shape_stdvar.7 +++ shapetools-1.4pl6/man/man7/shape_stdvar.7 @@ -20,7 +20,7 @@ .. .TH "SHAPE_STDVAR" 7 "" \n(dy.\n(mo.\n(yr .SH NAME -shape stdvar \(em shapeTools RMS project wide variant definitions +shape_stdvar \- shapeTools RMS project wide variant definitions .SH DESCRIPTION This file contains common variant definitions to be used in a software development project supported by the shape release management --- shapetools-1.4pl6.orig/shape_conf.sh +++ shapetools-1.4pl6/shape_conf.sh @@ -1,14 +1,14 @@ #!/bin/sh # # # Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -77,7 +77,8 @@ echo "Please enter the operating system type. Supported platforms are:" echo " aix -- (IBM/AIX) hpux -- (HP/UX)" echo " irix -- (SGI/IRIX) mach -- (NeXT/Mach)" -echo " sunos_4 -- (SunOS 4.x.x) svr_4 -- (SysV R4, Solaris 2)" +echo " sunos_4 -- (SunOS 4.x.x) svr_4 -- (SysV R4)" +echo " sol_2 -- (Solaris 2.x.x)" echo " ultrix -- (DEC/Ultrix) linux -- (Linux 0.99pl14+)" echo " for others see the README file." echo $echolead "[Default: $hostsystem] > " $echotrail @@ -149,8 +150,40 @@ ;; s_svr_4) syslibs="-lnsl -lgen" ;; + s_sol_2) syslibs="-lnsl -lgen" + ;; esac +# Determine if shared libraries should be built + +dosharedlibs=`grep DOSHAREDLIBS $base/Makefile | head -1 | \ + sed -e 's/DOSHAREDLIBS//' -e 's/[\= ]//g'` +echo +echo "Do you want ShapeTools to be built with shared library support ?" +echo "This option is not available for all systems; currently support" +echo "only exists for sol_2 (XXX: add systems)" +echo $echolead "[Default: $dosharedlibs] > " $echotrail +read input + +if [ "$input" = "no" -o "$input" = "n" ] + then + dosharedlibs=no +fi +if [ "$input" = "yes" -o "$input" = "y" ] + then + dosharedlibs=yes +fi + +if [ "$doemacslisp" = "yes" ] + then + case $hostsystem in + s_sol_2) echo "Building shared libraries for $hostsystem" + ;; + *) echo "Shared libraries not supported on $hostsystem" + dosharedlibs=no + esac +fi + # Determine subsystems to be included (SUBSYTEMS) subsystems=`grep SUBSYSTEMS $base/Makefile | head -1 | \ @@ -260,6 +293,16 @@ libdirmissing=true fi fi +if [ "$dolibraries" = "no" -a "$dosharedlibs" = "yes" ] + then + if [ -d $installlibpath ] + then + echo "...C-libraries in $installlibpath" + else + echo "...C-libraries in $installlibpath (does not exist)" + libdirmissing=true + fi +fi if [ -d $installshapelibpath ] then echo "...shape libraries in $installshapelibpath" @@ -334,6 +377,9 @@ installincpath=$input specialincpath=true fi + fi + if [ "$dolibraries" = "yes" -o "$dosharedlibs" = "yes" ] + then echo echo "Install C-libraries in..." echo $echolead "[Default: $installlibpath] > " $echotrail @@ -486,6 +532,8 @@ print \"INSTALLBASE = $installbase\" else if ((\$1 == \"DOLIBRARIES\" && \$2 == \"=\") || \$1 == \"DOLIBRARIES=\") print \"DOLIBRARIES = $dolibraries\" + else if ((\$1 == \"DOSHAREDLIBS\" && \$2 == \"=\") || \$1 == \"DOSHAREDLIBS=\") + print \"DOSHAREDLIBS = $dosharedlibs\" else if ((\$1 == \"DOEMACSLISP\" && \$2 == \"=\") || \$1 == \"DOEMACSLISP=\") print \"DOEMACSLISP = $doemacslisp\" else print }" Makefile > Makefile.new --- shapetools-1.4pl6.orig/src/atfs/Makefile +++ shapetools-1.4pl6/src/atfs/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[7.0] Thu Jan 20 21:10:59 1994 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -40,27 +41,30 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = -DSYSLOG -DATFS_OWN_LOCKING +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = /home/stone/shape -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -76,10 +80,13 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. -LIBTARGET = libAtFS.a +LIBNAME = AtFS +LIBTARGET = lib$(LIBNAME).a +SHLIBVERSION = 1.71 +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) BINTARGET = atfsrepair CACHETARGET = cacheadm SHTARGET = mkatfs @@ -92,7 +99,7 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # Aliases for (filesystem links to) $(TARGET). @@ -111,15 +118,15 @@ aftmpfiles.c aftransact.c afudattrs.c afvers.c \ atfsrepair.c cacheadm.c config.c $(SHSOURCES) -HEADERS = atfs.h afsys.h afarchive.h atfsrepair.h config.h +HEADERS = atfs.h afsys.h afarchive.h atfsrepair.h afconfig.h # Auxiliary source and header files that are not genuine part of the # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Sources of variant source components stored under equal names in # different locations. During system builds, only one of each (equally @@ -138,12 +145,12 @@ man/man3/af_files.3 man/man3/af_history.3 man/man3/af_lock.3 \ man/man3/af_misc.3 man/man3/af_note.3 man/man3/af_protect.3 \ man/man3/af_retrieve.3 man/man3/af_sets.3 \ - man/man3/af_transact.3 man/man3/af_version.3 -MAN4 = + man/man3/af_transact.3 man/man3/af_version.3 +MAN4 = MAN5 = man/man5/af_archive.5 -MAN6 = -MAN7 = -MAN8 = +MAN6 = +MAN7 = +MAN8 = # All source components of the system (should not be changed) @@ -159,6 +166,11 @@ aftmpfiles.o aftransact.o afudattrs.o afvers.o \ $(VERSIONOBJECT) config.o +SHLIBOBJECTS = $(LIBOBJECTS:.o=.pic_o) + +%.pic_o: %.c + $(CC) -c $(SHLIBCFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION) + OBJECTS = $(LIBOBJECTS) cacheadm.o atfsrepair.o @@ -170,20 +182,35 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro -CC = cc +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBSONAME = lib$(LIBNAME).$(SHLIBSUFFIX).$(shell echo $(SHLIBVERSION) | cut -d . -f 1) +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = + +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) -D$(HOSTSYSTEM) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = -LINTLIBS = +SYSLIBS = + +STATICLOCALLIBS = $(LOCALLIBPATH)/$(LIBTARGET) +SHAREDLOCALLIBS = $(LOCALLIBPATH)/$(SHLIBTARGET) +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFS + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -193,7 +220,7 @@ all: +all $(ALLTARGETS) -targets: $(LIBTARGET) $(BINTARGET) $(CACHETARGET) $(SHTARGET) +targets: $(LIBTARGET) $(SHLIBTARGET) $(BINTARGET) $(CACHETARGET) $(SHTARGET) $(LIBTARGET): $(LIBOBJECTS) -ar ruv $(LIBTARGET) $(LIBOBJECTS) @@ -206,8 +233,21 @@ ln $(LIBTARGET) $$i; \ done -$(BINTARGET): atfsrepair.o $(LIBTARGET) $(LOCALLIBS) - $(CC) $(LDFLAGS) -o $(BINTARGET) atfsrepair.o $(LIBTARGET) $(LOCALLIBS) $(SYSLIBS) +$(SHLIBTARGET): $(SHLIBOBJECTS) + $(SHLIBLD) $(LDFLAGS) -o $@ -Wl,-soname,$(SHLIBSONAME) $(SHLIBOBJECTS) + @rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(SHLIBTARGET) to $$i; \ + ln $(SHLIBTARGET) $$i; \ + done + +$(BINTARGET): atfsrepair.o $(LOCALLIBS) + $(CC) $(LDFLAGS) -o $(BINTARGET) atfsrepair.o $(LOCALLDFLAGS) $(SYSLIBS) @_aliases="$(BINALIASES)"; \ for i in $$_aliases; \ do \ @@ -216,8 +256,8 @@ ln $(BINTARGET) $$i; \ done -$(CACHETARGET): cacheadm.o $(LIBTARGET) - $(CC) $(LDFLAGS) -o $(CACHETARGET) cacheadm.o $(LIBTARGET) $(SYSLIBS) +$(CACHETARGET): cacheadm.o $(LOCALLIBS) + $(CC) $(LDFLAGS) -o $(CACHETARGET) cacheadm.o $(LOCALLDFLAGS) $(SYSLIBS) @_aliases="$(CACHEALIASES)"; \ for i in $$_aliases; \ do \ @@ -238,9 +278,10 @@ @chmod +x $(SHTARGET) localinstalltargets: $(LOCALLIBPATH)/$(LIBTARGET) \ + $(LOCALLIBPATH)/$(SHLIBTARGET) \ $(LOCALINCLUDEPATH)/atfs.h \ $(LOCALINCLUDEPATH)/afsys.h \ - $(LOCALINCLUDEPATH)/config.h \ + $(LOCALINCLUDEPATH)/afconfig.h \ $(BINTARGET) $(CACHETARGET) $(SHTARGET) $(LOCALLIBPATH)/$(LIBTARGET): $(LIBTARGET) @@ -261,6 +302,28 @@ ln $(LOCALLIBPATH)/$(LIBTARGET) $(LOCALLIBPATH)/$$i; \ done +$(LOCALLIBPATH)/$(SHLIBTARGET): $(SHLIBTARGET) + @-echo "Copying $(SHLIBTARGET) to $(LOCALLIBPATH)"; \ + if [ -f $(LOCALLIBPATH)/$(SHLIBTARGET) ] ;\ + then \ + mv -f $(LOCALLIBPATH)/$(SHLIBTARGET) \ + $(LOCALLIBPATH)/$(SHLIBTARGET).old;\ + fi; \ + cp $(SHLIBTARGET) $(LOCALLIBPATH)/$(SHLIBTARGET); \ + chmod $(INSTALLBINMODE) $(LOCALLIBPATH)/$(SHLIBTARGET); \ + ( cd $(LOCALLIBPATH); \ + rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + ); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(LOCALLIBPATH)/$$i; \ + echo "linking $(LOCALLIBPATH)/$(SHLIBTARGET) to $(LOCALLIBPATH)/$$i"; \ + ln $(LOCALLIBPATH)/$(SHLIBTARGET) $(LOCALLIBPATH)/$$i; \ + done + $(LOCALINCLUDEPATH)/atfs.h: atfs.h @-echo "Copying atfs.h to $(LOCALINCLUDEPATH)"; \ if [ -f $(LOCALINCLUDEPATH)/atfs.h ] && \ @@ -281,22 +344,23 @@ cp afsys.h $(LOCALINCLUDEPATH)/afsys.h; \ chmod $(INSTALLINCMODE) $(LOCALINCLUDEPATH)/afsys.h -$(LOCALINCLUDEPATH)/config.h: config.h - @-echo "Copying config.h to $(LOCALINCLUDEPATH)"; \ - mv config.h config.h.orig; \ - sed -e s/_system_/$(HOSTSYSTEM)/ config.h.orig > config.h; \ - if [ -f $(LOCALINCLUDEPATH)/config.h ] && \ - [ ! -w $(LOCALINCLUDEPATH)/config.h ]; \ - then \ - chmod u+w $(LOCALINCLUDEPATH)/config.h; \ - fi; \ - cp config.h $(LOCALINCLUDEPATH)/config.h; \ - chmod $(INSTALLINCMODE) $(LOCALINCLUDEPATH)/config.h; \ - rm -f config.h; \ - mv config.h.orig config.h - -installtargets: $(INSTALLLIBPATH)/$(LIBTARGET) $(INSTALLINCPATH)/atfs.h \ - $(INSTALLINCPATH)/afsys.h $(INSTALLINCPATH)/config.h \ +$(LOCALINCLUDEPATH)/afconfig.h: afconfig.h + @-echo "Copying afconfig.h to $(LOCALINCLUDEPATH)"; \ + mv afconfig.h afconfig.h.orig; \ + sed -e s/_system_/$(HOSTSYSTEM)/ afconfig.h.orig > afconfig.h; \ + if [ -f $(LOCALINCLUDEPATH)/afconfig.h ] && \ + [ ! -w $(LOCALINCLUDEPATH)/afconfig.h ]; \ + then \ + chmod u+w $(LOCALINCLUDEPATH)/afconfig.h; \ + fi; \ + cp afconfig.h $(LOCALINCLUDEPATH)/afconfig.h; \ + chmod $(INSTALLINCMODE) $(LOCALINCLUDEPATH)/afconfig.h; \ + rm -f afconfig.h; \ + mv afconfig.h.orig afconfig.h + +installtargets: $(INSTALLLIBPATH)/$(LIBTARGET) $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLINCPATH)/atfs.h \ + $(INSTALLINCPATH)/afsys.h $(INSTALLINCPATH)/afconfig.h \ $(INSTALLBINPATH)/$(BINTARGET) $(INSTALLBINPATH)/$(CACHETARGET) \ $(INSTALLBINPATH)/$(SHTARGET) @@ -318,6 +382,28 @@ ln $(INSTALLLIBPATH)/$(LIBTARGET) $(INSTALLLIBPATH)/$$i; \ done +$(INSTALLLIBPATH)/$(SHLIBTARGET): $(SHLIBTARGET) + @-echo "Installing $(SHLIBTARGET) in $(INSTALLLIBPATH)"; \ + if [ -f $(INSTALLLIBPATH)/$(SHLIBTARGET) ] ;\ + then \ + mv -f $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLLIBPATH)/$(SHLIBTARGET).old;\ + fi; \ + cp $(SHLIBTARGET) $(INSTALLLIBPATH)/$(SHLIBTARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ + ( cd $(INSTALLLIBPATH); \ + rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + ); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLLIBPATH)/$$i; \ + echo "linking $(INSTALLLIBPATH)/$(SHLIBTARGET) to $(INSTALLLIBPATH)/$$i"; \ + ln $(INSTALLLIBPATH)/$(SHLIBTARGET) $(INSTALLLIBPATH)/$$i; \ + done + $(INSTALLINCPATH)/atfs.h: atfs.h @-echo "Installing atfs.h in $(INSTALLINCPATH)"; \ if [ -f $(INSTALLINCPATH)/atfs.h ] && \ @@ -338,19 +424,19 @@ cp afsys.h $(INSTALLINCPATH)/afsys.h; \ chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/afsys.h -$(INSTALLINCPATH)/config.h: config.h - @-echo "Installing config.h in $(INSTALLINCPATH)"; \ - mv config.h config.h.orig; \ - sed -e s/_system_/$(HOSTSYSTEM)/ config.h.orig > config.h; \ - if [ -f $(INSTALLINCPATH)/config.h ] && \ - [ ! -w $(INSTALLINCPATH)/config.h ]; \ - then \ - chmod u+w $(INSTALLINCPATH)/config.h; \ - fi; \ - cp config.h $(INSTALLINCPATH)/config.h; \ - chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/config.h; \ - rm -f config.h; \ - mv config.h.orig config.h +$(INSTALLINCPATH)/afconfig.h: afconfig.h + @-echo "Installing afconfig.h in $(INSTALLINCPATH)"; \ + mv afconfig.h afconfig.h.orig; \ + sed -e s/_system_/$(HOSTSYSTEM)/ afconfig.h.orig > afconfig.h; \ + if [ -f $(INSTALLINCPATH)/afconfig.h ] && \ + [ ! -w $(INSTALLINCPATH)/afconfig.h ]; \ + then \ + chmod u+w $(INSTALLINCPATH)/afconfig.h; \ + fi; \ + cp afconfig.h $(INSTALLINCPATH)/afconfig.h; \ + chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/afconfig.h; \ + rm -f afconfig.h; \ + mv afconfig.h.orig afconfig.h $(INSTALLBINPATH)/$(BINTARGET): $(BINTARGET) @-echo "Installing $(BINTARGET) in $(INSTALLBINPATH)"; \ @@ -359,7 +445,8 @@ then \ chmod u+w $(INSTALLBINPATH)/$(BINTARGET); \ fi; \ - cp $(BINTARGET) $(INSTALLBINPATH)/$(BINTARGET); \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(BINTARGET) atfsrepair.o \ + $(INSTALLLDFLAGS) $(SYSLIBS); \ chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(BINTARGET); \ _aliases="$(BINALIASES)"; \ for i in $$_aliases; \ @@ -376,7 +463,8 @@ then \ chmod u+w $(INSTALLBINPATH)/$(CACHETARGET); \ fi; \ - cp $(CACHETARGET) $(INSTALLBINPATH)/$(CACHETARGET); \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(CACHETARGET) cacheadm.o \ + $(INSTALLLDFLAGS) $(SYSLIBS); \ chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(CACHETARGET); \ _aliases="$(CACHEALIASES)"; \ for i in $$_aliases; \ @@ -446,44 +534,56 @@ # Do not install libraries -noinstall: $(INSTALLBINPATH)/$(BINTARGET) $(INSTALLBINPATH)/$(CACHETARGET) \ +noinstall: $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLBINPATH)/$(BINTARGET) $(INSTALLBINPATH)/$(CACHETARGET) \ $(INSTALLBINPATH)/$(SHTARGET) # The cleanup action. Removes all automatically rederivable files. doclean: - rm -f $(LIBTARGET) $(BINTARGET) $(CACHETARGET) $(SHTARGET) \ - $(LIBALIASES) $(BINALIASES) $(SHALIASES) $(OBJECTS) + rm -f $(LIBTARGET) $(SHLIBTARGET) $(BINTARGET) $(CACHETARGET) \ + $(SHTARGET) $(LIBALIASES) $(BINALIASES) $(SHALIASES) \ + $(SHLIBOBJECTS) $(OBJECTS) # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -510,28 +610,10 @@ @-if [ -n "$(ALLTARGETS)" ]; \ then : ; \ else \ - $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(MAKE) ALLTARGETS="subsystems targets" \ + MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -540,27 +622,8 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + $(INHERITEDFLAGS) \ + install; \ fi +localinstall: @@ -569,53 +632,16 @@ else \ $(MAKE) ALLTARGETS="subsystems localinstalltargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(BASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" localinstall; \ + $(INHERITEDFLAGS) \ + localinstall; \ fi +clean: @-if [ -n "$(ALLTARGETS)" ]; \ then : ; \ else \ - $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(MAKE) ALLTARGETS="subsystems doclean" \ + MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ fi --- shapetools-1.4pl6.orig/src/atfs/Makefile.in +++ shapetools-1.4pl6/src/atfs/Makefile.in @@ -0,0 +1,646 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for AtFS +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/atfs + +# A short name for this node system + +NODENAME = AtFS + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +LIBNAME = AtFS +LIBTARGET = lib$(LIBNAME).a +SHLIBVERSION = @ATFSVERSION@ +SHLIBTARGET = @SHLIBTARGET@ +BINTARGET = atfsrepair +CACHETARGET = cacheadm +SHTARGET = mkatfs + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. +VERSIONFILE = af_version.c # source +VERSIONOBJECT = af_version.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +LIBALIASES = +BINALIASES = +SHALIASES = + +# The regular source and header files. + +SHSOURCES = mkatfs.sh + +SOURCES = afarchive.c afarlock.c afattrs.c afcache.c afcompar.c afdelta.c \ + afdeltaproc.c afenviron.c aferror.c affiles.c afkeys.c \ + aflib.c aflock.c afmemory.c afnames.c afobjcache.c afretr.c \ + afsattrs.c afsets.c afstates.c afstore.c afsymtab.c aftime.c \ + aftmpfiles.c aftransact.c afudattrs.c afvers.c \ + atfsrepair.c cacheadm.c config.c $(SHSOURCES) + +HEADERS = atfs.h afsys.h afarchive.h atfsrepair.h afconfig.h + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = man/man1/atfsrepair.1 man/man1/cacheadm.1 man/man1/mkatfs.1 +MAN3 = man/man3/af_intro.3 \ + man/man3/af_attrs.3 man/man3/af_cache.3 man/man3/af_error.3 \ + man/man3/af_files.3 man/man3/af_history.3 man/man3/af_lock.3 \ + man/man3/af_misc.3 man/man3/af_note.3 man/man3/af_protect.3 \ + man/man3/af_retrieve.3 man/man3/af_sets.3 \ + man/man3/af_transact.3 man/man3/af_version.3 +MAN4 = +MAN5 = man/man5/af_archive.5 +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +LIBOBJECTS = afarchive.o afarlock.o afattrs.o afcache.o afcompar.o afdelta.o \ + afdeltaproc.o afenviron.o aferror.o affiles.o afkeys.o \ + aflib.o aflock.o afmemory.o afnames.o afobjcache.o afretr.o \ + afsattrs.o afsets.o afstates.o afstore.o afsymtab.o aftime.o \ + aftmpfiles.o aftransact.o afudattrs.o afvers.o \ + $(VERSIONOBJECT) config.o + +SHLIBOBJECTS = $(LIBOBJECTS:.o=.pic_o) + +%.pic_o: %.c + $(CC) -c $(SHLIBCFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION) + +OBJECTS = $(LIBOBJECTS) cacheadm.o atfsrepair.o + + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBSONAME = lib$(LIBNAME).$(SHLIBSUFFIX).$(shell echo $(SHLIBVERSION) | cut -d . -f 1) +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) -D$(HOSTSYSTEM) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIBS = @SYSLIBS@ + +STATICLOCALLIBS = $(LOCALLIBPATH)/$(LIBTARGET) +SHAREDLOCALLIBS = $(LOCALLIBPATH)/$(SHLIBTARGET) +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFS + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +targets: $(LIBTARGET) $(SHLIBTARGET) $(BINTARGET) $(CACHETARGET) $(SHTARGET) + +$(LIBTARGET): $(LIBOBJECTS) + -ar ruv $(LIBTARGET) $(LIBOBJECTS) + @-($(RANLIB) $(LIBTARGET)) 2> /dev/null; true + @_aliases="$(LIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(LIBTARGET) to $$i; \ + ln $(LIBTARGET) $$i; \ + done + +$(SHLIBTARGET): $(SHLIBOBJECTS) + $(SHLIBLD) $(LDFLAGS) -o $@ -Wl,-soname,$(SHLIBSONAME) $(SHLIBOBJECTS) + @rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(SHLIBTARGET) to $$i; \ + ln $(SHLIBTARGET) $$i; \ + done + +$(BINTARGET): atfsrepair.o $(LOCALLIBS) + $(CC) $(LDFLAGS) -o $(BINTARGET) atfsrepair.o $(LOCALLDFLAGS) $(SYSLIBS) + @_aliases="$(BINALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(BINTARGET) to $$i; \ + ln $(BINTARGET) $$i; \ + done + +$(CACHETARGET): cacheadm.o $(LOCALLIBS) + $(CC) $(LDFLAGS) -o $(CACHETARGET) cacheadm.o $(LOCALLDFLAGS) $(SYSLIBS) + @_aliases="$(CACHEALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(CACHETARGET) to $$i; \ + ln $(CACHETARGET) $$i; \ + done + +$(SHTARGET): $(SHSOURCES) + @rm -f $(SHTARGET); \ + if [ $(HOSTSYSTEM) = s_ultrix ]; \ + then \ + echo '#!/bin/sh5' > $(SHTARGET); \ + else \ + echo '#!/bin/sh' > $(SHTARGET); \ + fi + cat $(SHSOURCES) >> $(SHTARGET); + @chmod +x $(SHTARGET) + +localinstalltargets: $(LOCALLIBPATH)/$(LIBTARGET) \ + $(LOCALLIBPATH)/$(SHLIBTARGET) \ + $(LOCALINCLUDEPATH)/atfs.h \ + $(LOCALINCLUDEPATH)/afsys.h \ + $(LOCALINCLUDEPATH)/afconfig.h \ + $(BINTARGET) $(CACHETARGET) $(SHTARGET) + +$(LOCALLIBPATH)/$(LIBTARGET): $(LIBTARGET) + @-echo "Copying $(LIBTARGET) to $(LOCALLIBPATH)"; \ + if [ -f $(LOCALLIBPATH)/$(LIBTARGET) ] ;\ + then \ + mv -f $(LOCALLIBPATH)/$(LIBTARGET) \ + $(LOCALLIBPATH)/$(LIBTARGET).old;\ + fi; \ + cp $(LIBTARGET) $(LOCALLIBPATH)/$(LIBTARGET); \ + chmod $(INSTALLLIBMODE) $(LOCALLIBPATH)/$(LIBTARGET); \ + ($(RANLIB) $(LOCALLIBPATH)/$(LIBTARGET)) 2> /dev/null; \ + _aliases="$(LIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(LOCALLIBPATH)/$$i; \ + echo "linking $(LOCALLIBPATH)/$(LIBTARGET) to $(LOCALLIBPATH)/$$i"; \ + ln $(LOCALLIBPATH)/$(LIBTARGET) $(LOCALLIBPATH)/$$i; \ + done + +$(LOCALLIBPATH)/$(SHLIBTARGET): $(SHLIBTARGET) + @-echo "Copying $(SHLIBTARGET) to $(LOCALLIBPATH)"; \ + if [ -f $(LOCALLIBPATH)/$(SHLIBTARGET) ] ;\ + then \ + mv -f $(LOCALLIBPATH)/$(SHLIBTARGET) \ + $(LOCALLIBPATH)/$(SHLIBTARGET).old;\ + fi; \ + cp $(SHLIBTARGET) $(LOCALLIBPATH)/$(SHLIBTARGET); \ + chmod $(INSTALLBINMODE) $(LOCALLIBPATH)/$(SHLIBTARGET); \ + ( cd $(LOCALLIBPATH); \ + rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + ); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(LOCALLIBPATH)/$$i; \ + echo "linking $(LOCALLIBPATH)/$(SHLIBTARGET) to $(LOCALLIBPATH)/$$i"; \ + ln $(LOCALLIBPATH)/$(SHLIBTARGET) $(LOCALLIBPATH)/$$i; \ + done + +$(LOCALINCLUDEPATH)/atfs.h: atfs.h + @-echo "Copying atfs.h to $(LOCALINCLUDEPATH)"; \ + if [ -f $(LOCALINCLUDEPATH)/atfs.h ] && \ + [ ! -w $(LOCALINCLUDEPATH)/atfs.h ]; \ + then \ + chmod u+w $(LOCALINCLUDEPATH)/atfs.h; \ + fi; \ + cp atfs.h $(LOCALINCLUDEPATH)/atfs.h; \ + chmod $(INSTALLINCMODE) $(LOCALINCLUDEPATH)/atfs.h + +$(LOCALINCLUDEPATH)/afsys.h: afsys.h + @-echo "Copying afsys.h to $(LOCALINCLUDEPATH)"; \ + if [ -f $(LOCALINCLUDEPATH)/afsys.h ] && \ + [ ! -w $(LOCALINCLUDEPATH)/afsys.h ]; \ + then \ + chmod u+w $(LOCALINCLUDEPATH)/afsys.h; \ + fi; \ + cp afsys.h $(LOCALINCLUDEPATH)/afsys.h; \ + chmod $(INSTALLINCMODE) $(LOCALINCLUDEPATH)/afsys.h + +$(LOCALINCLUDEPATH)/afconfig.h: afconfig.h + @-echo "Copying afconfig.h to $(LOCALINCLUDEPATH)"; \ + mv afconfig.h afconfig.h.orig; \ + sed -e s/_system_/$(HOSTSYSTEM)/ afconfig.h.orig > afconfig.h; \ + if [ -f $(LOCALINCLUDEPATH)/afconfig.h ] && \ + [ ! -w $(LOCALINCLUDEPATH)/afconfig.h ]; \ + then \ + chmod u+w $(LOCALINCLUDEPATH)/afconfig.h; \ + fi; \ + cp afconfig.h $(LOCALINCLUDEPATH)/afconfig.h; \ + chmod $(INSTALLINCMODE) $(LOCALINCLUDEPATH)/afconfig.h; \ + rm -f afconfig.h; \ + mv afconfig.h.orig afconfig.h + +installtargets: $(INSTALLLIBPATH)/$(LIBTARGET) $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLINCPATH)/atfs.h \ + $(INSTALLINCPATH)/afsys.h $(INSTALLINCPATH)/afconfig.h \ + $(INSTALLBINPATH)/$(BINTARGET) $(INSTALLBINPATH)/$(CACHETARGET) \ + $(INSTALLBINPATH)/$(SHTARGET) + +$(INSTALLLIBPATH)/$(LIBTARGET): $(LIBTARGET) + @-echo "Installing $(LIBTARGET) in $(INSTALLLIBPATH)"; \ + if [ -f $(INSTALLLIBPATH)/$(LIBTARGET) ] ;\ + then \ + mv -f $(INSTALLLIBPATH)/$(LIBTARGET) \ + $(INSTALLLIBPATH)/$(LIBTARGET).old;\ + fi; \ + cp $(LIBTARGET) $(INSTALLLIBPATH)/$(LIBTARGET); \ + chmod $(INSTALLLIBMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ + ($(RANLIB) $(INSTALLLIBPATH)/$(LIBTARGET)) 2> /dev/null; \ + _aliases="$(LIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLLIBPATH)/$$i; \ + echo "linking $(INSTALLLIBPATH)/$(LIBTARGET) to $(INSTALLLIBPATH)/$$i"; \ + ln $(INSTALLLIBPATH)/$(LIBTARGET) $(INSTALLLIBPATH)/$$i; \ + done + +$(INSTALLLIBPATH)/$(SHLIBTARGET): $(SHLIBTARGET) + @-echo "Installing $(SHLIBTARGET) in $(INSTALLLIBPATH)"; \ + if [ -f $(INSTALLLIBPATH)/$(SHLIBTARGET) ] ;\ + then \ + mv -f $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLLIBPATH)/$(SHLIBTARGET).old;\ + fi; \ + cp $(SHLIBTARGET) $(INSTALLLIBPATH)/$(SHLIBTARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ + ( cd $(INSTALLLIBPATH); \ + rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + ); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLLIBPATH)/$$i; \ + echo "linking $(INSTALLLIBPATH)/$(SHLIBTARGET) to $(INSTALLLIBPATH)/$$i"; \ + ln $(INSTALLLIBPATH)/$(SHLIBTARGET) $(INSTALLLIBPATH)/$$i; \ + done + +$(INSTALLINCPATH)/atfs.h: atfs.h + @-echo "Installing atfs.h in $(INSTALLINCPATH)"; \ + if [ -f $(INSTALLINCPATH)/atfs.h ] && \ + [ ! -w $(INSTALLINCPATH)/atfs.h ]; \ + then \ + chmod u+w $(INSTALLINCPATH)/atfs.h; \ + fi; \ + cp atfs.h $(INSTALLINCPATH)/atfs.h; \ + chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/atfs.h + +$(INSTALLINCPATH)/afsys.h: afsys.h + @-echo "Installing afsys.h in $(INSTALLINCPATH)"; \ + if [ -f $(INSTALLINCPATH)/afsys.h ] && \ + [ ! -w $(INSTALLINCPATH)/afsys.h ]; \ + then \ + chmod u+w $(INSTALLINCPATH)/afsys.h; \ + fi; \ + cp afsys.h $(INSTALLINCPATH)/afsys.h; \ + chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/afsys.h + +$(INSTALLINCPATH)/afconfig.h: afconfig.h + @-echo "Installing afconfig.h in $(INSTALLINCPATH)"; \ + mv afconfig.h afconfig.h.orig; \ + sed -e s/_system_/$(HOSTSYSTEM)/ afconfig.h.orig > afconfig.h; \ + if [ -f $(INSTALLINCPATH)/afconfig.h ] && \ + [ ! -w $(INSTALLINCPATH)/afconfig.h ]; \ + then \ + chmod u+w $(INSTALLINCPATH)/afconfig.h; \ + fi; \ + cp afconfig.h $(INSTALLINCPATH)/afconfig.h; \ + chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/afconfig.h; \ + rm -f afconfig.h; \ + mv afconfig.h.orig afconfig.h + +$(INSTALLBINPATH)/$(BINTARGET): $(BINTARGET) + @-echo "Installing $(BINTARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(BINTARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(BINTARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(BINTARGET); \ + fi; \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(BINTARGET) atfsrepair.o \ + $(INSTALLLDFLAGS) $(SYSLIBS); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(BINTARGET); \ + _aliases="$(BINALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(BINTARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(BINTARGET) $(INSTALLBINPATH)/$$i; \ + done + +$(INSTALLBINPATH)/$(CACHETARGET): $(CACHETARGET) + @-echo "Installing $(CACHETARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(CACHETARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(CACHETARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(CACHETARGET); \ + fi; \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(CACHETARGET) cacheadm.o \ + $(INSTALLLDFLAGS) $(SYSLIBS); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(CACHETARGET); \ + _aliases="$(CACHEALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(CACHETARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(CACHETARGET) $(INSTALLBINPATH)/$$i; \ + done + +$(INSTALLBINPATH)/$(SHTARGET): $(SHTARGET) + @-echo "Installing $(SHTARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(SHTARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(SHTARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(SHTARGET); \ + fi; \ + cp $(SHTARGET) $(INSTALLBINPATH)/$(SHTARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(SHTARGET); \ + _aliases="$(SHALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(SHTARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(SHTARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + _current=`basename $$i`; \ + echo "Installing $$_current in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$_current ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$_current ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$_current; \ + fi; \ + cp $(BASE)/$$i $(INSTALLMANPATH)/man1/$$_current; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$_current; \ + done; \ + _manuals="$(MAN3)"; \ + for i in $$_manuals; \ + do \ + _current=`basename $$i`; \ + echo "Installing $$_current in $(INSTALLMANPATH)/man3"; \ + if [ -f $(INSTALLMANPATH)/man3/$$_current ] && \ + [ ! -w $(INSTALLMANPATH)/man3/$$_current ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man3/$$_current; \ + fi; \ + cp $(BASE)/$$i $(INSTALLMANPATH)/man3/$$_current; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man3/$$_current; \ + done; \ + _manuals="$(MAN5)"; \ + for i in $$_manuals; \ + do \ + _current=`basename $$i`; \ + echo "Installing $$_current in $(INSTALLMANPATH)/man5"; \ + if [ -f $(INSTALLMANPATH)/man5/$$_current ] && \ + [ ! -w $(INSTALLMANPATH)/man5/$$_current ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man5/$$_current; \ + fi; \ + cp $(BASE)/$$i $(INSTALLMANPATH)/man5/$$_current; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man5/$$_current; \ + done + +# Do not install libraries + +noinstall: $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLBINPATH)/$(BINTARGET) $(INSTALLBINPATH)/$(CACHETARGET) \ + $(INSTALLBINPATH)/$(SHTARGET) + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(LIBTARGET) $(SHLIBTARGET) $(BINTARGET) $(CACHETARGET) \ + $(SHTARGET) $(LIBALIASES) $(BINALIASES) $(SHALIASES) \ + $(SHLIBOBJECTS) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +localinstall: +localinstall $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" \ + MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + $(INHERITEDFLAGS) \ + install; \ + fi + ++localinstall: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems localinstalltargets" \ + MAINTARGET=install \ + $(INHERITEDFLAGS) \ + localinstall; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" \ + MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/atfs/afarchive.c +++ shapetools-1.4pl6/src/atfs/afarchive.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -63,7 +63,7 @@ return (sptr); } - + /*======================= rddata ====================================*/ LOCAL int af_rddata (file, dbuf, list) @@ -114,7 +114,7 @@ fread (&(dbuf[dpos]), sizeof(char), (size_t) 1, file); list->af_list[i].af_note = NULL; } - + fgets (idstr, AF_IDSTRLEN+1, file); if (strcmp (idstr, AF_DATAID)) FATAL ("rddata", "wrong data-ID in datafile", AF_EINCONSIST, ERROR); @@ -224,7 +224,7 @@ /* skip idstring */ idstr[AF_IDSTRLEN] = '\0'; fgets (idstr, AF_IDSTRLEN+1, file); - + /* read constant attributes of busy version */ fgets (line, AF_LINESIZ, file); @@ -245,7 +245,7 @@ if (writeok) list->af_extent |= AF_UXWRITE; - + /* read owner from archive */ fgets (idstr, AF_IDSTRLEN+1, file); fgets (line, AF_LINESIZ, file); /* name, host and domain of owner */ @@ -283,7 +283,7 @@ list->af_list[0].af_rev = AF_BUSYVERS; list->af_list[0].af_state = AF_BUSY; list->af_list[0].af_stime = AF_NOTIME; - list->af_list[0].af_repr = AF_FILE; + list->af_list[0].af_repr = AF_FILE_AF; list->af_list[0].af_dsize = (size_t) 0; list->af_list[0].af_data = NULL; list->af_list[0].af_hashname = NULL; @@ -317,7 +317,7 @@ list->af_list[0].af_ctime = AF_NOTIME; list->af_list[0].af_fsize = 0; } - + /* read list */ for (i=1; i < list->af_nrevs; i++) { /* do initializations */ @@ -327,7 +327,7 @@ list->af_list[i].af_data = NULL; list->af_list[0].af_nrefs = 0; list->af_list[i].af_hashname = NULL; - + /* enter name (set a pointer to the name-field of af_list[0]) */ /* skip position 0 */ if (i != 0) { @@ -391,7 +391,7 @@ list->af_list[i].af_stime = (time_t) atoi (itemptr); itemptr = afNextItem (itemptr); list->af_list[i].af_ltime = (time_t) atoi (itemptr); - + /* read kind of representation */ fgetc (file); /* skip tab */ fgets (idstr, AF_IDSTRLEN+1, file); @@ -414,7 +414,7 @@ if (!(bibufptr->st_ino)) /* if there is no busy version */ list->af_nrevs--; - + return (AF_OK); } /* af_rdattrs */ @@ -453,7 +453,7 @@ if ((list->af_list[i].af_gen != gen) || (list->af_list[i].af_rev != rev)) FATAL ("rdudas", "wrong version in archive file", AF_EINCONSIST, ERROR); - + /* build up hashlist and read user defined attributes */ tmpkey.af_lpos = i; afInitUdas (&tmpkey); @@ -492,7 +492,7 @@ else { j++; if ((j % AF_UDASEGSIZ) == 0) { /* if segment is full */ - if ((udabuf = realloc (udabuf, (unsigned) ((j + AF_UDASEGSIZ) * sizeof (char)))) == NULL) + if ((udabuf = realloc (udabuf, (unsigned) ((j + AF_UDASEGSIZ) * sizeof (char)))) == NULL) FAIL ("rdudas", "realloc", AF_ESYSERR, ERROR); } } @@ -525,7 +525,7 @@ list->af_arpath = afArchivePath (list->af_cattrs.af_syspath); list->af_extent |= AF_ARCHIVE; } - + if ((list->af_cattrs.af_globtype == NULL) && (!strcmp (list->af_cattrs.af_globname, ".") || !strcmp (list->af_cattrs.af_globname, ".."))) archiveName = NULL; @@ -554,7 +554,8 @@ } } else { - if (bibuf.st_ctime != list->af_list[0].af_ctime) { + if (bibuf.st_ctime != list->af_list[0].af_ctime + || bibuf.st_mtime != list->af_list[0].af_mtime) { /* update busy version */ if (!(list->af_list[0].af_class & AF_VALID)) { list->af_nrevs++; @@ -601,7 +602,7 @@ list->af_listlen = AF_NEWREVS; list->af_extent |= AF_SEGMASK; list->af_datasize = 0; - + /* determine author of busy file */ if ((user = af_afuser (bibuf.st_uid)) == NULL) { af_wng ("ReadAttrs", "invalid userID in inode of busy file"); @@ -621,11 +622,11 @@ } if (writeok) list->af_extent |= AF_UXWRITE; - + if ((list->af_list = (Af_vattrs *)af_malloc (list, (unsigned) (list->af_listlen * sizeof(Af_vattrs)))) == NULL) { return (ERROR); } - + memset ((char *)list->af_list, 0, list->af_listlen * sizeof (Af_vattrs)); /* init attrbuf for busy version (relevant attrs only) */ list->af_list[0].af_name = list->af_cattrs.af_globname; @@ -650,7 +651,7 @@ list->af_list[0].af_note = NULL; tmpkey.af_lpos = 0; afInitUdas (&tmpkey); - list->af_list[0].af_repr = AF_FILE; + list->af_list[0].af_repr = AF_FILE_AF; list->af_list[0].af_fsize = (size_t) bibuf.st_size; list->af_list[0].af_dsize = 0; list->af_list[0].af_data = NULL; @@ -662,7 +663,7 @@ list->af_list[0].af_predrev = AF_NOVNUM; return (AF_OK); } - + /* record date of last modification */ list->af_lastmod = aibuf.st_mtime; @@ -788,10 +789,10 @@ /* write header */ fprintf (attrTmpFile, "%s %d %d %lu\n", AF_ARHEADER, AF_ARCURVERS, - list->af_nrevs, list->af_datasize); + list->af_nrevs, (unsigned long) list->af_datasize); /* write constant attributes */ - fprintf (attrTmpFile, "%s %s %s %s %s %s\n", AF_NAMEID, + fprintf (attrTmpFile, "%s %s %s %s %s %s\n", AF_NAMEID, list->af_cattrs.af_host, list->af_cattrs.af_syspath, list->af_list[0].af_name, @@ -827,15 +828,15 @@ } continue; } - + /* write revision ID */ - fprintf (attrTmpFile, "%s %d %d %d %o %s\n", AF_REVID, + fprintf (attrTmpFile, "%s %d %d %d %o %s\n", AF_REVID, list->af_list[i].af_gen, list->af_list[i].af_rev, list->af_list[i].af_state, - list->af_list[i].af_mode, + (unsigned int) list->af_list[i].af_mode, AF_NOSTRING); /* former variant string */ - + /* write author */ fprintf (attrTmpFile, "\t%s %s %s %s %s %s %s\n", AF_AUTHORID, list->af_list[i].af_auname, @@ -844,7 +845,7 @@ NOTMT (list->af_list[i].af_lckname), NOTMT (list->af_list[i].af_lckhost), NOTMT (list->af_list[i].af_lckdomain)); - + /* write dates */ fprintf (attrTmpFile, "\t%s %ld %ld %ld %ld %ld\n", AF_DATEID, list->af_list[i].af_mtime, @@ -852,18 +853,18 @@ list->af_list[i].af_ctime, list->af_list[i].af_stime, list->af_list[i].af_ltime); - + /* write kind of representation and tree connects */ fprintf (attrTmpFile, "\t%s %d %lu %lu %d %d %d %d\n", AF_REPRID, list->af_list[i].af_repr, - list->af_list[i].af_fsize, - list->af_list[i].af_dsize, + (unsigned long) list->af_list[i].af_fsize, + (unsigned long) list->af_list[i].af_dsize, list->af_list[i].af_succgen, list->af_list[i].af_succrev, list->af_list[i].af_predgen, list->af_list[i].af_predrev); } - + /* write user defined attributes */ fprintf (attrTmpFile, "%s\n", AF_UDASEG); maxindex = list->af_nrevs-1; @@ -910,17 +911,17 @@ /* write notes and data */ fprintf (dataTmpFile, "%s %d\n", AF_DATAHEADER, AF_ARCURVERS); - + maxindex = list->af_nrevs-1; for (i=1; i <= maxindex; i++) { /* skip deleted versions */ if (!(list->af_list[i].af_class & AF_VALID)) { maxindex++; continue; } - + fprintf (dataTmpFile, "%s %d %d %lu\n", AF_NOTEID, list->af_list[i].af_gen, list->af_list[i].af_rev, - list->af_list[i].af_notesize); + (unsigned long) list->af_list[i].af_notesize); if (list->af_list[i].af_notesize > 1) { if (fwrite (list->af_list[i].af_note, sizeof(char), (size_t) list->af_list[i].af_notesize - sizeof(char), dataTmpFile) == 0) { if (!(VATTR(busyptr).af_class & AF_VALID)) @@ -941,8 +942,8 @@ fprintf (dataTmpFile, "%s %d %d %d %lu\n", AF_DATAID, list->af_list[i].af_gen, list->af_list[i].af_rev, - list->af_list[i].af_repr, datasize); - + list->af_list[i].af_repr, (unsigned long) datasize); + if (datasize > 0) { if (fwrite (list->af_list[i].af_data, sizeof(char), (size_t) datasize, dataTmpFile) == 0) { if (!(VATTR(busyptr).af_class & AF_VALID)) @@ -1079,4 +1080,3 @@ return (AF_OK); } /* afWriteArchive */ - --- shapetools-1.4pl6.orig/src/atfs/afattrs.c +++ shapetools-1.4pl6/src/atfs/afattrs.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -74,13 +74,13 @@ strcpy (attrBuf, CATTR(aso).af_host); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTSPATH[3], aNamPtr)) { if (CATTR(aso).af_syspath) strcpy (attrBuf, CATTR(aso).af_syspath); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTUNIXNAME[3], aNamPtr)) { strcpy (attrBuf, VATTR(aso).af_name); if (VATTR(aso).af_type) { @@ -89,12 +89,12 @@ } return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTUNIXPATH[3], aNamPtr)) { strcpy (attrBuf, af_gbusname (CATTR(aso).af_syspath, VATTR(aso).af_name, VATTR(aso).af_type)); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTBOUND[3], aNamPtr)) { char tmpBuf[16]; strcpy (attrBuf, VATTR(aso).af_name); @@ -110,7 +110,7 @@ } return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTBOUNDPATH[3], aNamPtr)) { char tmpBuf[16]; strcpy (attrBuf, af_gbusname (CATTR(aso).af_syspath, VATTR(aso).af_name, VATTR(aso).af_type)); @@ -122,19 +122,19 @@ } return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTNAME[3], aNamPtr)) { if (VATTR(aso).af_name) strcpy (attrBuf, VATTR(aso).af_name); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTTYPE[3], aNamPtr)) { if (VATTR(aso).af_type) strcpy (attrBuf, VATTR(aso).af_type); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTGEN[3], aNamPtr)) { if (VATTR(aso).af_gen == AF_BUSYVERS) strcpy (attrBuf, "busy"); @@ -142,7 +142,7 @@ sprintf (attrBuf, "%d", VATTR(aso).af_gen); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTREV[3], aNamPtr)) { if (VATTR(aso).af_rev == AF_BUSYVERS) strcpy (attrBuf, "busy"); @@ -150,7 +150,7 @@ sprintf (attrBuf, "%d", VATTR(aso).af_rev); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTVERSION[3], aNamPtr)) { if (VATTR(aso).af_gen == AF_BUSYVERS) strcpy (attrBuf, "busy"); @@ -176,57 +176,57 @@ } return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTOWNER[3], aNamPtr)) { sprintf (attrBuf, "%s@%s", CATTR(aso).af_ownname, CATTR(aso).af_owndomain); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTAUTHOR[3], aNamPtr)) { sprintf (attrBuf, "%s@%s", VATTR(aso).af_auname, VATTR(aso).af_audomain); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTDSIZE[3], aNamPtr)) { if (VATTR(aso).af_repr == AF_DELTA) - sprintf (attrBuf, "%lu", VATTR(aso).af_dsize); + sprintf (attrBuf, "%lu", (unsigned long) VATTR(aso).af_dsize); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTSIZE[3], aNamPtr)) { - sprintf (attrBuf, "%lu", VATTR(aso).af_fsize); + sprintf (attrBuf, "%lu", (unsigned long) VATTR(aso).af_fsize); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTMODE[3], aNamPtr)) { - sprintf (attrBuf, "%o", VATTR(aso).af_mode); + sprintf (attrBuf, "%o", (unsigned int) VATTR(aso).af_mode); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTLOCKER[3], aNamPtr)) { if (VATTR(aso).af_lckname) sprintf (attrBuf, "%s@%s", VATTR(aso).af_lckname, VATTR(aso).af_lckdomain); return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTMTIME[3], aNamPtr)) { strcpy (attrBuf, asctime (localtime (&VATTR(aso).af_mtime))); attrBuf[strlen(attrBuf)-1] = '\0'; return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTATIME[3], aNamPtr)) { strcpy (attrBuf, asctime (localtime (&VATTR(aso).af_atime))); attrBuf[strlen(attrBuf)-1] = '\0'; return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTCTIME[3], aNamPtr)) { strcpy (attrBuf, asctime (localtime (&VATTR(aso).af_ctime))); attrBuf[strlen(attrBuf)-1] = '\0'; return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTSTIME[3], aNamPtr)) { if (VATTR(aso).af_stime != AF_NOTIME) { strcpy (attrBuf, asctime (localtime (&VATTR(aso).af_stime))); @@ -234,7 +234,7 @@ } return (attrBuf); } - + if (!afAttrNameCmp (&AF_ATTLTIME[3], aNamPtr)) { if (VATTR(aso).af_ltime != AF_NOTIME) { strcpy (attrBuf, asctime (localtime (&VATTR(aso).af_ltime))); @@ -407,7 +407,7 @@ return (ERROR); /* search entry */ - udaptr = afLookupUda (key, attr); + udaptr = afLookupUda (key, attr); if (!udaptr && (mode == AF_REPLACE)) mode = AF_ADD; @@ -431,7 +431,7 @@ strcat (tmpuda, valptr); afReplUda (key, tmpuda); free (tmpuda); - } + } else { /* add new entry */ if (VATTR(key).af_udanum == AF_MAXUDAS) --- shapetools-1.4pl6.orig/src/atfs/afcache.c +++ shapetools-1.4pl6/src/atfs/afcache.c @@ -171,6 +171,7 @@ list->af_lastmod = (time_t) 0; if (afReadAttrs (list) == ERROR) { + af_frmemlist(list); /* Free up any already allocated memory */ list->af_extent &= ~AF_LISTBUSY; list->af_next = archFreelist; archFreelist = list; @@ -203,17 +204,9 @@ bool writeOk; struct stat iBuf; - /* check if path exists and is a directory */ - if (stat (pathSym, &iBuf) == -1) { - char msgBuf[PATH_MAX+64]; - sprintf (msgBuf, "directory %s does not exist", pathSym); - FAIL ("InitObjCache", msgBuf, AF_EMISC, NULL); - } - else if (!S_ISDIR (iBuf.st_mode)) { - char msgBuf[PATH_MAX+64]; - sprintf (msgBuf, "%s is not a directory", pathSym); - FAIL ("InitObjCache", msgBuf, AF_EMISC, NULL); - } + /* Removed stat() call here; afObjCacheRead() performs a stat on */ + /* the file, and would declare errors as appropriate. The */ + /* redundant stat() *really* costs time. - tdr */ /* init hashtable if it is not yet done */ if (!hashInit) { @@ -237,6 +230,17 @@ return (oldlist); } } + /* check if path exists and is a directory */ + if (stat (pathSym, &iBuf) == -1) { + char msgBuf[PATH_MAX+64]; + sprintf (msgBuf, "directory %s does not exist", pathSym); + FAIL ("InitObjCache", msgBuf, AF_EMISC, NULL); + } + else if (!S_ISDIR (iBuf.st_mode)) { + char msgBuf[PATH_MAX+64]; + sprintf (msgBuf, "%s is not a directory", pathSym); + FAIL ("InitObjCache", msgBuf, AF_EMISC, NULL); + } /* if there are no more descriptors available - allocate new space */ if (archFreelist == NULL) { @@ -272,6 +276,7 @@ list->af_cattrs.af_owndomain = af_enterdomain (owner->af_userdomain); if (afObjCacheRead (list) == ERROR) { + af_frmemlist(list); /* Free up any already allocated memory */ list->af_extent &= ~AF_LISTBUSY; list->af_next = archFreelist; archFreelist = list; --- shapetools-1.4pl6.orig/src/atfs/afconfig.h +++ shapetools-1.4pl6/src/atfs/afconfig.h @@ -0,0 +1,402 @@ +/* Copyright (C) 1993,1994 by the author(s). + + This software is published in the hope that it will be useful, but + WITHOUT ANY WARRANTY for any part of this software to work correctly + or as described in the manuals. See the ShapeTools Public License + for details. + + Permission is granted to use, copy, modify, or distribute any part of + this software but only under the conditions described in the ShapeTools + Public License. A copy of this license is supposed to have been given + to you along with ShapeTools in a file named LICENSE. Among other + things, this copyright notice and the Public License must be + preserved on all copies. +*/ +/* + * AtFS -- Attribute Filesystem + * + * config.h -- system dependent definitions + * + * Author: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) + * + * $Header: config.h[7.1] Tue Aug 23 16:58:49 1994 andy@cs.tu-berlin.de frozen $ + */ + +/* do only once */ +#ifndef _af_defs_ +#define _af_defs_ + +/* if no explicit system type is defined */ +#if (!defined(s_aix) && !defined(s_hpux) && !defined(s_irix) && !defined(s_mach) && !defined(s_sunos_4) && !defined(s_sol_2) && !defined(s_svr_4) && !defined(s_ultrix) && !defined(s_linux)) +# define s_linux +#endif + +#ifdef __STDC__ +# define A(alist) alist +#else +# define A(alist) () +#endif + +/*===================== + * includes + *=====================*/ + + +/* POSIX include files */ +#include +#if defined(s_linux) +# include +#else +# include +#endif +#include +#include +#if !defined(s_irix) && !defined(s_linux) +#ifdef NULL +# undef NULL +#endif +#endif +#include +#include +#include +#include +#include +#include +#if defined(s_mach) +# include +# include +# include +# include +#else +# include +# include +# include +# include +# include +#endif + +/* system dependent includes */ +#if !defined(_POSIX_SOURCE) +# include +# include +#endif + +/* debugging */ +#ifdef DEBUG_MALLOC +#include "malloc.h" +#endif + +/*================================== + * constants and macros and types + *==================================*/ + +/*** general ***/ + +#define Sfunc_t int /* type of function argument to signal call */ +#define Sigret_t void /* return type of signal system call */ + +#if defined(s_aix) +# if defined(_POSIX_SOURCE) +# include +# include +# define NAME_MAX _D_NAME_MAX +# else +# define NAME_MAX MAXNAMLEN +# define MAXHOSTNAMELEN 32 +# endif +# define MAXDOMAIN 255 +# define NEED_MNTENT +# define vfork fork + +#elif defined(s_hpux) +# define MAXDOMAIN 255 +# define PATH_MAX MAXPATHLEN +# define NAME_MAX MAXNAMLEN +# define OPEN_MAX NOFILE +# define NEED_REGEX +# define HAS_MNTENT + +#elif defined(s_irix) +# define MAXDOMAIN 255 +# define vfork fork +# define HAS_MNTENT + +#elif defined(s_mach) +# define MAXDOMAIN 255 +# define PATH_MAX MAXPATHLEN +# define NAME_MAX MAXNAMLEN +# define OPEN_MAX NOFILE +# define NGROUPS_MAX NGROUPS +typedef unsigned short mode_t; +typedef int pid_t; +# define dirent direct +# define NO_SIGSET +# define NEED_GETCWD +# define NEED_STRDUP +# define NEED_UTIMBUF +# define HAS_MNTENT + +#elif defined(s_osf1) +# include +# include +# define MAXDOMAIN 255 +# define OPEN_MAX NOFILE +# define NEED_MNTENT + +#elif defined(s_sunos_4) +# if defined(_POSIX_SOURCE) +# define MAXDOMAIN 255 +# define MAXHOSTNAMELEN 64 +# define PATH_MAX 1024 +# define NAME_MAX 255 +# define OPEN_MAX 64 +# else +# define PATH_MAX MAXPATHLEN +# define NAME_MAX MAXNAMLEN +# define OPEN_MAX NOFILE +# endif +# define HAS_MNTENT + +#elif defined(s_svr_4) +# define MAXDOMAIN 255 +# define MAXHOSTNAMELEN 64 +# if defined(_POSIX_SOURCE) +# define NAME_MAX 512 +# define OPEN_MAX 64 +# else +# ifndef PATH_MAX +# define PATH_MAX MAXPATHLEN +# endif +# ifndef NAME_MAX +# define NAME_MAX MAXNAMLEN +# endif +# ifndef OPEN_MAX +# define OPEN_MAX NOFILE +# endif +# endif +# define NEED_REGEX +# define HAS_MNTTAB + +#elif defined(s_sol_2) +#include +# define MAXDOMAIN 255 +# define MAXHOSTNAMELEN 64 +# if defined(_POSIX_SOURCE) +# define NAME_MAX 512 +# define OPEN_MAX 64 +# else +# ifndef PATH_MAX +# define PATH_MAX MAXPATHLEN +# endif +# ifndef NAME_MAX +# define NAME_MAX MAXNAMLEN +# endif +# ifndef OPEN_MAX +# define OPEN_MAX NOFILE +# endif +# endif +# define HAS_MNTTAB + +#elif defined(s_linux) +# include +# include +# include +# define MAXDOMAIN 255 +# define HAS_MNTENT +# ifndef OPEN_MAX +# define OPEN_MAX NOFILE +# endif + +#elif defined(s_ultrix) +# define MAXDOMAIN 255 +# define NEED_MNTENT +# define NEED_STRDUP +#endif + +/*** mount table stuff ***/ + +#if defined(HAS_MNTENT) +# include +# define atMntent mntent +# define at_mnt_dir mnt_dir +# define at_mnt_fsname mnt_fsname +# define atSetmntent setmntent +# define atGetmntent getmntent +# define atEndmntent endmntent +#elif defined(HAS_MNTTAB) +# include +# define atMntent mnttab +# define at_mnt_dir mnt_mountp +# define at_mnt_fsname mnt_special +# define atSetmntent fopen +# define atEndmntent fclose + struct atMntent* atGetmntent A((FILE *file)); + +#else /* NEED_MNTENT */ + struct atMntent { + char *at_mnt_fsname; + char *at_mnt_dir; + char *at_mnt_type; + char *at_mnt_opts; + int at_mnt_freq; + int at_mnt_passno; + }; + + int atEndmntent A((FILE *file)); + struct atMntent* atGetmntent A((FILE *file)); + FILE* atSetmntent A((const char *path, const char *type)); +#endif + + +/*** specials ***/ + +#if defined(s_mach) +#define S_IRWXU 0000700 /* rwx------ */ +#define S_IRUSR 0000400 /* r-------- */ +#define S_IWUSR 0000200 /* -w------- */ +#define S_IXUSR 0000100 /* --x------ */ +#define S_IRWXG 0000070 /* ---rwx--- */ +#define S_IRGRP 0000040 /* ---r----- */ +#define S_IWGRP 0000020 /* ----w---- */ +#define S_IXGRP 0000010 /* -----x--- */ +#define S_IRWXO 0000007 /* ------rwx */ +#define S_IROTH 0000004 /* ------r-- */ +#define S_IWOTH 0000002 /* -------w- */ +#define S_IXOTH 0000001 /* --------x */ + +#define S_ISBLK(mode) ((mode & S_IFMT) == S_IFBLK) +#define S_ISCHR(mode) ((mode & S_IFMT) == S_IFCHR) +#define S_ISDIR(mode) ((mode & S_IFMT) == S_IFDIR) +#define S_ISFIFO(mode) ((mode & S_IFMT) == S_IFIFO) +#define S_ISREG(mode) ((mode & S_IFMT) == S_IFREG) + +#define WEXITSTATUS(a) ((a).w_T.w_Retcode) +#endif + +/*** own definitions ***/ +#define TYPE_MAX NAME_MAX +#define HOST_MAX MAXHOSTNAMELEN +#define DOMAIN_MAX MAXDOMAIN + +/*** obsolete definitions ***/ +#define MAXUSERNAMELEN 64 + +/*===================== + * types + *=====================*/ + +#if defined(s_mach) +#define Wait_t union wait +#else +#define Wait_t int /* type of argument for wait call */ +#endif + +#if defined(NEED_UTIMBUF) +struct utimbuf { + time_t actime; /* set the access time */ + time_t modtime; /* set the modification time */ +}; +#endif + +/*===================== + * prototypes + *=====================*/ + +/*** missing POSIX prototypes ***/ + +#if defined(s_aix) +#elif defined(s_mach) +void _exit A((int status)); +int access A((const char *path, int amode)); +int chdir A((const char *path)); +int chmod A((const char *path, mode_t mode)); +int chown A((const char *path, uid_t owner, gid_t group)); +int close A((int filedes)); +int creat A((const char *path, mode_t mode)); +int dup A((int filedes)); +int execve A((const char *path, const char *argv[], const char *envp[])); +int execvp A((const char *file, const char *argv[])); +int fcntl A((int filedes, int cmd, ...)); +FILE *fdopen A((int filedes, const char *type)); +int fileno A((FILE *stream)); +pid_t fork A((void)); +char *getcwd A((char *buf, size_t size)); +gid_t getegid A((void)); +uid_t geteuid A((void)); +int getgroups A((int gidsetsize, gid_t grouplist[])); +pid_t getpid A((void)); +pid_t getppid A((void)); +int isatty A((int filedes)); +int kill A((pid_t oid, int signal)); +int link A((const char *existing, const char *new)); +int mkdir A((const char *path, mode_t mode)); +int open A((const char *path, int oflag, ...)); +int pipe A((int filedes[2])); +int read A((int filedes, void *buf, unsigned int nbyte)); +unsigned int sleep A((unsigned int seconds)); +int tolower A((int c)); +mode_t umask A((mode_t cmask)); +int unlink A((const char *path)); +int utime A((const char *path, const struct utimbuf *times)); +int write A((int filedes, const void*buf, unsigned int nbyte)); +#elif defined(s_sunos_4) +int fflush A((FILE *stream)); +int fclose A((FILE *stream)); +int fprintf A((FILE *stream, const char *format, ...)); +int printf A((const char *format, ...)); +int fscanf A((FILE *stream, const char *format, ...)); +int fputs A((const char *s, FILE *stream)); +int fgetc A((FILE *stream)); +int fputc A((int c, FILE *stream)); +size_t fread A((void *ptr, size_t size, size_t nobj, FILE *stream)); +size_t fwrite A((const void *ptr, size_t size, size_t nobj, FILE *stream)); +void perror A((const char *s)); + +#ifndef DEBUG_MALLOC +void *memmove A((void *dest, const void *source, size_t len)); +void *memchr A((const void *string, int chr, size_t len)); +void *memset A((void *string, int c, size_t len)); +#endif + +time_t time A((time_t *timeptr)); +time_t mktime A((struct tm *timeptr)); + +int system A((const char *string)); +int tolower A((int c)); +#elif defined(s_svr_4) || defined(s_sol_2) +int tolower A((int c)); +#endif + +/*** non POSIX prototypes ***/ + +int openlog A((char *ident, int logopt, int facility)); +int syslog A((int priority, char *message, ...)); +int closelog A((void)); +FILE* popen A((const char *command, const char *mode)); +int pclose A((FILE *stream)); +#if (!defined(s_linux)) +int getdomainname A((char *name, int namelen)); +#endif +#if !defined(s_irix) +char* re_comp A((char *string)); +int re_exec A((char *string)); +#endif +char* strdup A((const char *string)); +int symlink A((const char *name1, const char *name2)); +#if (!defined(s_hpux) && !defined(s_svr_4) && !defined(s_sol_2) && !defined(s_irix)) +int ioctl A((int fd, int request, caddr_t arg)); +int vfork A((void)); +#if (!defined(s_linux) && !defined(s_sol_2)) +int getopt A((int argc, char **argv, char *optstring)); +#endif +#endif +#if (!defined(s_hpux) && !defined(s_linux)) +int gethostname A((char *name, int namelen)); +#endif + +/*** own prototypes ***/ + +void disableSig A((int signo)); +void enableSig A((void)); + +#endif /* _af_defs_ */ --- shapetools-1.4pl6.orig/src/atfs/afdelta.c +++ shapetools-1.4pl6/src/atfs/afdelta.c @@ -176,7 +176,7 @@ register FILE *tmpfile; /* this error should never occur */ - if (VATTR(deltakey).af_repr == AF_FILE) + if (VATTR(deltakey).af_repr == AF_FILE_AF) FATAL ("undodelta", "wrong kind of representation", AF_EINTERNAL, ERROR); if ((deltachain = (Af_key *) malloc ((unsigned) (AF_SEGLEN * sizeof (Af_key)))) == NULL) --- shapetools-1.4pl6.orig/src/atfs/afenviron.c +++ shapetools-1.4pl6/src/atfs/afenviron.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -24,9 +24,16 @@ #include #include +#include #include "atfs.h" #include "afarchive.h" +#if defined(s_linux) +#include +#include +#include +#endif + /*======================================================================== * af_getuid - returns uid of user if from local host * AF_ERROR if user is unknown @@ -91,14 +98,14 @@ { static Af_user result; register struct passwd *pwent; - + if (!initcaller) /* if caller struct is not yet initialized */ { calleruid = geteuid(); if ((pwent = getpwuid (calleruid)) == NULL) FAIL ("getuser", "", AF_EINVUSER, NULL); strcpy (caller.af_username, pwent->pw_name); - strcpy (caller.af_userhost, af_gethostname ()); - strcpy (caller.af_userdomain, af_getdomain ()); + strcpy (caller.af_userhost, af_gethostname ()); + strcpy (caller.af_userdomain, af_getdomain ()); initcaller = TRUE; } if (uid == calleruid) @@ -107,8 +114,8 @@ if ((pwent = getpwuid (uid)) == NULL) FAIL ("getuser", "", AF_EINVUSER, NULL); strcpy (result.af_username, pwent->pw_name); - strcpy (result.af_userhost, af_gethostname ()); - strcpy (result.af_userdomain, af_getdomain ()); + strcpy (result.af_userhost, af_gethostname ()); + strcpy (result.af_userdomain, af_getdomain ()); return (&result); } @@ -145,7 +152,7 @@ } } } - + if ((VATTR(key).af_mode & 0400) == 0400) /* readable by owner */ { uid = geteuid(); auuid = af_getuid (VATTR(key).af_auname, VATTR(key).af_auhost, VATTR(key).af_audomain); @@ -153,7 +160,7 @@ if ((auuid == uid) || (ownuid == uid)) return (AF_OK); } - + return (ERROR); } @@ -178,7 +185,7 @@ ok = TRUE; else { /* if object is locked by someone else */ - if (lockeruid != (uid_t) ERROR) + if (lockeruid != (uid_t) ERROR) goto exit; } } @@ -189,7 +196,7 @@ if (!ok && (mode & AF_WORLD)) { ok = TRUE; } - + exit: /* if access is not ok, or AtFS subdir is not writable */ if (!ok) @@ -220,6 +227,69 @@ * af_getdomain *======================*/ +#if defined(s_sol_2) +static char *getdefaultdomainname(char *domainName, int max) +{ + char line[512], *start, *p; + + FILE *fd = fopen("/etc/resolv.conf", "r"); + + domainName[0] = '\0'; + if (fd == NULL) + return domainName; + while (fgets(line, 512, fd)) { + if (strncmp(line, "domain", 6) == 0 && (line[6] == ' ' || line[6] =='\t')) { + start = &line[7]; + while (*start == ' ' || *start =='\t') + start++; + p = start; + while (isalnum(*p) || ispunct(*p)) + p++; + *p = '\0'; + strcpy(domainName, start); + break; + } + } + fclose(fd); + return domainName; +} +#endif +#if defined(s_linux) +static char *getdefaultdomainname(char *domainName, int max) +{ + char line[512], *start, *p; + struct hostent *hp; + FILE *fd; + + gethostname(line, 512); + if ((hp = gethostbyname(line))) { + char *p = strchr(hp->h_name, '.'); + if (p) + return strcpy(domainName, p+1); + } + + fd = fopen("/etc/resolv.conf", "r"); + domainName[0] = '\0'; + if (fd == NULL) + return domainName; + while (fgets(line, 512, fd)) { + if (strncmp(line, "domain", 6) == 0 && (line[6] == ' ' || line[6] =='\t')) { + start = &line[7]; + while (*start == ' ' || *start =='\t') + start++; + p = start; + while (isalnum(*p) || ispunct(*p)) + p++; + *p = '\0'; + strcpy(domainName, start); + break; + } + } + fclose(fd); + return domainName; +} +#endif + static char *domainSym = NULL; EXPORT char *af_getdomain () @@ -229,10 +299,21 @@ if (domainSym) return (domainSym); - getdomainname (domainName, DOMAIN_MAX); - if (!domainName[0]) { - domainSym = af_gethostname (); - return (domainSym); + domainSym = getenv("ATFS_DOMAIN"); + + if (domainSym) { + strcpy(domainName, domainSym); + } + else { +#if defined(s_sol_2) || defined(s_linux) + getdefaultdomainname(domainName, DOMAIN_MAX); +#else + getdomainname (domainName, DOMAIN_MAX); +#endif + if (!domainName[0]) { + domainSym = af_gethostname (); + return (domainSym); + } } domainName[DOMAIN_MAX] = '\0'; --- shapetools-1.4pl6.orig/src/atfs/aferror.c +++ shapetools-1.4pl6/src/atfs/aferror.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -36,8 +36,11 @@ * af_serr -- report error without writing error protocol *=========================================================================*/ +#include extern int errno; +#if 0 extern char *sys_errlist[]; +#endif EXPORT int af_errno, af_nodiag = FALSE; @@ -49,7 +52,7 @@ af_nodiag = TRUE; af_err (routine, called, errcd); af_nodiag = FALSE; -} +} /*========================================================================= * af_err -- write error protocol @@ -57,7 +60,7 @@ static char diagstr[265]; /* for diagnistics of AF_EMISC */ -static char *errors[] = +static char *errors[] = { "", "", "", "permission denied", /* 3 */ @@ -140,7 +143,7 @@ #ifdef SYSLOG switch (errcd) { case AF_ESYSERR: - syslog (LOG_ERR, "%s called %s%s: %s error in %s (%m)", + syslog (LOG_ERR, "%s called %s%s: %s error in %s (%m)", logName, prefix, routine, errors [abs(errcd)], called); break; case AF_EINCONSIST: @@ -157,10 +160,10 @@ syslog (LOG_ERR, "%s called %s%s: %s", logName, prefix, routine, errors [abs(errcd)]); } #else - fprintf (errfile, "%s pid[%d] %s",af_gethostname(),getpid (), af_asctime ()); + fprintf (errfile, "%s pid[%d] %s",af_gethostname(), (int) getpid(), af_asctime ()); switch (errcd) { case AF_ESYSERR: - fprintf (errfile, "\t%s called %s%s: %s error in %s\n", + fprintf (errfile, "\t%s called %s%s: %s error in %s\n", logName, prefix, routine, errors [abs(errcd)], called); break; case AF_EINCONSIST: @@ -225,7 +228,7 @@ #ifdef SYSLOG syslog (LOG_ERR, "%s called %s%s: Warning - %s", logName, prefix, routine, comment); #else - fprintf (errfile, "%s pid[%d] %s", af_gethostname(), getpid (), af_asctime ()); + fprintf (errfile, "%s pid[%d] %s", af_gethostname(), (int) getpid(), af_asctime ()); fprintf (errfile, "\t%s called %s%s: Warning - %s\n", logName, prefix, routine, comment); #endif --- shapetools-1.4pl6.orig/src/atfs/afnames.c +++ shapetools-1.4pl6/src/atfs/afnames.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -133,7 +133,7 @@ curAtFSMode = ibuf.st_mode; return (af_afuser (ibuf.st_uid)); -} /* afArchiveOwner */ +} /* afArchiveOwner */ EXPORT mode_t afArchiveMode (archDirSym) char *archDirSym; @@ -324,7 +324,7 @@ #if (NAME_MAX < 128) char nameFragment[NAME_MAX-4]; int nameLen = strlen (unixName); - + if (nameLen > NAME_MAX-5) { strcpy (nameFragment, &unixName[nameLen-(NAME_MAX-5)]); sprintf (uniqName, "%s%s%c", AF_CACHEFILEID, nameFragment, uniqChar); @@ -350,9 +350,9 @@ char tmpname[PATH_MAX]; if (pathname && pathname[0]) - sprintf (tmpname, "%s/tmp%d%d", pathname, getpid(), count++); + sprintf (tmpname, "%s/tmp%d%d", pathname, (int) getpid(), count++); else - sprintf (tmpname, "%s/atfs%d%d", AF_TMPDIR, getpid(), count++); + sprintf (tmpname, "%s/atfs%d%d", AF_TMPDIR, (int) getpid(), count++); return (af_entersym (tmpname)); } /* af_gtmpname */ @@ -378,7 +378,7 @@ strcat (busyname, type); } return (af_entersym (busyname)); -} /* af_gbusname */ +} /* af_gbusname */ /*================================================================ --- shapetools-1.4pl6.orig/src/atfs/afobjcache.c +++ shapetools-1.4pl6/src/atfs/afobjcache.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -97,7 +97,7 @@ EXPORT int afObjCacheRead (list) Af_revlist *list; -{ +{ char idStr[AF_SEGSTRLEN+1], line[AF_LINESIZ], *itemPtr; char cacheName[PATH_MAX], *udaBuf; struct stat cacheIbuf; @@ -162,7 +162,7 @@ return (ERROR); } memset ((char *) list->af_list, 0, list->af_listlen * sizeof (Af_vattrs)); - + if (list->af_nrevs == 0) { if (cacheFile) afCloseUnlock (cacheFile, AF_READ, list); @@ -232,7 +232,7 @@ list->af_list[i].af_ltime = AF_NOTIME; list->af_list[i].af_notesize = 0; list->af_list[i].af_note = NULL; - + /* read kind of representation and size */ itemPtr = afNextItem (itemPtr); list->af_list[i].af_repr = (short) atoi (itemPtr); @@ -339,11 +339,11 @@ /* write name and version number */ fprintf (tmpFile, "%s %s %s %d %d %o %s\n", AF_NAMEID, - list->af_list[i].af_name, + list->af_list[i].af_name, NOTMT(list->af_list[i].af_type), list->af_list[i].af_gen, list->af_list[i].af_rev, - list->af_list[i].af_mode, + (unsigned int) list->af_list[i].af_mode, list->af_list[i].af_hashname); /* write author */ fprintf (tmpFile, "%s %s %s %s\n", AF_AUTHORID, @@ -357,8 +357,8 @@ list->af_list[i].af_stime, list->af_list[i].af_ctime, list->af_list[i].af_repr, - list->af_list[i].af_fsize, - list->af_list[i].af_dsize); + (unsigned long) list->af_list[i].af_fsize, + (unsigned long) list->af_list[i].af_dsize); /* write user defined attributes */ fprintf (tmpFile, "%s\n", AF_UDAID); @@ -503,7 +503,7 @@ else if (oldestNameIndex != -1) outKey->af_lpos = oldestNameIndex; } - + /* if outKey is still not defined, clean out the oldest ASO of all */ if (outKey->af_lpos == -1) { maxIndex = cacheList->af_nrevs-1; @@ -520,7 +520,7 @@ } } /* for */ } - + if (outKey->af_lpos == -1) FAIL ("ObjCacheAdd", "cannot find space in derived object cache", AF_EMISC, ERROR); @@ -573,7 +573,7 @@ VATTR(outKey).af_class &= ~AF_VALID; cacheList->af_nrevs--; FAIL ("ObjCacheAdd", "cpfile", AF_ESYSERR, ERROR); - } + } if (addAso) cacheList->af_nrevs++; VATTR(outKey).af_hashname = uniqName; --- shapetools-1.4pl6.orig/src/atfs/afsys.h +++ shapetools-1.4pl6/src/atfs/afsys.h @@ -198,7 +198,9 @@ #define AF_CHUNK 0 #define AF_DELTA 1 -#define AF_FILE 2 /* version resides in an own file (busy version) */ +//#define AF_FILE 2 /* version resides in an own file (busy version) */ +// renamed, conflict on linux +#define AF_FILE_AF 2 /* version resides in an own file (busy version) */ /**** Version numbering ****/ --- shapetools-1.4pl6.orig/src/atfs/atfs.h +++ shapetools-1.4pl6/src/atfs/atfs.h @@ -30,7 +30,7 @@ * Installation dependent constants *=========================================================================*/ -#include "config.h" +#include "afconfig.h" #define USER_MAX 64 --- shapetools-1.4pl6.orig/src/atfs/atfsrepair.c +++ shapetools-1.4pl6/src/atfs/atfsrepair.c @@ -1,19 +1,19 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be preserved on all copies. */ /* - * AtFS -- Attribute Filesystem + * AtFS -- Attribute Filesystem * * atfsrepair.c -- try to repair corrupted archive * @@ -27,8 +27,11 @@ #include "afarchive.h" #include "atfsrepair.h" +#include extern int errno; +#if 0 extern char *sys_errlist[]; +#endif /*========================================================================== * globals @@ -149,7 +152,7 @@ printf ("[%s] ", expAnswer); strBuf[0] = '\0'; answer[0] = '\0'; - gets (strBuf); + fgets (strBuf, 256, stdin); sscanf (strBuf, "%s", answer); if (answer[0] == '\0') return TRUE; /* assumption acknowledged */ cp = answer; @@ -206,15 +209,15 @@ if (input->curPos == input->length) return; /* search next white space */ - while ((input->string[input->curPos] != ' ') && - (input->string[input->curPos] != '\t') && + while ((input->string[input->curPos] != ' ') && + (input->string[input->curPos] != '\t') && (input->string[input->curPos] != '\n')) if (++input->curPos == input->length) return; /* skip white spaces */ - while ((input->string[input->curPos] == ' ') || - (input->string[input->curPos] == '\t') || + while ((input->string[input->curPos] == ' ') || + (input->string[input->curPos] == '\t') || (input->string[input->curPos] == '\n')) if (++input->curPos == input->length) return; @@ -242,7 +245,7 @@ str1[0] = '\0'; return (str1); } - + while ((*str1 = *str2)) { if ((*str2 ==' ') || (*str2 =='\t') || (*str2 =='\n')) { *str1 = '\0'; return (str1); } @@ -282,7 +285,7 @@ else return (NULL); } - + LOCAL char *complainString (name, string1, string2, level) char *name, *string1, *string2; int level; @@ -295,7 +298,7 @@ } return (string2); } - + LOCAL int verifyInt (name, input, level) char *name; Input input; @@ -304,7 +307,7 @@ int value; value = atoi (&input.string[input.curPos]); - + if (level <= verbosityLevel) { fprintf (stdout, "-> Verify:\tassume %s to be: ->%d<-, ok ? (y/n) ", name, value); if (askConfirm ("y")) @@ -314,7 +317,7 @@ } return (value); } - + LOCAL int verifyOct (name, input, level) char *name; Input input; @@ -333,7 +336,7 @@ } return (value); } - + LOCAL int verifyDate (name, input, level) char *name; Input input; @@ -410,7 +413,7 @@ arPath = afArchivePath (af_uniqpath(path)); cAttrs.name = af_afname (filename); cAttrs.type = af_aftype (filename); - + if (repairCache) { char *busyname = af_gbusname (NULL, cAttrs.name, cAttrs.type); if (NORMAL <= verbosityLevel) { @@ -443,7 +446,7 @@ } arFilename = af_entersym (afArchiveName (arPath, AF_ATTRDIR, cAttrs.name, cAttrs.type, AF_WRITE)); - + if ((owner = afArchiveOwner (arPath, &writeOk, &arGid)) == NULL) { if (NORMAL <= verbosityLevel) fprintf (stdout, "-> Warning:\tcannot determine owner of AtFS subdirectory !\n"); @@ -538,7 +541,7 @@ fclose (inFile); cleanup (); } - + fclose (inFile); attrIn.string[attrIn.length] = '\0'; attrIn.string[attrIn.length+1] = '\0'; @@ -553,7 +556,7 @@ attrIn.length = 0; attrIn.curPos = 0; } - + datFilename = af_entersym (afArchiveName (arPath, AF_DATADIR, cAttrs.name, cAttrs.type,AF_WRITE)); if ((inFile = fopen (datFilename, "r"))) { if ((dataIn.length = af_retfsize (datFilename)) == 0) { @@ -612,23 +615,23 @@ /* try to determine archive version */ if (!strncmp (attrIn.string, AF_ARHEADER, AF_SEGSTRLEN)) arVersion = atoi (&(attrIn.string[AF_SEGSTRLEN+1])); - + lookup (&attrIn, AF_NAMEID, 0); nextItem (&attrIn); /* host */ sPtr = verifyString ("hostname", attrIn, EDIT); cAttrs.host = af_entersym (sPtr); - + nextItem (&attrIn); /* syspath */ sPtr = verifyString ("syspath", attrIn, EDIT); cAttrs.syspath = af_entersym (sPtr); - + nextItem (&attrIn); /* name */ sPtr = verifyString ("name", attrIn, EDIT); if (strcmp (sPtr, cAttrs.name)) sPtr = complainString ("name", sPtr, cAttrs.name, NORMAL); cAttrs.name = af_entersym (sPtr); - + nextItem (&attrIn); /* type */ sPtr = verifyString ("type", attrIn, EDIT); if (strcmp (sPtr ? sPtr : "", cAttrs.type)) @@ -694,7 +697,7 @@ revList[0].lockerDomain = NULL; if (revList[0].lockerName && (revList[0].lockerHost == NULL)) { - if (SILENT < verbosityLevel) + if (SILENT < verbosityLevel) fprintf (stdout,"-> Warning:\tlocker's host missing - inserting author's host\n"); revList[0].lockerHost = revList[0].authorHost; } @@ -731,7 +734,7 @@ nextItem (&attrIn); revList[curRev].mode = (mode_t) verifyOct ("mode", attrIn, EDIT); nextItem (&attrIn); /* variant (ignore) */ - + lookup (&attrIn, AF_AUTHORID, 1); nextItem (&attrIn); /* author's name */ sPtr = verifyString ("author's name", attrIn, EDIT); @@ -742,7 +745,7 @@ } else revList[curRev].authorName = af_entersym (sPtr); - + nextItem (&attrIn); /* author's host */ sPtr = verifyString ("author's host", attrIn, EDIT); if (sPtr == NULL) { @@ -752,7 +755,7 @@ } else revList[curRev].authorHost = af_entersym (sPtr); - + if (arVersion > 2) { nextItem (&attrIn); /* author's domain */ sPtr = verifyString ("author's domain", attrIn, EDIT); @@ -836,7 +839,7 @@ fprintf (stdout, "-> Warning:\tlocking date missing -- %s\n", "inserting actual date"); revList[curRev].lockTime = af_acttime(); } - + lookup (&attrIn, AF_REPRID, 1); nextItem (&attrIn); revList[curRev].representation = verifyInt ("repr", attrIn, EDIT); @@ -853,7 +856,7 @@ nextItem (&attrIn); revList[curRev].predRev = verifyInt ("pred. rev", attrIn, EDIT); } /* revision loop */ - + /*============================================ * Phase 3 (check user defined attributes) *============================================*/ @@ -870,7 +873,7 @@ size = 0; while (i < MAXUDAS) { udaList[curUda].uda[i] = &attrIn.string[attrIn.curPos]; - udaList[curUda].size = udaList[curUda].size + + udaList[curUda].size = udaList[curUda].size + (strlen (udaList[curUda].uda[i]) + sizeof (char)); while (attrIn.string[attrIn.curPos] != '\0') attrIn.curPos++; @@ -886,7 +889,7 @@ udaList[curUda].uda[i] = NULL; curUda++; } /* revision loop */ - + /*========================= * Phase 4 (check notes) *=========================*/ @@ -914,7 +917,7 @@ noteList[curNote].size = size; curNote++; } /* revision loop */ - + /*======================= * Phase 5 (check data) *=======================*/ @@ -922,7 +925,7 @@ /* try to determine archive version */ if (!strncmp (dataIn.string, AF_DATAHEADER, AF_SEGSTRLEN)) arVersion = atoi (&(dataIn.string[AF_SEGSTRLEN+1])); - + dataIn.curPos = 0; curData = 0; while (lookup (&dataIn, AF_DATAID, 1) != -1) { @@ -953,13 +956,13 @@ if (size == 0) dataList[curData].contents = NULL; dataList[curData].size = size; - + /* convert delta */ if ((size > 0) && (arVersion == 1) && (dataList[curData].representation == AF_DELTA)) { dataList[curData].contents = afConvertDelta (dataList[curData].contents, dataList[curData].size, &newDeltaSize); dataList[curData].size = newDeltaSize; } - + /* check plausibility of delta */ if ((dataList[curData].size > 0) && (dataList[curData].representation == AF_DELTA)) { if ((dataList[curData].contents[0] != '\0') && (dataList[curData].contents[0] != '\01')) { @@ -970,7 +973,7 @@ } curData++; } /* revision loop */ - + /*============================== * Phase 6 (check connectivity) *==============================*/ @@ -1006,7 +1009,7 @@ udaList[i].revision = revList[i].revision; } } - + for (i=0; i No archive files written\n"); return (AF_OK); } - + /* keep old archive */ backup (arPath, "attribute", AF_ATTRBACKUPDIR, arFilename); @@ -1337,7 +1341,7 @@ return (-1); } } - + sprintf (oldArFullName, "%s/%s", archivePath, archiveName); sprintf (oldDatFullName, "%s/%s", archivePath, archiveName); oldDatFullName[strlen(oldDatFullName)-1] = AF_OLD_DATAEXT; @@ -1562,7 +1566,7 @@ len = strlen (fileName) - 1; fileName[len] = '\0'; } - + if (setjmp (env) == 0) { convert (arPathPtr, dirEntry->d_name, fileName); repair (dirName, fileName); @@ -1601,7 +1605,8 @@ int argc; char **argv; { - short c, i, nfiles, retCode = 0; + int c, nfiles, retCode = 0; + volatile int i; while ((c = getopt (argc, argv, "Ceinqv")) != EOF) { switch (c) { @@ -1628,7 +1633,7 @@ exit (1); } } /* end of command line parsing */ - + signal (SIGINT, sigHand); nfiles = argc - optind; --- shapetools-1.4pl6.orig/src/atfs/cacheadm.c +++ shapetools-1.4pl6/src/atfs/cacheadm.c @@ -23,6 +23,7 @@ */ #include "atfs.h" +#include int quietMode = FALSE; int maxCacheAttr = -1; @@ -76,7 +77,9 @@ extern char *optarg; extern int optind; extern int errno; +#if 0 extern char *sys_errlist[]; +#endif EXPORT int main (argc, argv) int argc; --- shapetools-1.4pl6.orig/src/atfs/config.c +++ shapetools-1.4pl6/src/atfs/config.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -22,7 +22,7 @@ * $Header: config.c[7.0] Fri Jun 25 14:32:35 1993 andy@cs.tu-berlin.de frozen $ */ -#include "config.h" +#include "afconfig.h" /*========================= * symlink @@ -62,7 +62,8 @@ if (re_pat && *re_pat) free(re_pat); - if ((re_pat = regcmp(s, (char *) NULL)) == (char *) NULL) + if ((s == (char *) NULL) || + (re_pat = regcmp(s, (char *) NULL)) == (char *) NULL) return "Invalid argument"; return (char *) NULL; --- shapetools-1.4pl6.orig/src/atfs/config.h +++ shapetools-1.4pl6/src/atfs/config.h @@ -54,6 +54,9 @@ #include #include #include + +#include + #include #include #include --- shapetools-1.4pl6.orig/src/atfstk/Makefile +++ shapetools-1.4pl6/src/atfstk/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[7.0] Thu Jul 29 18:36:35 1993 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -40,28 +41,31 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = /home/stone/shape -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLSHAPELIBPATH = $(INSTALLBASE)/lib/shape INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -81,11 +85,14 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. PROGTARGET = vbind -LIBTARGET = libAtFStk.a +LIBNAME = AtFStk +LIBTARGET = lib$(LIBNAME).a +SHLIBVERSION = 7.0 +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) # The release number generator. The version number of this file will # be used as release identifier for the whole system. @@ -96,11 +103,11 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # Aliases for (filesystem links to) $(TARGET). -ALIASES = +ALIASES = # The regular source and header files. @@ -115,9 +122,9 @@ # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Sources of variant source components stored under equal names in # different locations. During system builds, only one of each (equally @@ -134,11 +141,11 @@ MAN3 = atfstkintro.3 atattribute.3 atbind.3 atbindrule.3 atcache.3 \ atclass.3 atexpand.3 atlog.3 atnetwork.3 atprint.3 \ atread.3 atuser.3 atversion.3 -MAN4 = -MAN5 = -MAN6 = +MAN4 = +MAN5 = +MAN6 = MAN7 = bindrules.7 -MAN8 = +MAN8 = # All source components of the system (should not be changed) @@ -152,6 +159,11 @@ bind.o bind_options.o bind_scan.o bind_rules.o bind_attr.o \ $(VERSIONOBJECT) +SHLIBOBJECTS = $(LIBOBJECTS:.o=.pic_o) + +%.pic_o: %.c + $(CC) -c $(SHLIBCFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION) + PROGOBJECTS = vbind.o OBJECTS = $(LIBOBJECTS) $(PROGOBJECTS) @@ -164,20 +176,36 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro -CC = cc +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBSONAME = lib$(LIBNAME).$(SHLIBSUFFIX).$(shell echo $(SHLIBVERSION) | cut -d . -f 1) +SHLIBLOCALLDFLAGS = -L$(MYLIBPATH) +SHLIBINSTALLLDFLAGS = + +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = $(MYLIBPATH)/libsttk.a $(MYLIBPATH)/libAtFS.a -LINTLIBS = +SYSLIBS = +STATICLOCALLIBS = $(LOCALLIBPATH)/$(LIBTARGET) \ + $(MYLIBPATH)/libsttk.a $(MYLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(LOCALLIBPATH)/$(SHLIBTARGET) \ + $(MYLIBPATH)/libsttk.so $(MYLIBPATH)/libAtFS.so +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = -L$(MYLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -189,15 +217,29 @@ # The final system building action. -targets: $(LIBTARGET) $(PROGTARGET) +targets: $(LIBTARGET) $(SHLIBTARGET) $(PROGTARGET) $(LIBTARGET): $(LIBOBJECTS) -ar ruv $(LIBTARGET) $(LIBOBJECTS) @-($(RANLIB) $(LIBTARGET)) 2> /dev/null; true -$(PROGTARGET): $(LOCALLIBS) $(PROGOBJECTS) $(LIBOBJECTS) +$(SHLIBTARGET): $(SHLIBOBJECTS) + $(SHLIBLD) $(LDFLAGS) -o $@ -Wl,-soname,$(SHLIBSONAME) $(SHLIBOBJECTS) \ + -L$(MYLIBPATH) $(SHLIBLOCALLDFLAGS) -lsttk -lAtFS + @rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(SHLIBTARGET) to $$i; \ + ln $(SHLIBTARGET) $$i; \ + done + +$(PROGTARGET): $(LOCALLIBS) $(PROGOBJECTS) $(CC) $(LDFLAGS) -o $(PROGTARGET) $(PROGOBJECTS) \ - $(LIBOBJECTS) $(LOCALLIBS) $(SYSLIBS) + $(LOCALLDFLAGS) $(SYSLIBS) @_aliases="$(ALIASES)"; \ for i in $$_aliases; \ do \ @@ -207,6 +249,7 @@ done localinstalltargets: $(LOCALLIBPATH)/$(LIBTARGET) \ + $(LOCALLIBPATH)/$(SHLIBTARGET) \ $(LOCALINCLUDEPATH)/atfstk.h $(PROGTARGET) $(LOCALLIBPATH)/$(LIBTARGET): $(LIBTARGET) @@ -220,6 +263,28 @@ chmod $(INSTALLLIBMODE) $(LOCALLIBPATH)/$(LIBTARGET); \ ($(RANLIB) $(LOCALLIBPATH)/$(LIBTARGET)) 2> /dev/null; true +$(LOCALLIBPATH)/$(SHLIBTARGET): $(SHLIBTARGET) + @-echo "Copying $(SHLIBTARGET) to $(LOCALLIBPATH)"; \ + if [ -f $(LOCALLIBPATH)/$(SHLIBTARGET) ] ;\ + then \ + mv -f $(LOCALLIBPATH)/$(SHLIBTARGET) \ + $(LOCALLIBPATH)/$(SHLIBTARGET).old;\ + fi; \ + cp $(SHLIBTARGET) $(LOCALLIBPATH)/$(SHLIBTARGET); \ + chmod $(INSTALLBINMODE) $(LOCALLIBPATH)/$(SHLIBTARGET); \ + ( cd $(LOCALLIBPATH); \ + rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + ); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(LOCALLIBPATH)/$$i; \ + echo "linking $(LOCALLIBPATH)/$(SHLIBTARGET) to $(LOCALLIBPATH)/$$i"; \ + ln $(LOCALLIBPATH)/$(SHLIBTARGET) $(LOCALLIBPATH)/$$i; \ + done + $(LOCALINCLUDEPATH)/atfstk.h: atfstk.h @-echo "Copying atfstk.h to $(LOCALINCLUDEPATH)"; \ if [ -f $(LOCALINCLUDEPATH)/atfstk.h ] && \ @@ -230,7 +295,9 @@ cp atfstk.h $(LOCALINCLUDEPATH)/atfstk.h; \ chmod $(INSTALLINCMODE) $(LOCALINCLUDEPATH)/atfstk.h -installtargets: $(INSTALLLIBPATH)/$(LIBTARGET) $(INSTALLINCPATH)/atfstk.h \ +installtargets: $(INSTALLLIBPATH)/$(LIBTARGET) \ + $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLINCPATH)/atfstk.h \ $(INSTALLBINPATH)/$(PROGTARGET) $(INSTALLSHAPELIBPATH)/BindRules $(INSTALLLIBPATH)/$(LIBTARGET): $(LIBTARGET) @@ -244,6 +311,28 @@ chmod $(INSTALLLIBMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ ($(RANLIB) $(INSTALLLIBPATH)/$(LIBTARGET)) 2> /dev/null; true +$(INSTALLLIBPATH)/$(SHLIBTARGET): $(SHLIBTARGET) + @-echo "Installing $(SHLIBTARGET) in $(INSTALLLIBPATH)"; \ + if [ -f $(INSTALLLIBPATH)/$(SHLIBTARGET) ] ;\ + then \ + mv -f $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLLIBPATH)/$(SHLIBTARGET).old;\ + fi; \ + cp $(SHLIBTARGET) $(INSTALLLIBPATH)/$(SHLIBTARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ + ( cd $(INSTALLLIBPATH); \ + rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + ); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLLIBPATH)/$$i; \ + echo "linking $(INSTALLLIBPATH)/$(SHLIBTARGET) to $(INSTALLLIBPATH)/$$i"; \ + ln $(INSTALLLIBPATH)/$(SHLIBTARGET) $(INSTALLLIBPATH)/$$i; \ + done + $(INSTALLBINPATH)/$(PROGTARGET): $(PROGTARGET) @-echo "installing $(PROGTARGET) in $(INSTALLBINPATH)"; \ if [ -f $(INSTALLBINPATH)/$(PROGTARGET) ] && \ @@ -251,7 +340,8 @@ then \ chmod u+w $(INSTALLBINPATH)/$(PROGTARGET); \ fi; \ - cp $(PROGTARGET) $(INSTALLBINPATH)/$(PROGTARGET); \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(PROGTARGET) $(PROGOBJECTS) \ + $(INSTALLLDFLAGS) $(SYSLIBS); \ chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(PROGTARGET); \ _aliases="$(ALIASES)"; \ for i in $$_aliases; \ @@ -295,44 +385,54 @@ chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ done -noinstall: $(INSTALLBINPATH)/$(PROGTARGET) $(INSTALLSHAPELIBPATH)/BindRules +noinstall: $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLBINPATH)/$(PROGTARGET) $(INSTALLSHAPELIBPATH)/BindRules # The cleanup action. Removes all automatically rederivable files. doclean: - rm -f $(LIBTARGET) $(PROGTARGET) $(ALIASES) $(LIBOBJECTS) \ - $(PROGOBJECTS) + rm -f $(LIBTARGET) $(SHLIBTARGET) $(PROGTARGET) $(ALIASES) \ + $(SHLIBOBJECTS) $(LIBOBJECTS) $(PROGOBJECTS) # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -360,28 +460,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -390,28 +470,8 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + $(INHERITEDFLAGS) \ + install; \ fi +localinstall: @@ -420,28 +480,8 @@ else \ $(MAKE) ALLTARGETS="subsystems localinstalltargets" \ MAINTARGET=localinstall \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" localinstall; \ + $(INHERITEDFLAGS) \ + localinstall; \ fi +clean: @@ -449,27 +489,6 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi - --- shapetools-1.4pl6.orig/src/atfstk/Makefile.in +++ shapetools-1.4pl6/src/atfstk/Makefile.in @@ -0,0 +1,493 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for AtFS toolkit library (AtFStk) +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/atfstk + +# A short name for this node system + +NODENAME = AtFStk + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLSHAPELIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +# special treatment due to problems in ShapeTools +# installation procedure. LOCALLIBPATH may be redefined +# from above. +MYLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +PROGTARGET = vbind +LIBNAME = AtFStk +LIBTARGET = lib$(LIBNAME).a +SHLIBVERSION = @ATFSTKVERSION@ +SHLIBTARGET = @SHLIBTARGET@ + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = atfstk_vers.c # source +VERSIONOBJECT = atfstk_vers.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +SOURCES = atfstk_lib.c attrs.c version.c user.c uda.c citeattr.c \ + lock.c cache.c network.c read.c \ + bind.c bind_options.c bind_scan.c bind_rules.c bind_attr.c \ + vbind.c BindRules + +HEADERS = atfstk.h bind.h + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = vbind.1 +MAN3 = atfstkintro.3 atattribute.3 atbind.3 atbindrule.3 atcache.3 \ + atclass.3 atexpand.3 atlog.3 atnetwork.3 atprint.3 \ + atread.3 atuser.3 atversion.3 +MAN4 = +MAN5 = +MAN6 = +MAN7 = bindrules.7 +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +LIBOBJECTS = atfstk_lib.o attrs.o version.o user.o uda.o citeattr.o \ + lock.o cache.o network.o read.o \ + bind.o bind_options.o bind_scan.o bind_rules.o bind_attr.o \ + $(VERSIONOBJECT) + +SHLIBOBJECTS = $(LIBOBJECTS:.o=.pic_o) + +%.pic_o: %.c + $(CC) -c $(SHLIBCFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION) + +PROGOBJECTS = vbind.o + +OBJECTS = $(LIBOBJECTS) $(PROGOBJECTS) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBSONAME = lib$(LIBNAME).$(SHLIBSUFFIX).$(shell echo $(SHLIBVERSION) | cut -d . -f 1) +SHLIBLOCALLDFLAGS = -L$(MYLIBPATH) @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIBS = @SYSLIBS@ +STATICLOCALLIBS = $(LOCALLIBPATH)/$(LIBTARGET) \ + $(MYLIBPATH)/libsttk.a $(MYLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(LOCALLIBPATH)/$(SHLIBTARGET) \ + $(MYLIBPATH)/libsttk.so $(MYLIBPATH)/libAtFS.so +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = -L$(MYLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(LIBTARGET) $(SHLIBTARGET) $(PROGTARGET) + +$(LIBTARGET): $(LIBOBJECTS) + -ar ruv $(LIBTARGET) $(LIBOBJECTS) + @-($(RANLIB) $(LIBTARGET)) 2> /dev/null; true + +$(SHLIBTARGET): $(SHLIBOBJECTS) + $(SHLIBLD) $(LDFLAGS) -o $@ -Wl,-soname,$(SHLIBSONAME) $(SHLIBOBJECTS) \ + -L$(MYLIBPATH) $(SHLIBLOCALLDFLAGS) -lsttk -lAtFS + @rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(SHLIBTARGET) to $$i; \ + ln $(SHLIBTARGET) $$i; \ + done + +$(PROGTARGET): $(LOCALLIBS) $(PROGOBJECTS) + $(CC) $(LDFLAGS) -o $(PROGTARGET) $(PROGOBJECTS) \ + $(LOCALLDFLAGS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(PROGTARGET) to $$i; \ + ln $(PROGTARGET) $$i; \ + done + +localinstalltargets: $(LOCALLIBPATH)/$(LIBTARGET) \ + $(LOCALLIBPATH)/$(SHLIBTARGET) \ + $(LOCALINCLUDEPATH)/atfstk.h $(PROGTARGET) + +$(LOCALLIBPATH)/$(LIBTARGET): $(LIBTARGET) + @-echo "Copying $(LIBTARGET) to $(LOCALLIBPATH)"; \ + if [ -f $(LOCALLIBPATH)/$(LIBTARGET) ] ;\ + then \ + mv -f $(LOCALLIBPATH)/$(LIBTARGET) \ + $(LOCALLIBPATH)/$(LIBTARGET).old;\ + fi; \ + cp $(LIBTARGET) $(LOCALLIBPATH)/$(LIBTARGET); \ + chmod $(INSTALLLIBMODE) $(LOCALLIBPATH)/$(LIBTARGET); \ + ($(RANLIB) $(LOCALLIBPATH)/$(LIBTARGET)) 2> /dev/null; true + +$(LOCALLIBPATH)/$(SHLIBTARGET): $(SHLIBTARGET) + @-echo "Copying $(SHLIBTARGET) to $(LOCALLIBPATH)"; \ + if [ -f $(LOCALLIBPATH)/$(SHLIBTARGET) ] ;\ + then \ + mv -f $(LOCALLIBPATH)/$(SHLIBTARGET) \ + $(LOCALLIBPATH)/$(SHLIBTARGET).old;\ + fi; \ + cp $(SHLIBTARGET) $(LOCALLIBPATH)/$(SHLIBTARGET); \ + chmod $(INSTALLBINMODE) $(LOCALLIBPATH)/$(SHLIBTARGET); \ + ( cd $(LOCALLIBPATH); \ + rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + ); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(LOCALLIBPATH)/$$i; \ + echo "linking $(LOCALLIBPATH)/$(SHLIBTARGET) to $(LOCALLIBPATH)/$$i"; \ + ln $(LOCALLIBPATH)/$(SHLIBTARGET) $(LOCALLIBPATH)/$$i; \ + done + +$(LOCALINCLUDEPATH)/atfstk.h: atfstk.h + @-echo "Copying atfstk.h to $(LOCALINCLUDEPATH)"; \ + if [ -f $(LOCALINCLUDEPATH)/atfstk.h ] && \ + [ ! -w $(LOCALINCLUDEPATH)/atfstk.h ]; \ + then \ + chmod u+w $(LOCALINCLUDEPATH)/atfstk.h; \ + fi; \ + cp atfstk.h $(LOCALINCLUDEPATH)/atfstk.h; \ + chmod $(INSTALLINCMODE) $(LOCALINCLUDEPATH)/atfstk.h + +installtargets: $(INSTALLLIBPATH)/$(LIBTARGET) \ + $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLINCPATH)/atfstk.h \ + $(INSTALLBINPATH)/$(PROGTARGET) $(INSTALLSHAPELIBPATH)/BindRules + +$(INSTALLLIBPATH)/$(LIBTARGET): $(LIBTARGET) + @-echo "installing $(LIBTARGET) in $(INSTALLLIBPATH)"; \ + if [ -f $(INSTALLLIBPATH)/$(LIBTARGET) ] ;\ + then \ + mv -f $(INSTALLLIBPATH)/$(LIBTARGET) \ + $(INSTALLLIBPATH)/$(LIBTARGET).old;\ + fi; \ + cp $(LIBTARGET) $(INSTALLLIBPATH)/$(LIBTARGET); \ + chmod $(INSTALLLIBMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ + ($(RANLIB) $(INSTALLLIBPATH)/$(LIBTARGET)) 2> /dev/null; true + +$(INSTALLLIBPATH)/$(SHLIBTARGET): $(SHLIBTARGET) + @-echo "Installing $(SHLIBTARGET) in $(INSTALLLIBPATH)"; \ + if [ -f $(INSTALLLIBPATH)/$(SHLIBTARGET) ] ;\ + then \ + mv -f $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLLIBPATH)/$(SHLIBTARGET).old;\ + fi; \ + cp $(SHLIBTARGET) $(INSTALLLIBPATH)/$(SHLIBTARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ + ( cd $(INSTALLLIBPATH); \ + rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + ); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLLIBPATH)/$$i; \ + echo "linking $(INSTALLLIBPATH)/$(SHLIBTARGET) to $(INSTALLLIBPATH)/$$i"; \ + ln $(INSTALLLIBPATH)/$(SHLIBTARGET) $(INSTALLLIBPATH)/$$i; \ + done + +$(INSTALLBINPATH)/$(PROGTARGET): $(PROGTARGET) + @-echo "installing $(PROGTARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(PROGTARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(PROGTARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(PROGTARGET); \ + fi; \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(PROGTARGET) $(PROGOBJECTS) \ + $(INSTALLLDFLAGS) $(SYSLIBS); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(PROGTARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(PROGTARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(PROGTARGET) $(INSTALLBINPATH)/$$i; \ + done + +$(INSTALLINCPATH)/atfstk.h: atfstk.h + @-echo "Installing atfstk.h in $(INSTALLINCPATH)"; \ + if [ -f $(INSTALLINCPATH)/atfstk.h ] && \ + [ ! -w $(INSTALLINCPATH)/atfstk.h ]; \ + then \ + chmod u+w $(INSTALLINCPATH)/atfstk.h; \ + fi; \ + cp atfstk.h $(INSTALLINCPATH)/atfstk.h; \ + chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/atfstk.h + +$(INSTALLSHAPELIBPATH)/BindRules: BindRules + @-echo "Installing BindRules in $(INSTALLSHAPELIBPATH)"; \ + if [ -f $(INSTALLSHAPELIBPATH)/BindRules ] && \ + [ ! -w $(INSTALLSHAPELIBPATH)/BindRules ]; \ + then \ + chmod u+w $(INSTALLSHAPELIBPATH)/BindRules; \ + fi; \ + cp BindRules $(INSTALLSHAPELIBPATH)/BindRules; \ + chmod $(INSTALLLIBMODE) $(INSTALLSHAPELIBPATH)/BindRules + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +noinstall: $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLBINPATH)/$(PROGTARGET) $(INSTALLSHAPELIBPATH)/BindRules + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(LIBTARGET) $(SHLIBTARGET) $(PROGTARGET) $(ALIASES) \ + $(SHLIBOBJECTS) $(LIBOBJECTS) $(PROGOBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +localinstall: +localinstall $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + $(INHERITEDFLAGS) \ + install; \ + fi + ++localinstall: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems localinstalltargets" \ + MAINTARGET=localinstall \ + $(INHERITEDFLAGS) \ + localinstall; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/atfstk/Makefile.org +++ shapetools-1.4pl6/src/atfstk/Makefile.org @@ -0,0 +1,475 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for AtFS toolkit library (AtFStk) +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $Header: Makefile[7.0] Thu Jul 29 18:36:35 1993 andy@cs.tu-berlin.de frozen $ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = /home/stone/shape/development + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/atfstk + +# A short name for this node system + +NODENAME = AtFStk + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = s_sunos_4 + +# The processor type. + +HOSTTYPE = sun4 + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBASE = /home/stone/shape +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib +INSTALLSHAPELIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 644 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +# special treatment due to problems in ShapeTools +# installation procedure. LOCALLIBPATH may be redefined +# from above. +MYLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +PROGTARGET = vbind +LIBTARGET = libAtFStk.a + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = atfstk_vers.c # source +VERSIONOBJECT = atfstk_vers.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +SOURCES = atfstk_lib.c attrs.c version.c user.c uda.c citeattr.c \ + lock.c cache.c network.c read.c \ + bind.c bind_options.c bind_scan.c bind_rules.c bind_attr.c \ + vbind.c BindRules + +HEADERS = atfstk.h bind.h + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = vbind.1 +MAN3 = atfstkintro.3 atattribute.3 atbind.3 atbindrule.3 atcache.3 \ + atclass.3 atexpand.3 atlog.3 atnetwork.3 atprint.3 \ + atread.3 atuser.3 atversion.3 +MAN4 = +MAN5 = +MAN6 = +MAN7 = bindrules.7 +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +LIBOBJECTS = atfstk_lib.o attrs.o version.o user.o uda.o citeattr.o \ + lock.o cache.o network.o read.o \ + bind.o bind_options.o bind_scan.o bind_rules.o bind_attr.o \ + $(VERSIONOBJECT) + +PROGOBJECTS = vbind.o + +OBJECTS = $(LIBOBJECTS) $(PROGOBJECTS) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -g +MAKELDFLAGS = -g + +CC = cc +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = /usr/bin/ranlib + +# System libraries, local libraries and lint libraries. + +SYSLIBS = +LOCALLIBS = $(MYLIBPATH)/libsttk.a $(MYLIBPATH)/libAtFS.a +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(LIBTARGET) $(PROGTARGET) + +$(LIBTARGET): $(LIBOBJECTS) + -ar ruv $(LIBTARGET) $(LIBOBJECTS) + @-($(RANLIB) $(LIBTARGET)) 2> /dev/null; true + +$(PROGTARGET): $(LOCALLIBS) $(PROGOBJECTS) $(LIBOBJECTS) + $(CC) $(LDFLAGS) -o $(PROGTARGET) $(PROGOBJECTS) \ + $(LIBOBJECTS) $(LOCALLIBS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(PROGTARGET) to $$i; \ + ln $(PROGTARGET) $$i; \ + done + +localinstalltargets: $(LOCALLIBPATH)/$(LIBTARGET) \ + $(LOCALINCLUDEPATH)/atfstk.h $(PROGTARGET) + +$(LOCALLIBPATH)/$(LIBTARGET): $(LIBTARGET) + @-echo "Copying $(LIBTARGET) to $(LOCALLIBPATH)"; \ + if [ -f $(LOCALLIBPATH)/$(LIBTARGET) ] ;\ + then \ + mv -f $(LOCALLIBPATH)/$(LIBTARGET) \ + $(LOCALLIBPATH)/$(LIBTARGET).old;\ + fi; \ + cp $(LIBTARGET) $(LOCALLIBPATH)/$(LIBTARGET); \ + chmod $(INSTALLLIBMODE) $(LOCALLIBPATH)/$(LIBTARGET); \ + ($(RANLIB) $(LOCALLIBPATH)/$(LIBTARGET)) 2> /dev/null; true + +$(LOCALINCLUDEPATH)/atfstk.h: atfstk.h + @-echo "Copying atfstk.h to $(LOCALINCLUDEPATH)"; \ + if [ -f $(LOCALINCLUDEPATH)/atfstk.h ] && \ + [ ! -w $(LOCALINCLUDEPATH)/atfstk.h ]; \ + then \ + chmod u+w $(LOCALINCLUDEPATH)/atfstk.h; \ + fi; \ + cp atfstk.h $(LOCALINCLUDEPATH)/atfstk.h; \ + chmod $(INSTALLINCMODE) $(LOCALINCLUDEPATH)/atfstk.h + +installtargets: $(INSTALLLIBPATH)/$(LIBTARGET) $(INSTALLINCPATH)/atfstk.h \ + $(INSTALLBINPATH)/$(PROGTARGET) $(INSTALLSHAPELIBPATH)/BindRules + +$(INSTALLLIBPATH)/$(LIBTARGET): $(LIBTARGET) + @-echo "installing $(LIBTARGET) in $(INSTALLLIBPATH)"; \ + if [ -f $(INSTALLLIBPATH)/$(LIBTARGET) ] ;\ + then \ + mv -f $(INSTALLLIBPATH)/$(LIBTARGET) \ + $(INSTALLLIBPATH)/$(LIBTARGET).old;\ + fi; \ + cp $(LIBTARGET) $(INSTALLLIBPATH)/$(LIBTARGET); \ + chmod $(INSTALLLIBMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ + ($(RANLIB) $(INSTALLLIBPATH)/$(LIBTARGET)) 2> /dev/null; true + +$(INSTALLBINPATH)/$(PROGTARGET): $(PROGTARGET) + @-echo "installing $(PROGTARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(PROGTARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(PROGTARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(PROGTARGET); \ + fi; \ + cp $(PROGTARGET) $(INSTALLBINPATH)/$(PROGTARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(PROGTARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(PROGTARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(PROGTARGET) $(INSTALLBINPATH)/$$i; \ + done + +$(INSTALLINCPATH)/atfstk.h: atfstk.h + @-echo "Installing atfstk.h in $(INSTALLINCPATH)"; \ + if [ -f $(INSTALLINCPATH)/atfstk.h ] && \ + [ ! -w $(INSTALLINCPATH)/atfstk.h ]; \ + then \ + chmod u+w $(INSTALLINCPATH)/atfstk.h; \ + fi; \ + cp atfstk.h $(INSTALLINCPATH)/atfstk.h; \ + chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/atfstk.h + +$(INSTALLSHAPELIBPATH)/BindRules: BindRules + @-echo "Installing BindRules in $(INSTALLSHAPELIBPATH)"; \ + if [ -f $(INSTALLSHAPELIBPATH)/BindRules ] && \ + [ ! -w $(INSTALLSHAPELIBPATH)/BindRules ]; \ + then \ + chmod u+w $(INSTALLSHAPELIBPATH)/BindRules; \ + fi; \ + cp BindRules $(INSTALLSHAPELIBPATH)/BindRules; \ + chmod $(INSTALLLIBMODE) $(INSTALLSHAPELIBPATH)/BindRules + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +noinstall: $(INSTALLBINPATH)/$(PROGTARGET) $(INSTALLSHAPELIBPATH)/BindRules + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(LIBTARGET) $(PROGTARGET) $(ALIASES) $(LIBOBJECTS) \ + $(PROGOBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +localinstall: +localinstall $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" install; \ + fi + ++localinstall: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems localinstalltargets" \ + MAINTARGET=localinstall \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" localinstall; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" clean; \ + fi + --- shapetools-1.4pl6.orig/src/atfstk/attrs.c +++ shapetools-1.4pl6/src/atfstk/attrs.c @@ -24,6 +24,7 @@ #include "atfs.h" #include "atfstk.h" +#include /*======= * name --- shapetools-1.4pl6.orig/src/atfstk/bind.c +++ shapetools-1.4pl6/src/atfstk/bind.c @@ -382,7 +382,7 @@ { int altError, retCode, predPos, predCode, altCount = 1, bindHitCount; char *pattern, patternBuf[PATH_MAX+AT_CACHEKEYLEN]; - char *bindPtr = NULL, *arg1, *arg2, bindTargName[NAME_MAX+1]; + char *bindPtr = NULL, *arg1, *arg2, bindTargName[PATH_MAX+1]; char *reMsg, *predName; Af_set *tmpSet, bindHitSet; Af_key *tmpKey; --- shapetools-1.4pl6.orig/src/atfstk/bind_attr.c +++ shapetools-1.4pl6/src/atfstk/bind_attr.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -35,7 +35,7 @@ char *attrName; { int i; - + for (i = 0; atStdAttrTab[i].name; i++) { if (!(strcmp (attrName, atStdAttrTab[i].name))) return (atStdAttrTab[i].code); @@ -55,9 +55,9 @@ int attrNum = getAttr (attrName), hits, bindType; Af_attrs reqAttrs; char *alias; - + af_initattrs (&reqAttrs); - + switch (attrNum) { case AT_CODE_ALIAS: if ((reqAttrs.af_udattrs[0] = @@ -247,15 +247,15 @@ reqAttrs.af_udattrs[1] = NULL; break; } - + if ((hits = af_subset (set, &reqAttrs, set)) == -1) { atBindError = TRUE; strcpy (atBindErrorMsg, af_errmsg ("atBindAttrAbsolute")); } - + if (reqAttrs.af_udattrs[0]) free (reqAttrs.af_udattrs[0]); - + return (hits); } @@ -292,31 +292,31 @@ case BIND_PRED_ATTRGE: if (strcmp (user1->af_username, user2->af_username) >= 0) return (TRUE); - if (strcmp (user1->af_userdomain, user2->af_userdomain) >= 0) + if (strcmp (user1->af_userdomain, user2->af_userdomain) >= 0) return (TRUE); break; case BIND_PRED_ATTRGT: if (strcmp (user1->af_username, user2->af_username) > 0) return (TRUE); - if (strcmp (user1->af_userdomain, user2->af_userdomain) > 0) + if (strcmp (user1->af_userdomain, user2->af_userdomain) > 0) return (TRUE); break; case BIND_PRED_ATTRLE: if (strcmp (user1->af_username, user2->af_username) <= 0) return (TRUE); - if (strcmp (user1->af_userdomain, user2->af_userdomain) <= 0) + if (strcmp (user1->af_userdomain, user2->af_userdomain) <= 0) return (TRUE); break; case BIND_PRED_ATTRLT: if (strcmp (user1->af_username, user2->af_username) < 0) return (TRUE); - if (strcmp (user1->af_userdomain, user2->af_userdomain) < 0) + if (strcmp (user1->af_userdomain, user2->af_userdomain) < 0) return (TRUE); break; case BIND_PRED_ATTRNOT: if (strcmp (user1->af_username, user2->af_username)) return (TRUE); - if (strcmp (user1->af_userdomain, user2->af_userdomain)) + if (strcmp (user1->af_userdomain, user2->af_userdomain)) return (TRUE); break; } @@ -405,10 +405,10 @@ int numVal; int bindType, genNo, revNo; char *alias, *origUdaVal; - + if (!attrValue) attrValue = ""; - + switch (attrNum) { case AT_CODE_ALIAS: alias = attrValue; @@ -517,8 +517,11 @@ break; case -1: /* no standard attribute -- assume user defined attr */ break; + default: + /* gcc -Wall complains about using uninitialized values */ + return (0); } - + for (i=af_nrofkeys(set)-1; i >= 0; i--) { (void) af_setgkey (set, i, &tmpKey); switch (attrNum) { @@ -536,7 +539,7 @@ af_setposrmkey (set, i); } else - if (op != BIND_PRED_ATTRNOT) + if (op != BIND_PRED_ATTRNOT) af_setposrmkey (set, i); break; case AT_CODE_CTIME: @@ -634,13 +637,13 @@ af_setposrmkey (set, i); } else - if (op != BIND_PRED_ATTRNOT) + if (op != BIND_PRED_ATTRNOT) af_setposrmkey (set, i); break; } af_dropkey (&tmpKey); } - + return (af_nrofkeys(set)); } @@ -658,17 +661,17 @@ int i, j, cmpCode; char *curUdaVal, *nextUdaVal; Af_key curKey, nextKey; - + Af_user curUserVal, *userPtr; - + if (maxSetPos < 1) /* set is empty or contains just one key */ return (maxSetPos+1); - + (void) af_setgkey (set, curSetPos++, &curKey); - + for (i=1; i <= maxSetPos; i++) { (void) af_setgkey (set, curSetPos, &nextKey); - + switch (attrNum) { case AT_CODE_ATIME: cmpCode = af_rettimeattr (&curKey, AF_ATTATIME) - af_rettimeattr (&nextKey, AF_ATTATIME); @@ -776,7 +779,7 @@ free (nextUdaVal); break; } - + switch (op) { case BIND_PRED_ATTRMAX: if (cmpCode < 0) { @@ -817,6 +820,6 @@ } } af_dropkey (&curKey); - + return (af_nrofkeys (set)); } --- shapetools-1.4pl6.orig/src/atfstk/bind_options.c +++ shapetools-1.4pl6/src/atfstk/bind_options.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -68,7 +68,7 @@ sprintf (stMessage, "cannot scan baseline -- '%s' option ignored.", option); stLog (stMessage, ST_LOG_ERROR); return (1); - } + } return (0); } @@ -120,7 +120,7 @@ bindExact.baselineType = AT_BIND_RULE; return (0); } - + LOCAL int handleRuleFile (option, arg) char *option, *arg; { @@ -136,7 +136,7 @@ } return (0); } - + /*========================== * option vector *==========================*/ @@ -199,6 +199,18 @@ path = af_afpath (tmpArgv[i]); if ((pathLen = strlen (path)) > 0) pathLen ++; + if(pathLen) { + /* Save a copy of the path, af_afpath returns a static which */ + /* can be overwritten by subsequent calls to atBindSet()... */ + char *t; + if ((t = (char *)malloc(pathLen)) == NULL) { + atBindError = TRUE; + strcpy (atBindErrorMsg, "not enough memory"); + return (ERROR); + }; + strcpy(t, path); + path = t; + } if ((tmpSet = atBindSet (tmpArgv[i], NULL, 0)) == NULL) { return (ERROR); } @@ -219,6 +231,7 @@ strcpy (newArgv[newArgc], path); strcat (newArgv[newArgc], "/"); strcat (newArgv[newArgc], newArg); + free(path); /* Get rid of the copy */ } else strcpy (newArgv[newArgc], newArg); --- shapetools-1.4pl6.orig/src/atfstk/cache.c +++ shapetools-1.4pl6/src/atfstk/cache.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -33,7 +33,7 @@ static char keyBuf[AT_CACHEKEYLEN]; (void) sprintf (keyBuf, "%s=%ld.%d.%d", AT_ATTCACHEKEY, - af_rettimeattr (aso, AF_ATTMTIME), getpid (), serial++); + af_rettimeattr (aso, AF_ATTMTIME), (int) getpid (), serial++); return (keyBuf); } --- shapetools-1.4pl6.orig/src/atfstk/lock.c +++ shapetools-1.4pl6/src/atfstk/lock.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -79,7 +79,7 @@ atError (AT_ERROR, "not enough memory"); return (FALSE); } - + if (!strcmp (attrName, AT_ATTINTENT)) { sprintf (completeAttr, "%s=%s%s", attrName, prologue, attrText); if (af_setattr (aso, AF_REPLACE, completeAttr) == -1) { @@ -140,7 +140,10 @@ commentEmptyText = AT_EMPTYLOG; commentLogText = "change log"; break; - } + default: + /* gcc -Wall complains about using uninitialized values */ + return (FALSE); + } if (!(mode & AT_REUSE)) { if (commentText) @@ -173,12 +176,12 @@ if (commentText) free (commentText); commentText = stGetFromStdin ('.'); - return (setLogAttribute (aso, commentAttrName, prologue, commentText[0] ? commentText : + return (setLogAttribute (aso, commentAttrName, prologue, commentText[0] ? commentText : (oldText ? oldText : commentEmptyText))); } } - if (!(isatty (fileno(stdin)))) + if (!(isatty (fileno(stdin)))) return (setLogAttribute (aso, commentAttrName, prologue, oldText ? oldText : commentEmptyText)); if (commentText) { @@ -254,7 +257,7 @@ Af_key *aso; { Af_user *waslocker; - + waslocker = af_unlock (aso); if (waslocker) { af_setattr (aso, AF_REMOVE, AT_ATTINTENT); @@ -262,4 +265,3 @@ } return (FALSE); } - --- shapetools-1.4pl6.orig/src/atfstk/version.c +++ shapetools-1.4pl6/src/atfstk/version.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -50,7 +50,7 @@ Af_key foundAso; char aliasAttr[AT_MAXALIASLEN]; - sprintf (aliasAttr, "%s=%s", AT_ATTALIAS, alias); + sprintf (aliasAttr, "%s=%s", AT_ATTALIAS, alias ? alias : ""); af_initattrs (&attrBuf); strcpy (attrBuf.af_syspath, af_retattr (aso, AF_ATTSPATH)); strcpy (attrBuf.af_name, af_retattr (aso, AF_ATTNAME)); @@ -58,8 +58,8 @@ attrBuf.af_udattrs[0] = aliasAttr; attrBuf.af_udattrs[1] = NULL; - if ((hitCount = af_find (&attrBuf, &hitSet)) < 0) { - af_dropset (&hitSet); + if ((hitCount = af_find (&attrBuf, &hitSet)) < 0) { + af_dropset (&hitSet); atError (AT_ERROR, af_errmsg ("atSetVersAlias")); return (FALSE); } @@ -73,8 +73,8 @@ (af_retnumattr (aso, AF_ATTREV) == af_retnumattr (&foundAso, AF_ATTREV))) return (TRUE); sprintf (msgBuf, "version number alias %s already in use for: %s", - alias, af_retattr (&foundAso, AF_ATTBOUND)); - atError (AT_MSG, msgBuf); + alias ? alias : "", af_retattr (&foundAso, AF_ATTBOUND)); + atError (AT_MSG, msgBuf); return (FALSE); } --- shapetools-1.4pl6.orig/src/interface/Makefile +++ shapetools-1.4pl6/src/interface/Makefile @@ -175,10 +175,10 @@ targets: $(OBJECTS) callp-err.elc : callp-err.el - PWD=`pwd` emacs -batch -f batch-byte-compile callp-err.el + PWD=`pwd` xemacs -batch -f batch-byte-compile callp-err.el find-atfs.elc : find-atfs.el callp-err.elc - PWD=`pwd` emacs -batch -l ./callp-err.elc -f batch-byte-compile find-atfs.el + PWD=`pwd` xemacs -batch -l ./callp-err.elc -f batch-byte-compile find-atfs.el installtargets: find-atfs.el callp-err.el $(OBJECTS) @-_components="find-atfs.el callp-err.el $(OBJECTS)"; \ --- shapetools-1.4pl6.orig/src/rms/Makefile +++ shapetools-1.4pl6/src/rms/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[6.1] Fri Jan 28 20:31:43 1994 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's development area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path of a subsystem relative to the root of the system hierarchy # (e.g. vc/save) @@ -40,28 +41,31 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DSTATISTICS) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = /home/stone/shape -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLSHAPELIBPATH = $(INSTALLBASE)/lib/shape INSTALLLIBMODE = 444 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -77,7 +81,7 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like TARGET1 TARGET2 or any better names). In this case you +# (like TARGET1 TARGET2 or any better names). In this case you # have to adjust the system building actions accordingly. TARGET1 = sfind @@ -92,11 +96,11 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # Aliases for (filesystem links to) $(TARGET). -ALIASES = +ALIASES = # The regular source and header files. @@ -112,9 +116,9 @@ # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Interface header files. These are the header files to be installed # together with eg. a library. $(IFHEADERS) usually is a subset of @@ -127,12 +131,12 @@ MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) MAN1 = shape_RMS.1 shape_build.1 shape_depend.1 shape_patch.1 \ shape_releas.1 shape_tar.1 sfind.1 -MAN3 = -MAN4 = -MAN5 = -MAN6 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = MAN7 = shape_stdrul.7 shape_stdvar.7 shape_tmpl.7 -MAN8 = +MAN8 = # All source components of the system (should not be changed) @@ -151,20 +155,33 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro + +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = -CC = cc +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = -LINTLIBS = +SYSLIB = +STATICLOCALLIBS = +SHAREDLOCALLIBS = +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = # -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) + +INSTALLLDFLAGS = # -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -292,43 +309,53 @@ # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - SWITCHES="$(SWITCHES)" \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ - VERSIONBINDING=$(VERSIONBINDING) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ QUALITY=$(QUALITY) \ TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ ALLTARGETS= \ MAINTARGET= \ - SHAPELIBPATH=$(SHAPELIBPATH) $(MAINTARGET) ); \ + $(MAINTARGET) ); \ done # -------------------------------------------------------------------- @@ -337,8 +364,6 @@ install: +install $(ALLTARGETS) -localinstall: +localinstall $(ALLTARGETS) - clean: +clean $(ALLTARGETS) +all: @@ -346,35 +371,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - SWITCHES="$(SWITCHES)" \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ - VERSIONBINDING=$(VERSIONBINDING) \ - COMPILER=$(COMPILER) \ - QUALITY=$(QUALITY) \ - TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ - PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ - SHAPELIBPATH=$(SHAPELIBPATH) all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -383,35 +381,7 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - SWITCHES="$(SWITCHES)" \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ - VERSIONBINDING=$(VERSIONBINDING) \ - COMPILER=$(COMPILER) \ - QUALITY=$(QUALITY) \ - TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ - PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ - SHAPELIBPATH=$(SHAPELIBPATH) install; \ + install; \ fi +clean: @@ -419,23 +389,6 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - SWITCHES="$(SWITCHES)" \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ - VERSIONBINDING=$(VERSIONBINDING) \ - COMPILER=$(COMPILER) \ - QUALITY=$(QUALITY) \ - TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ - PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ - SHAPELIBPATH=$(SHAPELIBPATH) clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi --- shapetools-1.4pl6.orig/src/rms/Makefile.in +++ shapetools-1.4pl6/src/rms/Makefile.in @@ -0,0 +1,393 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for shape_RMS (release management system) +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's development area. + +BASE = @BASE@ + +# Path of a subsystem relative to the root of the system hierarchy +# (e.g. vc/save) + +NODEPATH = src/rms + +# A short name for the (sub)system (used for building the release ID) + +NODENAME = shape_RMS + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DSTATISTICS) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLSHAPELIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 444 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like TARGET1 TARGET2 or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET1 = sfind +TARGET2 = lastrelease + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = Release # source +VERSIONOBJECT = # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +SOURCE1 = sfind.sh +SOURCE2 = lastrelease.sh +SOURCES = $(SOURCE1) $(SOURCE2) + +HEADERS = Makefile.tmpl Shapefile.tmpl Release.tmpl release.c.tmpl \ + stdconf stdrules stdtargets stdvar \ + user_at cptree gen_rel_id mkpdir + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Interface header files. These are the header files to be installed +# together with eg. a library. $(IFHEADERS) usually is a subset of +# $(HEADERS). + +IFHEADERS = $(HEADERS) + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = shape_RMS.1 shape_build.1 shape_depend.1 shape_patch.1 \ + shape_releas.1 shape_tar.1 sfind.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = shape_stdrul.7 shape_stdvar.7 shape_tmpl.7 +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are autamatically produced during +# a build process should be listed here. + +OBJECTS = $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIB = @SYSLIBS@ +STATICLOCALLIBS = +SHAREDLOCALLIBS = +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = # -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) + +INSTALLLDFLAGS = # -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET1) $(TARGET2) + +$(TARGET1): $(SOURCE1) + @rm -f $(TARGET1); \ + if [ $(HOSTSYSTEM) = s_ultrix ]; \ + then \ + echo '#!/bin/sh5' > $(TARGET1); \ + else \ + echo '#!/bin/sh' > $(TARGET1); \ + fi + cat $(SOURCE1) >> $(TARGET1); + @chmod +x $(TARGET1) + +$(TARGET2): $(SOURCE2) + @rm -f $(TARGET2); \ + if [ $(HOSTSYSTEM) = s_ultrix ]; \ + then \ + echo '#!/bin/sh5' > $(TARGET2); \ + else \ + echo '#!/bin/sh' > $(TARGET2); \ + fi + cat $(SOURCE2) >> $(TARGET2); + @chmod +x $(TARGET2) + +installtargets: installincludes $(INSTALLBINPATH)/$(TARGET1) $(INSTALLBINPATH)/$(TARGET2) + +$(INSTALLBINPATH)/$(TARGET1): $(TARGET1) + @echo "Installing $(TARGET1) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET1) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET1) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET1); \ + fi; \ + cp $(TARGET1) $(INSTALLBINPATH)/$(TARGET1); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET1); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET1) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET1) $(INSTALLBINPATH)/$$i; \ + done + +$(INSTALLBINPATH)/$(TARGET2): $(TARGET2) + @echo "Installing $(TARGET2) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET2) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET2) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET2); \ + fi; \ + cp $(TARGET2) $(INSTALLBINPATH)/$(TARGET2); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET2); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET2) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET2) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "Installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done; \ + _manuals="$(MAN7)"; \ + for i in $$_manuals; \ + do \ + echo "Installing $$i in $(INSTALLMANPATH)/man7"; \ + if [ ! -w $(INSTALLMANPATH)/man7/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man7/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man7/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man7/$$i; \ + done + +installincludes: $(IFHEADERS) + @-_components="$(IFHEADERS)"; \ + for i in $$_components; \ + do \ + echo "Installing $$i in $(INSTALLSHAPELIBPATH)"; \ + if [ -f $(INSTALLSHAPELIBPATH)/$$i ] && \ + [ ! -w $(INSTALLSHAPELIBPATH)/$$i ]; \ + then \ + chmod u+w $(INSTALLSHAPELIBPATH)/$$i 2> /dev/null; \ + fi; \ + if [ -f $(INSTALLSHAPELIBPATH)/$$i ] && \ + [ ! -w $(INSTALLSHAPELIBPATH)/$$i ]; \ + then \ + rm -f $(INSTALLSHAPELIBPATH)/$$i; \ + fi; \ + cp $$i $(INSTALLSHAPELIBPATH)/$$i; \ + if [ $$i = "user_at" ] || [ $$i = "cptree" ] || \ + [ $$i = "gen_rel_id" ] || [ $$i = "mkpdir" ]; \ + then \ + chmod $(INSTALLBINMODE) $(INSTALLSHAPELIBPATH)/$$i; \ + else \ + chmod $(INSTALLLIBMODE) $(INSTALLSHAPELIBPATH)/$$i; \ + fi; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET1) $(TARGET2) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/rms/Makefile.org +++ shapetools-1.4pl6/src/rms/Makefile.org @@ -0,0 +1,441 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for shape_RMS (release management system) +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $Header: Makefile[6.1] Fri Jan 28 20:31:43 1994 andy@cs.tu-berlin.de frozen $ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's development area. + +BASE = /home/stone/shape/development + +# Path of a subsystem relative to the root of the system hierarchy +# (e.g. vc/save) + +NODEPATH = src/rms + +# A short name for the (sub)system (used for building the release ID) + +NODENAME = shape_RMS + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = s_sunos_4 + +# The processor type. + +HOSTTYPE = sun4 + +# Preprocessor switches. (eg. -DSTATISTICS) + +SWITCHES = + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBASE = /home/stone/shape +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib +INSTALLSHAPELIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 444 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like TARGET1 TARGET2 or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET1 = sfind +TARGET2 = lastrelease + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = Release # source +VERSIONOBJECT = # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +SOURCE1 = sfind.sh +SOURCE2 = lastrelease.sh +SOURCES = $(SOURCE1) $(SOURCE2) + +HEADERS = Makefile.tmpl Shapefile.tmpl Release.tmpl release.c.tmpl \ + stdconf stdrules stdtargets stdvar \ + user_at cptree gen_rel_id mkpdir + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Interface header files. These are the header files to be installed +# together with eg. a library. $(IFHEADERS) usually is a subset of +# $(HEADERS). + +IFHEADERS = $(HEADERS) + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = shape_RMS.1 shape_build.1 shape_depend.1 shape_patch.1 \ + shape_releas.1 shape_tar.1 sfind.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = shape_stdrul.7 shape_stdvar.7 shape_tmpl.7 +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are autamatically produced during +# a build process should be listed here. + +OBJECTS = $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -g +MAKELDFLAGS = -g + +CC = cc +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = /usr/bin/ranlib + +# System libraries, local libraries and lint libraries. + +SYSLIBS = +LOCALLIBS = +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET1) $(TARGET2) + +$(TARGET1): $(SOURCE1) + @rm -f $(TARGET1); \ + if [ $(HOSTSYSTEM) = s_ultrix ]; \ + then \ + echo '#!/bin/sh5' > $(TARGET1); \ + else \ + echo '#!/bin/sh' > $(TARGET1); \ + fi + cat $(SOURCE1) >> $(TARGET1); + @chmod +x $(TARGET1) + +$(TARGET2): $(SOURCE2) + @rm -f $(TARGET2); \ + if [ $(HOSTSYSTEM) = s_ultrix ]; \ + then \ + echo '#!/bin/sh5' > $(TARGET2); \ + else \ + echo '#!/bin/sh' > $(TARGET2); \ + fi + cat $(SOURCE2) >> $(TARGET2); + @chmod +x $(TARGET2) + +installtargets: installincludes $(INSTALLBINPATH)/$(TARGET1) $(INSTALLBINPATH)/$(TARGET2) + +$(INSTALLBINPATH)/$(TARGET1): $(TARGET1) + @echo "Installing $(TARGET1) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET1) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET1) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET1); \ + fi; \ + cp $(TARGET1) $(INSTALLBINPATH)/$(TARGET1); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET1); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET1) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET1) $(INSTALLBINPATH)/$$i; \ + done + +$(INSTALLBINPATH)/$(TARGET2): $(TARGET2) + @echo "Installing $(TARGET2) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET2) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET2) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET2); \ + fi; \ + cp $(TARGET2) $(INSTALLBINPATH)/$(TARGET2); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET2); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET2) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET2) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "Installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done; \ + _manuals="$(MAN7)"; \ + for i in $$_manuals; \ + do \ + echo "Installing $$i in $(INSTALLMANPATH)/man7"; \ + if [ ! -w $(INSTALLMANPATH)/man7/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man7/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man7/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man7/$$i; \ + done + +installincludes: $(IFHEADERS) + @-_components="$(IFHEADERS)"; \ + for i in $$_components; \ + do \ + echo "Installing $$i in $(INSTALLSHAPELIBPATH)"; \ + if [ -f $(INSTALLSHAPELIBPATH)/$$i ] && \ + [ ! -w $(INSTALLSHAPELIBPATH)/$$i ]; \ + then \ + chmod u+w $(INSTALLSHAPELIBPATH)/$$i 2> /dev/null; \ + fi; \ + if [ -f $(INSTALLSHAPELIBPATH)/$$i ] && \ + [ ! -w $(INSTALLSHAPELIBPATH)/$$i ]; \ + then \ + rm -f $(INSTALLSHAPELIBPATH)/$$i; \ + fi; \ + cp $$i $(INSTALLSHAPELIBPATH)/$$i; \ + if [ $$i = "user_at" ] || [ $$i = "cptree" ] || \ + [ $$i = "gen_rel_id" ] || [ $$i = "mkpdir" ]; \ + then \ + chmod $(INSTALLBINMODE) $(INSTALLSHAPELIBPATH)/$$i; \ + else \ + chmod $(INSTALLLIBMODE) $(INSTALLSHAPELIBPATH)/$$i; \ + fi; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET1) $(TARGET2) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + SWITCHES="$(SWITCHES)" \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + VERSIONBINDING=$(VERSIONBINDING) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + ALLTARGETS= \ + MAINTARGET= \ + SHAPELIBPATH=$(SHAPELIBPATH) $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +localinstall: +localinstall $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + SWITCHES="$(SWITCHES)" \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + VERSIONBINDING=$(VERSIONBINDING) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + SWITCHES="$(SWITCHES)" \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLSHAPELIBPATH=$(INSTALLSHAPELIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + VERSIONBINDING=$(VERSIONBINDING) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + SWITCHES="$(SWITCHES)" \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + VERSIONBINDING=$(VERSIONBINDING) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) clean; \ + fi --- shapetools-1.4pl6.orig/src/shape/Makefile +++ shapetools-1.4pl6/src/shape/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -17,7 +18,7 @@ # # Author: Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[8.0] Fri Jan 28 20:28:08 1994 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -26,7 +27,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -39,28 +40,31 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING #SWITCHES = -DMEMDEBUG # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = $(BASE) -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -76,7 +80,7 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. TARGET = shape @@ -90,11 +94,11 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # Aliases for (filesystem links to) $(TARGET). -ALIASES = +ALIASES = # The regular source and header files. @@ -111,9 +115,9 @@ # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Sources of variant source components stored under equal names in # different locations. During system builds, only one of each (equally @@ -127,12 +131,12 @@ MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) MAN1 = shape.1 -MAN3 = -MAN4 = -MAN5 = -MAN6 = -MAN7 = -MAN8 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = # All source components of the system (should not be changed) @@ -155,21 +159,35 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro + +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = -CC = gcc -traditional +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = $(VARLIBS) $(LOCALLIBPATH)/libAtFStk.a\ +SYSLIB = +STATICLOCALLIBS = $(VARLIBS) $(LOCALLIBPATH)/libAtFStk.a \ $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a -LINTLIBS = +SHAREDLOCALLIBS = $(VARSHLIBS) $(LOCALLIBPATH)/libAtFStk.so \ + $(LOCALLIBPATH)/libsttk.so $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -183,8 +201,8 @@ targets: $(TARGET) -$(TARGET): $(LOCALLIBS) $(VARLIBS) $(OBJECTS) - $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(VARLIBS) $(SYSLIBS) +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) @_aliases="$(ALIASES)"; \ for i in $$_aliases; \ do \ @@ -207,7 +225,8 @@ then \ chmod u+w $(INSTALLBINPATH)/$(TARGET); \ fi; \ - cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) $(OBJECTS) \ + $(INSTALLLDFLAGS) $(SYSLIBS); \ chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ _aliases="$(ALIASES)"; \ for i in $$_aliases; \ @@ -238,32 +257,43 @@ # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -290,26 +320,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -318,26 +330,8 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + $(INHERITEDFLAGS) \ + install; \ fi +clean: @@ -345,24 +339,6 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi --- shapetools-1.4pl6.orig/src/shape/Makefile.in +++ shapetools-1.4pl6/src/shape/Makefile.in @@ -0,0 +1,343 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for shape +# +# Author: Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/shape + +# A short name for this node system + +NODENAME = shape_CM + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ +#SWITCHES = -DMEMDEBUG + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = shape + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = version.c # source +VERSIONOBJECT = version.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +# VARSRC and VAROBJ will be overridden by certain variants as appropriate + +SOURCES = dkey.c error.c files.c hash.c inherit.c macro.c main.c \ + misc.c produce.c rule.c shapeopt.c \ + sighand.c std.c strbuf.c varsec.c \ + parser.c mfiles.c utils.c queues.c $(VARSRC) + +HEADERS = shape.h strbuf.h parser.h mfiles.h mffuncs.h $(VARHDR) + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = shape.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = main.o hash.o dkey.o macro.o rule.o files.o error.o \ + produce.o std.o varsec.o misc.o sighand.o \ + shapeopt.o inherit.o strbuf.o \ + mfiles.o utils.o queues.o parser.o $(VERSIONOBJECT) \ + $(VAROBJ) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIB = @SYSLIBS@ +STATICLOCALLIBS = $(VARLIBS) $(LOCALLIBPATH)/libAtFStk.a \ + $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(VARSHLIBS) $(LOCALLIBPATH)/libAtFStk.so \ + $(LOCALLIBPATH)/libsttk.so $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +# Construction of a library would look like: +#$(TARGET): $(OBJECTS) +# ar ruv $(TARGET) $(OBJECTS); \ +# $(RANLIB) $(TARGET) + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) $(OBJECTS) \ + $(INSTALLLDFLAGS) $(SYSLIBS); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + $(INHERITEDFLAGS) \ + install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/shape/Makefile.org +++ shapetools-1.4pl6/src/shape/Makefile.org @@ -0,0 +1,368 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for shape +# +# Author: Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $Header: Makefile[8.0] Fri Jan 28 20:28:08 1994 andy@cs.tu-berlin.de frozen $ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = /home/stone/shape/development + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/shape + +# A short name for this node system + +NODENAME = shape_CM + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = s_sunos_4 + +# The processor type. + +HOSTTYPE = sun4 + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = +#SWITCHES = -DMEMDEBUG + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBASE = $(BASE) +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 644 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = shape + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = version.c # source +VERSIONOBJECT = version.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +# VARSRC and VAROBJ will be overridden by certain variants as appropriate + +SOURCES = dkey.c error.c files.c hash.c inherit.c macro.c main.c \ + misc.c produce.c rule.c shapeopt.c \ + sighand.c std.c strbuf.c varsec.c \ + parser.c mfiles.c utils.c queues.c $(VARSRC) + +HEADERS = shape.h strbuf.h parser.h mfiles.h mffuncs.h $(VARHDR) + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = shape.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = main.o hash.o dkey.o macro.o rule.o files.o error.o \ + produce.o std.o varsec.o misc.o sighand.o \ + shapeopt.o inherit.o strbuf.o \ + mfiles.o utils.o queues.o parser.o $(VERSIONOBJECT) \ + $(VAROBJ) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -g +MAKELDFLAGS = -g + +CC = gcc -traditional +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = /usr/bin/ranlib + +# System libraries, local libraries and lint libraries. + +SYSLIBS = +LOCALLIBS = $(VARLIBS) $(LOCALLIBPATH)/libAtFStk.a\ + $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(VARLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(VARLIBS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +# Construction of a library would look like: +#$(TARGET): $(OBJECTS) +# ar ruv $(TARGET) $(OBJECTS); \ +# $(RANLIB) $(TARGET) + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" clean; \ + fi --- shapetools-1.4pl6.orig/src/shape/files.c +++ shapetools-1.4pl6/src/shape/files.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -73,14 +73,14 @@ lastpath++; } -LOCAL Bool is_in_pathlist (raw_name, sought_name, full_path) - char *raw_name, *sought_name; Bool full_path; +LOCAL Bool is_in_pathlist (raw_name, sought_name, full_path) + char *raw_name, *sought_name; Bool full_path; { register int i; - + for(i = lastpath - 1; i >= 0; i--) { /* looking in pathlist if file already exists */ - + if (!strcmp (sought_name, pathlist[i][0])) { if (!strcmp (pathlist[i][1], "&$")) strcpy (actpath, curvpath[0]); @@ -120,9 +120,9 @@ return TRUE; } } - + } /* end if (!strcmp (sought_name, pathlist[i][0])) */ - + } /* end for (i = lastpath - 1; i >= 0; i--) */ return FALSE; } @@ -159,7 +159,7 @@ restoreList[i] = (struct restoreItem *)0; maxResListDepth += 16; } - + if(restoreList[depth] == (struct restoreItem *)0) { @@ -179,7 +179,7 @@ errexit(10,"malloc"); currentItem = currentItem->next; } - + if((currentItem->unixName = malloc((unsigned) (strlen(unixName) + sizeof(char)))) == NIL) errexit(10,"malloc"); strcpy(currentItem->unixName, unixName); @@ -199,7 +199,7 @@ char *buf, *at_getfilename(); Bool busy_exist; struct utimbuf rv_time; - + if (noexflg) /* don't execute commands (-n Option) */ return; @@ -212,20 +212,20 @@ /* link, unlink, set busy */ if ((atfs_fp = af_open (restoreKey, "r")) == NULL) errexit(10,"af_open"); - + /* copy old revision into temp. file */ if ((buf = malloc((unsigned) af_retnumattr (restoreKey, AF_ATTSIZE))) == NIL) errexit(10,"malloc"); fread (buf, sizeof(char), (int) af_retnumattr (restoreKey, AF_ATTSIZE), atfs_fp); af_close(atfs_fp); - + if ((tmp_fp = fopen (tmpName, "w")) == NULL) errexit(10, "fopen; could not create tmpfile"); - + if(noexpflg) fwrite (buf, sizeof(char), (int) af_retnumattr (restoreKey, AF_ATTSIZE), tmp_fp); else - atExpandAttrs (restoreKey, buf, af_retnumattr (restoreKey, AF_ATTSIZE), tmp_fp, 0, + atExpandAttrs (restoreKey, buf, af_retnumattr (restoreKey, AF_ATTSIZE), tmp_fp, 0, AT_EXPAND_FILE); free(buf); fclose(tmp_fp); @@ -239,7 +239,7 @@ strcpy (hiddenName, stTmpFile (af_retattr (restoreKey, AF_ATTSPATH))); else strcpy (hiddenName, stTmpFile (curvpath[0])); - + busy_exist = TRUE; if (link (unixName, hiddenName) != 0) { @@ -265,6 +265,7 @@ if (utime (unixName, &rv_time) < 0) { perror ("shape -- warning: (restore_vers) can't set modification time.\n"); } + chmod (unixName, (mode_t) VATTR(restoreKey).af_mode); register_link (unixName, hiddenName, busy_exist); if (af_retnumattr (restoreKey, AF_ATTSTATE) != AF_BUSY) busy_done = TRUE; @@ -297,14 +298,14 @@ else break; } - + if (clist->nextstring != (struct linked_list *) NIL) return TRUE; - + if ((clist->nextstring = (struct linked_list *) malloc (sizeof(struct linked_list))) == (struct linked_list *) NIL) errexit (10,"malloc"); - if((clist->nextstring->string = + if((clist->nextstring->string = malloc ((unsigned) (strlen (name) + sizeof(char)))) == NIL) errexit (10,"malloc"); strcpy (clist->nextstring->string,name); @@ -327,7 +328,7 @@ if ((at = strrchr (netPathPrefix, '@'))) { *at = '\0'; } - + if (af_retnumattr (key, AF_ATTSTATE) == AF_BUSY) { if (cid_mode == 0) { fprintf (cid,"\t%s[", atRetAttr (key, AF_ATTUNIXNAME)); @@ -355,7 +356,7 @@ return; } } - + if (cid_mode == 0) fprintf (cid,"\t%s", atRetAttr (key, AF_ATTBOUND)); else @@ -401,8 +402,8 @@ LOCAL void dump_variant_classes (destination) FILE *destination; { /* - * prints a list of all known variant class definitions to - * the file passed in "destination". This must be an open + * prints a list of all known variant class definitions to + * the file passed in "destination". This must be an open * FILE. A variat definition is printed in correct Shapefile * syntax. */ @@ -422,7 +423,7 @@ /* * print a list of all known variant definitions to the file * passed in "destination", which must point to an open FILE. - * The definitions are printed in proper Shapefile variant + * The definitions are printed in proper Shapefile variant * defintion syntax. */ @@ -435,7 +436,7 @@ vd_count++; }; } - + LOCAL void dump_variants (cidfile) FILE *cidfile; { dump_variant_classes (cidfile); @@ -451,7 +452,7 @@ } /* not used - * + * * LOCAL void add_to_selmacro (fname) * char *fname; * { @@ -462,7 +463,7 @@ * define_macro ("SELECTED_FS", fname, APPEND); * } * } - * + * * * LOCAL void notfounditem (dependent) * char *dependent; @@ -472,7 +473,7 @@ * printf("%s\n", dependent); * strcpy(depname,dependent); * } - * + * * LOCAL void write_select_list (key) * Af_key *key; * { @@ -520,14 +521,14 @@ psuff = strrchr (raw_repository_path, '/'); if (at) *at = ' '; if (psuff) *psuff = ' '; - (void) sscanf (raw_repository_path, + (void) sscanf (raw_repository_path, "%s AtFS %s", cooked_repository_path, vbinding); } else { (void) strcpy (raw_repository_path, path_to_net_id (path)); at = strrchr (raw_repository_path, '@'); if (at) *at = ' '; - (void) sscanf (raw_repository_path, + (void) sscanf (raw_repository_path, "%s %s", cooked_repository_path, vbinding); } return cooked_repository_path; @@ -556,14 +557,14 @@ #define YES 0 #define NO -1 - int file_exists = NO, - file_exists_in_src_rkive, + int file_exists = NO, + file_exists_in_src_rkive, file_exists_in_bpool; int ii; Af_attrs buf; Bool is_in_pathlist(), full_path = FALSE; - + if (!name || (name[0] == '\0')) return (FALSE); @@ -578,7 +579,7 @@ else px = lname; - if ((mode != BINARY) && is_in_pathlist (lname, px, full_path)) + if ((mode != BINARY) && is_in_pathlist (lname, px, full_path)) return TRUE; strcpy (bname, name); @@ -617,37 +618,37 @@ else strcpy (buf.af_syspath, curvpath[0]); } - + if (mode == ALL) { - file_exists_in_src_rkive = af_access (buf.af_syspath, buf.af_name, + file_exists_in_src_rkive = af_access (buf.af_syspath, buf.af_name, buf.af_type, AF_CLASS_SOURCE); - file_exists_in_bpool = af_access (buf.af_syspath, buf.af_name, + file_exists_in_bpool = af_access (buf.af_syspath, buf.af_name, buf.af_type, AF_CLASS_DERIVED); - if((file_exists_in_src_rkive == YES) || + if((file_exists_in_src_rkive == YES) || (file_exists_in_bpool == YES)) file_exists = YES; else file_exists = NO; } - + if (mode == NONE) - file_exists = af_access (buf.af_syspath, buf.af_name, + file_exists = af_access (buf.af_syspath, buf.af_name, buf.af_type, AF_CLASS_SOURCE); - + if (mode == SOURCE) { - file_exists = af_access (buf.af_syspath, buf.af_name, + file_exists = af_access (buf.af_syspath, buf.af_name, buf.af_type, AF_CLASS_DERIVED); if (file_exists == NO) - file_exists = af_access (buf.af_syspath, buf.af_name, + file_exists = af_access (buf.af_syspath, buf.af_name, buf.af_type, AF_CLASS_SOURCE); else file_exists = NO; } - + if (mode == BINARY) - file_exists = af_access(buf.af_syspath, buf.af_name, + file_exists = af_access(buf.af_syspath, buf.af_name, buf.af_type, AF_CLASS_DERIVED); - + if (file_exists == YES) { strcpy (actpath, buf.af_syspath); if (!full_path) @@ -655,11 +656,11 @@ break; } i--; - + } /* end while ( i >= 0 ) */ - + return (file_exists == YES); - + #undef YES #undef NO } @@ -674,7 +675,7 @@ * locate the repository location of the object named "dep", and * attempt to bind it to a version, implied by "bind_rule". If an * object can be bound, a pointer to it is stored in the BKey structure. - * As a global side effect, all attributes of the bound object are stored + * As a global side effect, all attributes of the bound object are stored * in the global attribute buffe "buft". */ @@ -714,7 +715,7 @@ af_freeattrbuf (&buft); if (!object_has_explicit_path) - object_lives_in_vpath = + object_lives_in_vpath = strcmp (af_retattr (bound_key, AF_ATTSPATH), curvpath[0]); if(confid) { @@ -723,9 +724,9 @@ else write_confid (bound_key, 0); } - - + + /* If this version is found via vpath, we want it to be * "restored" to the current directory. Even if it is a * busy-version. If the version is non-busy, @@ -739,9 +740,9 @@ } else restoreType = 0; /* local */ - + if (object_lives_in_vpath || - (af_retnumattr (bound_key, AF_ATTSTATE) != AF_BUSY ) || + (af_retnumattr (bound_key, AF_ATTSTATE) != AF_BUSY ) || (expflg)) { add_to_restorelist (bound_key, dep, restoreType); return TRUE; @@ -753,7 +754,7 @@ } reset_vclass(); - + if (!D_flag) { /* tracing already done */ atBindTrace = TRUE; chdir (actpath); @@ -762,7 +763,7 @@ chdir (curvpath[0]); } errexit(17,dep); - + return FALSE; } @@ -777,7 +778,7 @@ char *nl = strchr (now, '\n'); if (nl && (*nl == '\n')) *nl = '\0'; } - + fprintf (cid, "########################################"); fprintf (cid, "########################################\n"); fprintf (cid, "######\n"); @@ -852,7 +853,7 @@ /* if rule is already in list and variant context is the same, do nothing */ active_vars = active_variants (); for (i = 0; i < rlist_level; i++) { - if (rule_list[i].rule_ptr == rule) + if (rule_list[i].rule_ptr == rule) if (!strcmp (rule_list[i].active_vars, active_vars)) return; } @@ -864,17 +865,17 @@ rlist_size = RLSIZE * sizeof (struct rlist_entry); } else { - struct rlist_entry *tmp = (struct rlist_entry *) + struct rlist_entry *tmp = (struct rlist_entry *) realloc (rule_list, 2 * rlist_size); if (!tmp) errexit (10, "realloc"); rule_list = tmp; rlist_size *= 2; } } - + /* register rule */ rule_list[rlist_level].rule_ptr = rule; - rule_list[rlist_level].active_vars = active_vars ? + rule_list[rlist_level].active_vars = active_vars ? check_strdup (active_vars) : NULL; rule_list[rlist_level++].has_commands = (rule->cmdlist != NULL); } @@ -907,7 +908,7 @@ strcpy(syspath,curvpath[0]); else strcpy(syspath,af_afpath(filename)); - + if(af_crkey(syspath, af_afname(filename), af_aftype (filename),&key) == -1) errexit(10,"af_crkey"); else @@ -938,9 +939,9 @@ EXPORT char *restored_object_id (unixname) char *unixname; { /* - * Check whether an object with name "unixname" is in the restorelist, + * Check whether an object with name "unixname" is in the restorelist, * return a string giving the actual location and id of the object. - * The returned string format is as follows: if an object lives + * The returned string format is as follows: if an object lives * somewhere in a vpath-subdirectory, the relative (to the build-dir) * pathname of the object is returned. To obtain the relative path, * we use the object's absolute path and skip the part of it that is --- shapetools-1.4pl6.orig/src/shape/inherit.c +++ shapetools-1.4pl6/src/shape/inherit.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -50,7 +50,7 @@ char fullname[MYMAXNAMLEN]; Bool bp = FALSE, nobp = FALSE; register struct rules *bpool, *nobpool; - + fullname[0] = '\0'; if (strcmp(syspath,curvpath[0])) { @@ -78,7 +78,7 @@ } else bp = TRUE; - + if (nobpool != (struct rules *) NIL) { nobp = finddep(nobpool,fullname); @@ -92,7 +92,7 @@ if ((!bp) && nobp) return(TRUE); - + if ((!bp) && (!nobp)) return(TRUE); /*NOTREACHED*/ @@ -114,7 +114,7 @@ FAIL ("dropkey", "", AF_EINVKEY, ERROR); /* increase reference count in corresponding archive and in attrbuf */ - + afIncreaseAccess (inkey); *outkey = *inkey; return (AF_OK); @@ -126,7 +126,7 @@ { struct linked_key_list *c; static struct linked_key_list *l; - + if(done_list == (struct linked_key_list *) NIL) { done_list = (struct linked_key_list *) check_malloc (sizeof(struct linked_key_list)); @@ -140,7 +140,7 @@ l = c; } c->nextstring = (struct linked_key_list *) NIL; - + c->string = check_strdup (targ_path); if (done_key) { @@ -168,7 +168,7 @@ if (*end) { start = end+1; } - else + else return FALSE; } while (*start); @@ -201,9 +201,9 @@ * This is handling of the special case, when a target (pseudo * or real) depends on nothing but a commandlist. In this case * reproduction of the target must be performed unconditionally. - * The resulting target (in case it is a file) is stored in the + * The resulting target (in case it is a file) is stored in the * BPOOL (should be avoided) with an empty attribute. We have to - * avoid restoration from BPOOL and have to set the existing + * avoid restoration from BPOOL and have to set the existing * file to non-current. */ if (!q->dependent_queue_initialized && @@ -232,14 +232,18 @@ strcpy (type, af_aftype (name)); strcpy (name, af_afname (name)); - if((derivation_key = malloc((unsigned) (strlen(do_key) + + if((derivation_key = malloc((unsigned) (strlen(do_key) + strlen (ATTRNAME) + 2))) == NIL) errexit(10,"malloc"); strcpy (derivation_key, ATTRNAME); strcat (derivation_key, "="); strcat (derivation_key, do_key); - + while (this_rule && !this_rule->saved) { +#ifdef DOKO + char tmpPath[PATH_MAX+1]; + struct stat buf; +#endif this_rule->saved = TRUE; if (error_occ) { @@ -268,13 +272,20 @@ targetpath = check_strdup (this_rule->name); } +#ifdef DOKO + sprintf(tmpPath, "%s/%s.%s", syspath, name, type); + fprintf(stderr, "key: %s[%d.%d]\n", tmpPath, major_version, minor_version); + stat(tmpPath, &buf); +#endif + if (af_getkey (syspath, name, type, major_version, minor_version, &busykey) == -1) goto next_spin; /* - * I hope this is right. Should we return the key from + * I hope this is right. Should we return the key from * the bpool instead (if possible) ? */ + if (!primary_target_key->bk_isdefined) { primary_target_key->bk_isdefined = TRUE; primary_target_key->bk_key = busykey; @@ -285,16 +296,31 @@ } else if (attrbuf.af_mtime < touch_time) { /* - * This case happens if an implicit rule specifies multiple + * This case happens if an implicit rule specifies multiple * targets but not all of them are actually made, perhaps due * to optimizations in the tool script (e.g. the well-known * "yacc -d"-problem). We want to prevent caching of identical * derived (actually *not* re-derived) versions. */ char *busy_dkeys = af_retattr (&busykey, ATTRNAME); - +#if DOKO + fprintf(stderr, "attrbuf.af_mtime < touch_time (%s)\n" + "\tatfs : atime=%lu, mtime=%lu, ctime=%lu, touch_time: %lu\n", + tmpPath, attrbuf.af_atime, attrbuf.af_mtime, attrbuf.af_ctime, + touch_time); + fprintf(stderr, "\tstat1: atime=%lu, mtime=%lu, ctime=%lu\n", + buf.st_atime, buf.st_mtime, buf.st_ctime); + stat(tmpPath, &buf); + fprintf(stderr, "\tstat2: atime=%lu, mtime=%lu, ctime=%lu\n", + buf.st_atime, buf.st_mtime, buf.st_ctime); + fflush(stderr); +#endif if (!stk_matchuda (busy_dkeys, do_key)) - if ((af_setattr (&busykey,AF_ADD,derivation_key)) == -1) { +#if 1 + if ((af_setattr (&busykey, AF_REPLACE, derivation_key)) == -1) { +#else + if ((af_setattr (&busykey, AF_ADD, derivation_key)) == -1) { +#endif af_perror ("save_targets"); } if (busy_dkeys) free (busy_dkeys); @@ -302,7 +328,7 @@ goto next_spin; } af_freeattrbuf (&attrbuf); - + retcode = af_setattr (&busykey, AF_REPLACE, atCacheKey(&busykey)); if ((retcode == -1) && (af_errno == AF_ENOATFSDIR)) { warning (1, "while trying to set cachekey"); @@ -318,6 +344,22 @@ add_to_done_list (targetpath, &busykey); +#if DOKO + { + Af_attrs attrbuf2; + if (af_allattrs (&busykey, &attrbuf2) < 0) { + af_perror ("save_targets"); + } + fprintf(stderr, "\tatfs : atime=%lu, mtime=%lu, ctime=%lu\n", + attrbuf2.af_atime, attrbuf2.af_mtime, attrbuf2.af_ctime); + stat(targetpath, &buf); + fprintf(stderr, "\tstat3: atime=%lu, mtime=%lu, ctime=%lu\n", + buf.st_atime, buf.st_mtime, buf.st_ctime); + fflush(stderr); + af_freeattrbuf (&attrbuf2); + } +#endif + free (targetpath); if ((bpoolflg) || (nobpoolflg)) { @@ -355,7 +397,7 @@ * We have to clean up our flags if "dep_rule" is a pattern rule. */ if (is_pattern (dep_rule->name)) - for (this_rule = dep_rule; this_rule && this_rule->saved; + for (this_rule = dep_rule; this_rule && this_rule->saved; this_rule = this_rule->next) this_rule->saved = FALSE; } @@ -365,7 +407,7 @@ Af_key *done_key; { struct linked_key_list *c; - + c = done_list; while(c != (struct linked_key_list *) NIL) --- shapetools-1.4pl6.orig/src/shape/macro.c +++ shapetools-1.4pl6/src/shape/macro.c @@ -6,7 +6,7 @@ * * $Header: macro.c[8.0] Mon Jun 6 15:09:08 1994 axel@cs.tu-berlin.de frozen $ */ -/* Thanks to Steve Emerson (steve@unidata.ucar.edu) for the +/* Thanks to Steve Emerson (steve@unidata.ucar.edu) for the reimplementation of expandmacro() */ #ifndef lint @@ -40,7 +40,7 @@ register int j = 0; int this_var; struct vardef *this_vardef; - char *p, *p1, *p2, *p3; + char *p = NULL, *p1, *p2, *p3; char macro[2048]; static char retval[1024]; static char *BLUMENKOHL="bLuMeNkOhL"; @@ -48,7 +48,7 @@ retval[0] = '\0'; for (this_var = 0; this_var < variants_active; this_var++) { - + this_vardef = &variantDefs[activeVariants[this_var]]; if (this_vardef->name) { if ((!strcmp(name,"vpath")) && (this_vardef->vpath)) { @@ -62,7 +62,7 @@ } continue; } - + if ((!strcmp(name, "vflags")) && (this_vardef->vflags)) { if (retval[0] == '\0') { strcat(retval, this_vardef->vflags); @@ -83,25 +83,25 @@ p1 = strchr(macro, '='); p2 = strchr(macro, ' '); p3 = strchr(macro, '\t'); - + if (p2 == NIL) p2 = p1 + 1; - + if (p3 == NIL) p3 = p1 + 1; - + if (( p1 < p2) && (p1 < p3)) p = p1; if (( p2 < p1) && (p2 < p3)) p = p2; if (( p3 < p2) && (p3 < p1)) p = p3; - + *p = '\0'; p1++; if (!strcmp(name, macro)) { - + while((*p1 == ' ') || (*p1 == '\t') || (*p1 == '=')) p1++; if(retval[0] == '\0') { @@ -130,12 +130,12 @@ register int i; p = string; i = 0; - + if (result_str) result_str = check_realloc (result_str, (unsigned)(strlen (string)+1)); else result_str = check_malloc ((unsigned)(strlen (string)+1)); - + while (p && *p && isspace(*p)) p++; while (*p) { @@ -172,7 +172,7 @@ int result_size = 0, result_bytes = 0, nbytes = 0; y = check_strdup (str); - if (strchr (str, '$')) + if (strchr (str, '$')) x = check_strdup (expandmacro (y)); else x = check_strdup (y); @@ -181,7 +181,7 @@ i = 0; y = check_realloc (y, strlen (x) + 1); - + while (x[i]) { if((x[i] == '$') && (x[i+1] == '$')) i++; @@ -208,7 +208,7 @@ } while (!feof (fd)); *end_result = '\0'; - + pclose (fd); free (x); free (y); @@ -290,12 +290,12 @@ char *original; { /* - * write the string, pointed to by original backwards into a - * buffer that is allocated on the heap. A pointer to the + * write the string, pointed to by original backwards into a + * buffer that is allocated on the heap. A pointer to the * buffer is returned. It's the responsibility of the caller * to free the associated memory. - * If original is empty or a NULL pointer, a NULL pointer is - * returned. + * If original is empty or a NULL pointer, a NULL pointer is + * returned. */ register int i, j; @@ -314,37 +314,40 @@ return lanigiro; } - + LOCAL char *substitute_string (subject, old, new) char *subject, *old, *new; { /* * replace all occurrences of substring "old" in each token in - * "subject" by string "new". Return a pointer to a statically - * allocated string that is the result of this operation. + * "subject" by string "new". Return a pointer to a dynamically + * allocated string that is the result of this operation. */ - int subject_len, result_len, old_len, new_len; + int subject_len, result_len, old_len, new_len, growth; char *result, *dlo, *wen, *tecjbus, *tluser; register char *p, *s; register int i, j; - if (subject == NULL) - return ""; + if (subject == NULL) { + result = check_malloc(1); + *result = '\0'; + return result; + } else subject_len = strlen (subject); old_len = old ? strlen (old) : 0; new_len = new ? strlen (new) : 0; + growth = new_len - old_len; result_len = subject_len + 1; if ((old_len == 0) || (old_len > subject_len)) { - strcpy (result, subject); - return result; + return check_strdup(subject); } - /* + /* * mirror all participating strings. The corresponding * pointer variables have the names of their originals backwards, * i.e. old -> dlo etc. @@ -368,19 +371,20 @@ i = 0; while (*s && (*(p+i) == *s)) { s++; i++; } - if (j+new_len >= result_len) { - if ((tluser = (char *)realloc (tluser, j+new_len+subject_len) ) - == (char *)NULL) - errexit (10, "realloc"); - result_len = j+new_len+subject_len; - } - if (*s) { tluser[j++] = *p++; } else { char *oldp; + /* Match found. Make room for substitution. */ + if (growth > 0) { + if ((tluser = (char *)realloc (tluser, result_len + growth)) + == (char *)NULL) + errexit (10, "realloc"); + result_len += growth; + } + p += old_len; oldp = p; /* save position. the skipped text must be appended.. */ @@ -407,15 +411,15 @@ } -LOCAL Bool chk_strsub (subject, old, new) +LOCAL Bool chk_strsub (subject, old, new) char *subject, **old, **new; { /* * Check if the string "subject" is of the form "str1=str2" where * str1 must be non-empty. If "subject" does have this form, - * allocate space sufficient to hold "str1" and "str2" + * allocate space sufficient to hold "str1" and "str2" * respectively. Copy str1 and str2 to these memory areas and * assign "old" to "str1" and "new" to "str2". Return TRUE. - * If "subject doesn't match this form, leave the outbound + * If "subject doesn't match this form, leave the outbound * parameters "old" and "new" untouched. Return FALSE. */ @@ -498,7 +502,7 @@ while (*lptr) lptr++; if (lptr > value) lptr--; while (*lptr && isspace (*lptr)) lptr--; - if (*lptr) + if (*lptr) *(lptr+1) = '\0'; if (!strcmp(name,"RECDEPTH")) { @@ -637,7 +641,7 @@ */ char *start = p + 2; char klauf = p[1]; - char klazu = p[1] == LEFT_PAREN + char klazu = p[1] == LEFT_PAREN ? RIGHT_PAREN : RIGHT_BRACE; @@ -650,13 +654,12 @@ if (sbcpy(name, start, p-start) == 0) errexit(10, "sbcpy"); - if (strcmp(sbstr(name), "SHAPE") == 0 || + if (strcmp(sbstr(name), "SHAPE") == 0 || strcmp(sbstr(name), "MAKE") == 0) { shape_command = TRUE; } if (*p == ':') { - register char *closer; int level = 1; base = p + 1; while (*p && level) { @@ -694,22 +697,22 @@ if (curvar[0] != 0) { char *get_variant_macro(); variant_macro = get_variant_macro(sbstr(name)); - + if (strcmp(variant_macro, "bLuMeNkOhL") != 0) { char *mist = expandmacro(variant_macro); - + if (string_substitution) { char *cooked_string; - - cooked_string = + + cooked_string = substitute_string (mist, old, new); - if (sbcat (mac_buf, cooked_string, + if (sbcat (mac_buf, cooked_string, strlen (cooked_string)) == 0) errexit (10, "sbcat"); if (cooked_string) free (cooked_string); } else { - if (sbcat (mac_buf, mist, + if (sbcat (mac_buf, mist, strlen (mist)) == 0) errexit (10, "sbcat"); } @@ -717,24 +720,24 @@ } if (variant_macro == 0 || !strcmp(variant_macro,"bLuMeNkOhL")){ char *value, *expandedValue; - + if (!visitedHash (sbstr(name))) { if ((value = getHash (sbstr(name)))) { expandedValue = expandmacro (value); clearHashVisited (sbstr(name)); - + if (string_substitution) { char *cooked_string; - cooked_string = + cooked_string = substitute_string (expandedValue, old, new); - if (sbcat (mac_buf, cooked_string, + if (sbcat (mac_buf, cooked_string, strlen (cooked_string)) == 0) errexit (10, "sbcat"); if (cooked_string) free (cooked_string); } else { - if (sbcat(mac_buf, expandedValue, + if (sbcat(mac_buf, expandedValue, strlen(expandedValue)) == 0) errexit(10, "sbcat"); } --- shapetools-1.4pl6.orig/src/shape/main.c +++ shapetools-1.4pl6/src/shape/main.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -36,7 +36,7 @@ EXPORT char *suffs; EXPORT char shapeflags[2048]; -LOCAL char *filenames[] = {"Shapefile", "shapefile", "Makefile", "makefile"}; +LOCAL char *filenames[] = {"shapefile", "Shapefile", "makefile", "Makefile"}; LOCAL char *stdmacros[] = { "ASFLAGS=","AS=as", "SHELL=/bin/sh", "RFLAGS=","FFLAGS=","FC=f77","M2FLAGS=", "M2C=m2c","PFLAGS=","PC=pc","CFLAGS=", @@ -91,22 +91,22 @@ static unsigned long oldmbytes; unsigned long cursize = malloc_size (&histid2); - fprintf (leak_log, "%s%s%s - %d bytes allocated (gained %d).\n", - location, (aux && *aux) ? " " : "", + fprintf (leak_log, "%s%s%s - %d bytes allocated (gained %d).\n", + location, (aux && *aux) ? " " : "", (aux && *aux) ? aux : "", cursize, cursize - oldmbytes); fflush (leak_log); } #endif - + EXPORT int main(argc, argv) int argc; char **argv; - + { - int newac = 0; + int newac = 0, bindac=0; Bool cmd_line_macro_def = FALSE; - char **newav; + char **newav, **bindav; sb_ptr strbuf = sbnew(128); register int i, k = 0; char *xxx, *cp; @@ -118,37 +118,42 @@ if (strbuf == 0) errexit(10, "sbnew"); - + rebuildflg = FALSE; bpoolflg = TRUE; rec_do_depth = 1; if ((curvpath[0] = malloc(PATH_MAX + 2)) == NIL) errexit(10,"malloc"); getcwd(curvpath[0], PATH_MAX + 2); - catch_sigs(); - + catch_sigs(); + *shapeflags = '\0'; - + for (i = 0; i < MAXCMDLINEVARS; i++) { cmd_line_vars[i] = (char *)NULL; } - + stProgramName = (cp = strrchr (argv[0], '/')) ? ++cp : argv[0]; /* make prog-name available to entire program */ - + if (argc != 1) { - if(stParseArgs (argc, argv, &newac, &newav, odesc)) { + /* Look for Bind options first */ + if(atBindOptions(argc, argv, &bindac, &bindav)) { + atBindUsage("other options ignored."); + exit(1); + } + if(stParseArgs (bindac, bindav, &newac, &newav, odesc)) { stShortUsage(stProgramName, odesc, ""); exit(1); } } - + if (!echoflg) { strcpy(prev_dir,curvpath[0]); - + strcpy(atfsdir,curvpath[0]); strcat(atfsdir,"/AtFS"); - + if(af_access(af_afpath(atfsdir),af_afname(atfsdir),af_aftype(atfsdir),AF_CLASS_SOURCE) != 0) { strcpy(atfsdir,curvpath[0]); strcat(atfsdir,"/AFS"); @@ -158,15 +163,15 @@ } } } - + if((xxx = strrchr (prev_dir,'/')) != NIL) *xxx = '\0'; init_ruletab(); - + newargc = newac; for(i = 1; i < newac; i++) newarg[i] = newav[i]; - + for (i = 0; stdmacros[i]; i++) { char *macbuf = check_strdup (stdmacros[i]); char *val; @@ -179,16 +184,16 @@ { char buf[16]; - (void) sprintf (buf, "%d", getpid()); + (void) sprintf (buf, "%d", (int) getpid()); define_macro ("SHAPEPID", buf, DYNAMIC | FROM_CMDLINE); - define_macro ("SHAPEVERSION", stStrtok (version ()), + define_macro ("SHAPEVERSION", stStrtok (version ()), DYNAMIC | FROM_CMDLINE); - define_macro ("LOGNAME", atUserName (af_afuser (getuid ())), + define_macro ("LOGNAME", atUserName (af_afuser (getuid ())), DYNAMIC | FROM_CMDLINE); } - + sbfree(strbuf); - + add_stdrules(); /* make command line macros known */ @@ -230,10 +235,10 @@ shfiles = shapefiles; while(shfiles != (struct linked_list *) NIL) { int open_ok = 0; - + open_ok += parse_file (shfiles->string); shfiles = shfiles->nextstring; - + if (parse_errors) { errexit (15, NIL); } @@ -251,7 +256,7 @@ if (parse_errors) errexit (15, NIL); } } - + else { if (parse_file (rbfile)) { if (parse_errors) errexit (15, NIL); @@ -262,52 +267,52 @@ } if (!echoflg || Var_flag) { - fclose(temp); + if (temp) fclose(temp); } commit_definitions (); /* make parsed definitions seen */ - + define_macro ("MAKEFLAGS", shapeflags, DYNAMIC); - + if (echoflg && !Var_flag) { echo_macro(echomac); exit(0); } - + if(rebuildflg && cmd_line_macro_def) warning(3, NIL); - + if (synterrflg == TRUE) errexit(15,NIL); - + ruleend(); - + adjust_stdrules(suffs); - + if(envflg) get_env_vals(); if(environment_vars != NIL) free(environment_vars); - + for (i = 0; cmd_line_vars[i] && (i < MAXCMDLINEVARS); i++) { if (!is_varname (cmd_line_vars[i])) { - char *msg = malloc (strlen (cmd_line_vars[i]) + + char *msg = malloc (strlen (cmd_line_vars[i]) + strlen (" is not a variant name") + sizeof (char)); if (msg == (char *)NULL) errexit (10, "malloc"); - + strcpy (msg, cmd_line_vars[i]+1); strcat (msg, " is not a variant name"); warning (99, msg); free (msg); } } - + if(echoflg) { echo_macro(echomac); exit(0); } - + if (printflg) { dump (stdout); /* dumping macros */ ruledump (stdout); /* dumping targets, dependents & commands, resp. */ @@ -323,16 +328,16 @@ #ifdef DEBUG_MALLOC dssize ("After", "produce"); #endif - + if (debugflg) { dump(stdout); /* dumping macros */ ruledump(stdout); /* dumping targets, dependents & commands, resp. */ } - + cleanup (); exit(0); } - + EXPORT void get_env_vals() { register char *p, *name, *enventry; if(environment_vars == NIL) --- shapetools-1.4pl6.orig/src/shape/parser.c +++ shapetools-1.4pl6/src/shape/parser.c @@ -273,15 +273,15 @@ retval = parse_file(curname->string) ; if (retval == FALSE) { /* try to look for file in standard shape include path */ - if ((st_env = getenv(ST_ENV)) != 0) { - strcpy(incpath, st_env) ; - strcat(incpath, ST_ENV_SHAPELIB) ; - strcat(incpath, "/") ; - strcat(incpath, curname->string) ; - - /* try again */ - retval = parse_file(incpath) ; - } + if ((st_env = getenv(ST_ENV)) == 0) + st_env = ST_ENV_DEFAULT; + strcpy(incpath, st_env) ; + strcat(incpath, ST_ENV_SHAPELIB) ; + strcat(incpath, "/") ; + strcat(incpath, curname->string) ; + + /* try again */ + retval = parse_file(incpath) ; } if (retval == FALSE) { currentmf = save_mf ; --- shapetools-1.4pl6.orig/src/shape/parser.h +++ shapetools-1.4pl6/src/shape/parser.h @@ -33,8 +33,11 @@ #ifdef DEBUG extern int dump_parsed_definitions ; #endif +#include extern int errno ; /* I want to handle ... */ +#if 0 extern char *sys_errlist[] ; /* ... these strings by myself */ +#endif #define fatal_perror(string) fatal(sys_errlist[errno], string) --- shapetools-1.4pl6.orig/src/shape/produce.c +++ shapetools-1.4pl6/src/shape/produce.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -86,7 +86,7 @@ char *percent = stem (current->name, base); (void) strcpy (curdep, subst_char (this_dependent, '%', percent)); } - else + else strcpy (curdep, this_dependent); } else @@ -112,7 +112,7 @@ last_slash = strrchr (raw_name, '/'); last_dot = strrchr (raw_name, '.'); last_open_bracket = strrchr (raw_name, '['); - + if (last_open_bracket && (last_open_bracket > last_slash)) { /* assume bound version notation */ *last_open_bracket = '\0'; @@ -168,7 +168,8 @@ char *rel_dep; { char curdep[512], hhh[64], hhh2[64]; - char comm[MAXCMDLENGTH], *common_prefix, *p, *hhhp, *hhh2p; + static char comm[MAXCMDLENGTH]; + char *common_prefix, *p, *hhhp, *hhh2p; register int i = 0, j = 0, k = 0; while(cmd[i] != '\0') @@ -214,7 +215,7 @@ j = j + strlen(hhh); i = i + 2; } - + break; case '#': { @@ -247,7 +248,7 @@ j = j + (roid ? (strlen (roid) + ((k > 1) ? 1 : 0)) : 0); } if (use_rule) { - strcpy (curdep, cooked_dep (use_rule, + strcpy (curdep, cooked_dep (use_rule, rel_dep, k++, IMPLICIT)); } else { @@ -262,9 +263,9 @@ { Bool target_is_pattern = is_pattern (cur->name); k = 1; - strcpy(curdep, cooked_dep (cur, + strcpy(curdep, cooked_dep (cur, target_is_pattern ? rel_dep : - NULL, 0, + NULL, 0, target_is_pattern ? IMPLICIT : EXPLICIT)); while (*curdep) { @@ -273,7 +274,7 @@ strcat (comm, curdep); j = j + strlen (curdep); } - strcpy (curdep, cooked_dep (cur, + strcpy (curdep, cooked_dep (cur, target_is_pattern ? rel_dep : NULL, k++, target_is_pattern ? @@ -291,9 +292,9 @@ { Bool target_is_pattern = is_pattern (cur->name); k = 1; - strcpy(curdep, cooked_dep (cur, + strcpy(curdep, cooked_dep (cur, target_is_pattern ? rel_dep : - NULL, 0, + NULL, 0, target_is_pattern ? IMPLICIT : EXPLICIT)); while (*curdep) { @@ -303,7 +304,7 @@ j = j + strlen(curdep); break; } - strcpy (curdep, cooked_dep (cur, + strcpy (curdep, cooked_dep (cur, target_is_pattern ? stem (cur->name, rel_dep) : NULL, k++, target_is_pattern ? @@ -316,7 +317,7 @@ case '.': case ' ': if (!is_pattern (cur->name)) { - if ((common_prefix = + if ((common_prefix = malloc((unsigned) (strlen(cur->name) + 1))) == NIL) errexit(10,"malloc"); strcpy(common_prefix, cur->name); @@ -338,7 +339,7 @@ j += st ? strlen(st) : 0; i += (cmd[i+1] == '*') ? 2 : 1; } - + break; case '(': errexit(99,"output translation $(name:str1=str2)"); @@ -385,7 +386,7 @@ if (!*cmd) return; /* empty commands aren't executed */ - again: + again: switch (*cmd) { case '@': silflg = TRUE; @@ -405,12 +406,12 @@ } } /* printf("malloc_verify: %d\n", malloc_verify()); */ - + if (!silflg || ((noexflg))) { printf("%s%s\n", noexflg ? "" : "shape - executing: ", cmd); fflush(stdout); } - + if (!noexflg || shape_command) { reallydone = TRUE; retcode = stCallCmd (itp, cmd); @@ -453,7 +454,7 @@ } if ((rc = malloc (10 * sizeof(char))) == NIL) errexit(10,"malloc"); - sprintf (rc, "%d", retcode); + sprintf (rc, "%d", retcode); if (!(ignflg || goflg)) errexit(13,rc); } @@ -471,7 +472,7 @@ char *expcmd, x_command[MAXCMDLENGTH], fname[MYMAXNAMLEN], command_processor[MYMAXNAMLEN]; - if (rel_dep) + if (rel_dep) strcpy (fname, rel_dep); if (current) @@ -529,19 +530,19 @@ * This is handling of the special case, when a target (pseudo * or real) depends on nothing but a commandlist. In this case * reproduction of the target must be performed unconditionally. - * The resulting target (in case it is a file) is stored in the + * The resulting target (in case it is a file) is stored in the * BPOOL (should be avoided) with an empty attribute. We have to - * avoid restoration from BPOOL and have to set the existing + * avoid restoration from BPOOL and have to set the existing * file to non-current. */ if ((do_key == NIL) || (*do_key == '\0')) { - if ((dep_rule->deplist == (char *)NIL) && + if ((dep_rule->deplist == (char *)NIL) && (dep_rule->cmdlist != (struct cmds *)NIL)) return FALSE; } af_initattrs(&buf); - + buf.af_gen = AF_BUSYVERS; buf.af_rev = AF_BUSYVERS; @@ -556,6 +557,11 @@ strcpy (buf.af_type, af_aftype (do_name)); if (forceflg) { + if(forceallflg) { + if (D_flag) + printf ("shape - must reshape %s (caused by -all)\n", do_name); + return FALSE; + } if (is_in_forcelist (do_name)) { if (D_flag) printf ("shape - must reshape %s (caused by -force)\n", do_name); @@ -564,28 +570,37 @@ } if (D_flag) - printf ("shape - recache %s:\n looking for key: %s.\n\n", + printf ("shape - recache %s:\n looking for key: %s.\n\n", do_name, do_key); busy_version_exists = (af_getkey (buf.af_syspath, af_afname (do_name), - af_aftype (do_name), AF_BUSYVERS, + af_aftype (do_name), AF_BUSYVERS, AF_BUSYVERS, &key1) > -1); if (busy_version_exists && (retrv_attr = af_retattr (&key1, ATTRNAME))) { +#ifdef DOKO + printf("\ndo_key: %s\nre_att: %s\n", do_key, retrv_attr); +#endif if (stk_matchuda (retrv_attr, do_key)) { /* * Double-check, if this is really the busy version we need ! * If the derived object has been rederived with other tools - * than shape (e.g. make), the derived object's contents may + * than shape (e.g. make), the derived object's contents may * have changed but the derivation key is still the same... * To make things sure we check the busy version's mtime against - * the mtime that was stored in the cachekey when the object was + * the mtime that was stored in the cachekey when the object was * created.. */ char *ap = af_retattr (&key1, AT_ATTCACHEKEY); Af_attrs busy_attrs; +#ifdef DOKO + printf("cachekey: %s\n", ap ? ap : "--"); +#endif if (ap && (af_allattrs (&key1, &busy_attrs) > -1)) { char *auxp = strchr (ap, '.'); +#ifdef DOKO + printf("busymtim: %lu\n", busy_attrs.af_mtime); +#endif if (auxp) *auxp = '\0'; if (busy_attrs.af_mtime == atol (ap)) { key_from_cache->bk_key = key1; @@ -594,7 +609,7 @@ free (retrv_attr); free (ap); if (D_flag) - printf ("shape - recache %s:\n got the busyversion.\n\n", + printf ("shape - recache %s:\n got the busyversion.\n\n", do_name); return TRUE; } @@ -603,8 +618,8 @@ } if (retrv_attr) free (retrv_attr); } - - /* + + /* * ASSERT: Either there is no un-cached busyversion, or it has not * the attributes we're looking for. */ @@ -612,7 +627,7 @@ buf.af_gen = AF_NOVNUM; buf.af_rev = AF_NOVNUM; - if ((retrv_attr = malloc ((unsigned)(strlen (do_key) + + if ((retrv_attr = malloc ((unsigned)(strlen (do_key) + strlen (ATTRNAME) + 2))) == NIL) errexit(10,"malloc"); @@ -623,9 +638,9 @@ buf.af_udattrs[0] = retrv_attr; buf.af_udattrs[1] = NIL; - if ((object_is_cached = af_cachefind (&buf, &bset)) == -1) + if ((object_is_cached = af_cachefind (&buf, &bset)) == -1) errexit (10, "af_cachefind"); - + if (!object_is_cached) { if (af_dropset (&bset) == -1) errexit (10, "af_dropset"); @@ -656,6 +671,15 @@ } } } +#ifdef DOKO + { + Af_attrs attrs; + + af_allattrs (&key1, &attrs); + printf("key1 attr %s: %lu\n", do_name, attrs.af_mtime); + af_freeattrbuf(&attrs); + } +#endif if (busy_version_exists && (af_dropkey (&key1) == -1)) af_perror ("try_recache"); return FALSE; @@ -670,8 +694,8 @@ if (af_restore (&bkey, &restorekey) == -1) errexit (10,"af_restore"); printf ("... %s%s%s[%s] restored from derived object cache\n", - buf.af_name, (buf.af_type && buf.af_type[0]) ? "." : "", - buf.af_type ? buf.af_type : "", + buf.af_name, (buf.af_type && buf.af_type[0]) ? "." : "", + buf.af_type ? buf.af_type : "", af_retattr (&bkey, AT_ATTCACHEKEY)); } else @@ -707,7 +731,7 @@ static TargetCode make_target(); -LOCAL Bool try_to_make_target (targ, sr, force, made_object_key) +LOCAL Bool try_to_make_target (targ, sr, force, made_object_key) char *targ; char *sr; Bool force; @@ -745,8 +769,8 @@ int dep = 0, var_depth = -1; # define free_depvars { if (curdep) free (curdep); \ - if (curselrule) free (curselrule); \ - if (lastcurdep) free (lastcurdep); } + if (curselrule) free (curselrule); \ + if (lastcurdep) free (lastcurdep); } lastcurdep = check_strdup (""); made_object_key->bk_isdefined = FALSE; @@ -766,7 +790,7 @@ depth++; if (!(current = get_target (targ))) { - /* + /* * We don't have a rule to produce "targ", so it must be * a source object. If not - give up ! */ @@ -803,17 +827,17 @@ } } } - + /**/ /* ASSERT: current != NIL ; "targ" is name of a derived object */ /**/ dep = 0; - + lbusy_done = busy_done; - + /* - * Now, all the dependents of the current target are examined and + * Now, all the dependents of the current target are examined and * requested. */ curselrule = check_strdup (sr); @@ -837,11 +861,11 @@ dep++; } } - + curdep = check_strdup (get_dep (current, dep)); if (*curdep) dep++; - + /* * skip bogus variant activations (coming from empty expanding var macros) */ @@ -870,10 +894,10 @@ while (*curdep) { struct rules *dep_is_derivable = get_target (curdep); Bool dep_exists = locate_object (curdep, ALL); - + if (!strcmp (curdep, lastcurdep)) goto next_dep; - + if (!dep_is_derivable && dep_exists && (strcmp (curdep, lastcurdep))) { free (lastcurdep); lastcurdep = check_strdup (curdep); @@ -926,13 +950,13 @@ } /* end while (*curdep) */ /* - * At this point all dependents of "targ" are either bound to + * At this point all dependents of "targ" are either bound to * an appropriate source version or have been derived. Now we * can see whether "targ" needs to be made. */ mark_all_done (current); - + if (err_happ) { drop_dependent_queue (deriv_key_deps); cl_variants (var_depth, variants_active); @@ -942,7 +966,7 @@ } if (locate_object (targ, ALL) && - try_recache (targ, make_derivation_key (current, deriv_key_deps), + try_recache (targ, make_derivation_key (current, deriv_key_deps), current, made_object_key)) { add_to_done_list (targ, &made_object_key->bk_key); drop_dependent_queue (deriv_key_deps); @@ -995,10 +1019,14 @@ else { fprintf (stderr, "shape -- WARNING: can't create files in `.'.\n"); } +#ifdef DOKO + fprintf(stderr, "touch_time: %lu\n", touch_time); + fflush(stderr); +#endif shape_command = FALSE; - + if (cmdtargets[0] == NIL) comm = firsttarget; else @@ -1017,7 +1045,7 @@ } else initial_selection = rbrule; - + if (!rebuildflg) { Bool build_success = TRUE; while (comm != NIL) { @@ -1034,13 +1062,13 @@ init_confid (comm); } - spin_success = try_to_make_target (comm, initial_selection, + spin_success = try_to_make_target (comm, initial_selection, TRUE, &produced_object); if (spin_success && !reallydone) printf("shape - `%s' is up to date\n", comm); else if (!spin_success) warning (2, comm); - + build_success = build_success && spin_success; if (confid) { @@ -1060,7 +1088,7 @@ depth = 0; build_success = try_to_make_target (rbtarg, initial_selection, TRUE, &produced_object); - + if (build_success && !reallydone && !rebuildflg) printf("shape - `%s' is up to date\n", rbtarg); else if (reallydone) --- shapetools-1.4pl6.orig/src/shape/shape.h +++ shapetools-1.4pl6/src/shape/shape.h @@ -302,6 +302,7 @@ extern Bool bpoolflg; extern Bool nobpoolflg; extern Bool forceflg; +extern Bool forceallflg; extern StOptDesc odesc[]; /* rule.c */ --- shapetools-1.4pl6.orig/src/shape/shapeopt.c +++ shapetools-1.4pl6/src/shape/shapeopt.c @@ -53,6 +53,7 @@ EXPORT Bool bpoolflg; EXPORT Bool nobpoolflg; EXPORT Bool forceflg; +EXPORT Bool forceallflg = 0; LOCAL int h_d_option(opt, arg) /*ARGSUSED*/ @@ -157,6 +158,15 @@ return (0); } +LOCAL int h_all_option(opt, arg) + /*ARGSUSED*/ + char *opt; + char *arg; +{ + forceflg=TRUE; + forceallflg=TRUE; + return(0); +} LOCAL int h_h_option(opt, arg) /*ARGSUSED*/ char *opt; @@ -412,6 +422,7 @@ { "e", PSWITCH, h_e_option, NULL, NULL }, { "f", PARG, h_f_option, NULL, NULL }, { "force", PARG, h_force_option, NULL, NULL }, + { "all", PSWITCH, h_all_option, NULL, NULL }, { "h", PSWITCH, h_h_option, NULL, NULL }, { "i", PSWITCH, h_i_option, NULL, NULL }, { "k", PSWITCH, h_k_option, NULL, NULL }, --- shapetools-1.4pl6.orig/src/shape/std.c +++ shapetools-1.4pl6/src/shape/std.c @@ -225,7 +225,6 @@ "+(vflags)", "\t@echo shape - executing: $(CC) -c $(CFLAGS) %.c;", "\t@$(CC) -c $(CFLAGS) %.c;", - "\t@rm %.i;", #else /* NOVGDB */ /* ".c.o", "\t$(CC) $(CFLAGS) $(vflags) -c $<", */ --- shapetools-1.4pl6.orig/src/sttk/Makefile +++ shapetools-1.4pl6/src/sttk/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[4.0] Fri Jul 30 16:00:00 1993 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -40,27 +41,30 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = /home/stone/shape -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -76,10 +80,13 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. -LIBTARGET = libsttk.a +LIBNAME = sttk +LIBTARGET = lib$(LIBNAME).a +SHLIBVERSION = 1.7 +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) # The release number generator. The version number of this file will # be used as release identifier for the whole system. @@ -90,11 +97,11 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # Aliases for (filesystem links to) $(TARGET). -ALIASES = +ALIASES = # The regular source and header files. @@ -107,9 +114,9 @@ # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Sources of variant source components stored under equal names in # different locations. During system builds, only one of each (equally @@ -125,11 +132,11 @@ MAN1 = MAN3 = sttkintro.3 stcall.3 stparseargs.3 stsignal.3 ststring.3 \ sttime.3 sttmpfiles.3 sttransaction.3 stuserio.3 -MAN4 = -MAN5 = -MAN6 = -MAN7 = -MAN8 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = # All source components of the system (should not be changed) @@ -141,6 +148,11 @@ LIBOBJECTS = strtab.o files.o kbdio.o mktime.o parseargs.o \ ststring.o sighand.o call.o $(VERSIONOBJECT) +SHLIBOBJECTS = $(LIBOBJECTS:.o=.pic_o) + +%.pic_o: %.c + $(CC) -c $(SHLIBCFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION) + # -------------------------------------------------------------------- # tools, flags, libraries etc. # -------------------------------------------------------------------- @@ -149,20 +161,34 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro -CC = cc +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBSONAME = lib$(LIBNAME).$(SHLIBSUFFIX).$(shell echo $(SHLIBVERSION) | cut -d . -f 1) +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = + +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = -LINTLIBS = +SYSLIBS = +STATICLOCALLIBS = $(LOCALLIBPATH)/$(LIBTARGET) +SHAREDLOCALLIBS = $(LOCALLIBPATH)/$(SHLIBTARGET) +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lsttk + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lsttk + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -174,14 +200,28 @@ # The final system building action. -targets: $(LIBTARGET) +targets: $(LIBTARGET) $(SHLIBTARGET) $(LIBTARGET): $(LIBOBJECTS) -ar ruv $(LIBTARGET) $(LIBOBJECTS) @-($(RANLIB) $(LIBTARGET)) 2> /dev/null; true +$(SHLIBTARGET): $(SHLIBOBJECTS) + $(SHLIBLD) $(LDFLAGS) -o $@ -Wl,-soname,$(SHLIBSONAME) $(SHLIBOBJECTS) -L ../atfs -lAtFS + @rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(SHLIBTARGET) to $$i; \ + ln $(SHLIBTARGET) $$i; \ + done + localinstalltargets: $(LOCALLIBPATH)/$(LIBTARGET) \ - $(LOCALINCLUDEPATH)/sttk.h + $(LOCALLIBPATH)/$(SHLIBTARGET) \ + $(LOCALINCLUDEPATH)/sttk.h $(LOCALLIBPATH)/$(LIBTARGET): $(LIBTARGET) @-echo "Copying $(LIBTARGET) to $(LOCALLIBPATH)"; \ @@ -194,6 +234,28 @@ chmod $(INSTALLLIBMODE) $(LOCALLIBPATH)/$(LIBTARGET); \ ($(RANLIB) $(LOCALLIBPATH)/$(LIBTARGET)) 2> /dev/null; true +$(LOCALLIBPATH)/$(SHLIBTARGET): $(SHLIBTARGET) + @-echo "Copying $(SHLIBTARGET) to $(LOCALLIBPATH)"; \ + if [ -f $(LOCALLIBPATH)/$(SHLIBTARGET) ] ;\ + then \ + mv -f $(LOCALLIBPATH)/$(SHLIBTARGET) \ + $(LOCALLIBPATH)/$(SHLIBTARGET).old;\ + fi; \ + cp $(SHLIBTARGET) $(LOCALLIBPATH)/$(SHLIBTARGET); \ + chmod $(INSTALLBINMODE) $(LOCALLIBPATH)/$(SHLIBTARGET); \ + ( cd $(LOCALLIBPATH); \ + rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + ); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(LOCALLIBPATH)/$$i; \ + echo "linking $(LOCALLIBPATH)/$(SHLIBTARGET) to $(LOCALLIBPATH)/$$i"; \ + ln $(LOCALLIBPATH)/$(SHLIBTARGET) $(LOCALLIBPATH)/$$i; \ + done + $(LOCALINCLUDEPATH)/sttk.h: sttk.h @-echo "Copying sttk.h to $(LOCALINCLUDEPATH)"; \ if [ -f $(LOCALINCLUDEPATH)/sttk.h ] && \ @@ -201,10 +263,11 @@ then \ chmod u+w $(LOCALINCLUDEPATH)/sttk.h; \ fi; \ - cp sttk.h $(LOCALINCLUDEPATH)/sttk.h; \ + sed -e s=@INSTALLBASE@=`dirname $(INSTALLLIBPATH)`= \ + < sttk.h > $(LOCALINCLUDEPATH)/sttk.h; \ chmod $(INSTALLINCMODE) $(LOCALINCLUDEPATH)/sttk.h -installtargets: $(INSTALLLIBPATH)/$(LIBTARGET) \ +installtargets: $(INSTALLLIBPATH)/$(LIBTARGET) $(INSTALLLIBPATH)/$(SHLIBTARGET) \ $(INSTALLINCPATH)/sttk.h $(INSTALLLIBPATH)/$(LIBTARGET): $(LIBTARGET) @@ -218,6 +281,28 @@ chmod $(INSTALLLIBMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ ($(RANLIB) $(INSTALLLIBPATH)/$(LIBTARGET)) 2> /dev/null; true +$(INSTALLLIBPATH)/$(SHLIBTARGET): $(SHLIBTARGET) + @-echo "Installing $(SHLIBTARGET) in $(INSTALLLIBPATH)"; \ + if [ -f $(INSTALLLIBPATH)/$(SHLIBTARGET) ] ;\ + then \ + mv -f $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLLIBPATH)/$(SHLIBTARGET).old;\ + fi; \ + cp $(SHLIBTARGET) $(INSTALLLIBPATH)/$(SHLIBTARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ + ( cd $(INSTALLLIBPATH); \ + rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + ); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLLIBPATH)/$$i; \ + echo "linking $(INSTALLLIBPATH)/$(SHLIBTARGET) to $(INSTALLLIBPATH)/$$i"; \ + ln $(INSTALLLIBPATH)/$(SHLIBTARGET) $(INSTALLLIBPATH)/$$i; \ + done + $(INSTALLINCPATH)/sttk.h: sttk.h @-echo "Installing sttk.h in $(INSTALLINCPATH)"; \ if [ -f $(INSTALLINCPATH)/sttk.h ] && \ @@ -225,7 +310,8 @@ then \ chmod u+w $(INSTALLINCPATH)/sttk.h; \ fi; \ - cp sttk.h $(INSTALLINCPATH)/sttk.h; \ + sed -e 's=@INSTALLBASE@=$(INSTALLBASE)=' \ + < sttk.h > $(INSTALLINCPATH)/sttk.h; \ chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/sttk.h installmanuals: $(MANUALS) @@ -245,42 +331,52 @@ # The cleanup action. Removes all automatically rederivable files. doclean: - rm -f $(LIBTARGET) $(ALIASES) $(LIBOBJECTS) + rm -f $(LIBTARGET) $(ALIASES) $(LIBOBJECTS) $(SHLIBOBJECTS) -# Do nothing +# Do notinstall libraries (but shared libraries) -noinstall: +noinstall: $(INSTALLLIBPATH)/$(SHLIBTARGET) @true # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -308,27 +404,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -337,27 +414,8 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + $(INHERITEDFLAGS) \ + install; \ fi +localinstall: @@ -366,27 +424,8 @@ else \ $(MAKE) ALLTARGETS="subsystems localinstalltargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(BASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" localinstall; \ + $(INHERITEDFLAGS) \ + localinstall; \ fi +clean: @@ -395,25 +434,6 @@ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(BASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi - --- shapetools-1.4pl6.orig/src/sttk/Makefile.in +++ shapetools-1.4pl6/src/sttk/Makefile.in @@ -0,0 +1,438 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for ShapeTools toolkit library (sttk) +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/sttk + +# A short name for this node system + +NODENAME = sttk + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +LIBNAME = sttk +LIBTARGET = lib$(LIBNAME).a +SHLIBVERSION = @STTKVERSION@ +SHLIBTARGET = @SHLIBTARGET@ + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = sttk_version.c # source +VERSIONOBJECT = sttk_version.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +SOURCES = strtab.c files.c kbdio.c mktime.c parseargs.c \ + ststring.c sighand.c call.c + +HEADERS = sttk.h + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = +MAN3 = sttkintro.3 stcall.3 stparseargs.3 stsignal.3 ststring.3 \ + sttime.3 sttmpfiles.3 sttransaction.3 stuserio.3 +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +LIBOBJECTS = strtab.o files.o kbdio.o mktime.o parseargs.o \ + ststring.o sighand.o call.o $(VERSIONOBJECT) + +SHLIBOBJECTS = $(LIBOBJECTS:.o=.pic_o) + +%.pic_o: %.c + $(CC) -c $(SHLIBCFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBSONAME = lib$(LIBNAME).$(SHLIBSUFFIX).$(shell echo $(SHLIBVERSION) | cut -d . -f 1) +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIBS = @SYSLIBS@ +STATICLOCALLIBS = $(LOCALLIBPATH)/$(LIBTARGET) +SHAREDLOCALLIBS = $(LOCALLIBPATH)/$(SHLIBTARGET) +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lsttk + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lsttk + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(LIBTARGET) $(SHLIBTARGET) + +$(LIBTARGET): $(LIBOBJECTS) + -ar ruv $(LIBTARGET) $(LIBOBJECTS) + @-($(RANLIB) $(LIBTARGET)) 2> /dev/null; true + +$(SHLIBTARGET): $(SHLIBOBJECTS) + $(SHLIBLD) $(LDFLAGS) -o $@ -Wl,-soname,$(SHLIBSONAME) $(SHLIBOBJECTS) -L ../atfs -lAtFS + @rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(SHLIBTARGET) to $$i; \ + ln $(SHLIBTARGET) $$i; \ + done + +localinstalltargets: $(LOCALLIBPATH)/$(LIBTARGET) \ + $(LOCALLIBPATH)/$(SHLIBTARGET) \ + $(LOCALINCLUDEPATH)/sttk.h + +$(LOCALLIBPATH)/$(LIBTARGET): $(LIBTARGET) + @-echo "Copying $(LIBTARGET) to $(LOCALLIBPATH)"; \ + if [ -f $(LOCALLIBPATH)/$(LIBTARGET) ] ;\ + then \ + mv -f $(LOCALLIBPATH)/$(LIBTARGET) \ + $(LOCALLIBPATH)/$(LIBTARGET).old;\ + fi; \ + cp $(LIBTARGET) $(LOCALLIBPATH)/$(LIBTARGET); \ + chmod $(INSTALLLIBMODE) $(LOCALLIBPATH)/$(LIBTARGET); \ + ($(RANLIB) $(LOCALLIBPATH)/$(LIBTARGET)) 2> /dev/null; true + +$(LOCALLIBPATH)/$(SHLIBTARGET): $(SHLIBTARGET) + @-echo "Copying $(SHLIBTARGET) to $(LOCALLIBPATH)"; \ + if [ -f $(LOCALLIBPATH)/$(SHLIBTARGET) ] ;\ + then \ + mv -f $(LOCALLIBPATH)/$(SHLIBTARGET) \ + $(LOCALLIBPATH)/$(SHLIBTARGET).old;\ + fi; \ + cp $(SHLIBTARGET) $(LOCALLIBPATH)/$(SHLIBTARGET); \ + chmod $(INSTALLBINMODE) $(LOCALLIBPATH)/$(SHLIBTARGET); \ + ( cd $(LOCALLIBPATH); \ + rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + ); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(LOCALLIBPATH)/$$i; \ + echo "linking $(LOCALLIBPATH)/$(SHLIBTARGET) to $(LOCALLIBPATH)/$$i"; \ + ln $(LOCALLIBPATH)/$(SHLIBTARGET) $(LOCALLIBPATH)/$$i; \ + done + +$(LOCALINCLUDEPATH)/sttk.h: sttk.h + @-echo "Copying sttk.h to $(LOCALINCLUDEPATH)"; \ + if [ -f $(LOCALINCLUDEPATH)/sttk.h ] && \ + [ ! -w $(LOCALINCLUDEPATH)/sttk.h ]; \ + then \ + chmod u+w $(LOCALINCLUDEPATH)/sttk.h; \ + fi; \ + sed -e s=@INSTALLBASE@=`dirname $(INSTALLLIBPATH)`= \ + < sttk.h > $(LOCALINCLUDEPATH)/sttk.h; \ + chmod $(INSTALLINCMODE) $(LOCALINCLUDEPATH)/sttk.h + +installtargets: $(INSTALLLIBPATH)/$(LIBTARGET) $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLINCPATH)/sttk.h + +$(INSTALLLIBPATH)/$(LIBTARGET): $(LIBTARGET) + @-echo "Installing $(LIBTARGET) in $(INSTALLLIBPATH)"; \ + if [ -f $(INSTALLLIBPATH)/$(LIBTARGET) ] ;\ + then \ + mv -f $(INSTALLLIBPATH)/$(LIBTARGET) \ + $(INSTALLLIBPATH)/$(LIBTARGET).old;\ + fi; \ + cp $(LIBTARGET) $(INSTALLLIBPATH)/$(LIBTARGET); \ + chmod $(INSTALLLIBMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ + ($(RANLIB) $(INSTALLLIBPATH)/$(LIBTARGET)) 2> /dev/null; true + +$(INSTALLLIBPATH)/$(SHLIBTARGET): $(SHLIBTARGET) + @-echo "Installing $(SHLIBTARGET) in $(INSTALLLIBPATH)"; \ + if [ -f $(INSTALLLIBPATH)/$(SHLIBTARGET) ] ;\ + then \ + mv -f $(INSTALLLIBPATH)/$(SHLIBTARGET) \ + $(INSTALLLIBPATH)/$(SHLIBTARGET).old;\ + fi; \ + cp $(SHLIBTARGET) $(INSTALLLIBPATH)/$(SHLIBTARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ + ( cd $(INSTALLLIBPATH); \ + rm -f lib$(LIBNAME).$(SHLIBSUFFIX) $(SHLIBSONAME); \ + ln -s $(SHLIBTARGET) $(SHLIBSONAME); \ + ln -s $(SHLIBSONAME) lib$(LIBNAME).$(SHLIBSUFFIX); \ + ); \ + _aliases="$(SHLIBALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLLIBPATH)/$$i; \ + echo "linking $(INSTALLLIBPATH)/$(SHLIBTARGET) to $(INSTALLLIBPATH)/$$i"; \ + ln $(INSTALLLIBPATH)/$(SHLIBTARGET) $(INSTALLLIBPATH)/$$i; \ + done + +$(INSTALLINCPATH)/sttk.h: sttk.h + @-echo "Installing sttk.h in $(INSTALLINCPATH)"; \ + if [ -f $(INSTALLINCPATH)/sttk.h ] && \ + [ ! -w $(INSTALLINCPATH)/sttk.h ]; \ + then \ + chmod u+w $(INSTALLINCPATH)/sttk.h; \ + fi; \ + sed -e 's=@INSTALLBASE@=$(INSTALLBASE)=' \ + < sttk.h > $(INSTALLINCPATH)/sttk.h; \ + chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/sttk.h + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(LIBTARGET) $(ALIASES) $(LIBOBJECTS) $(SHLIBOBJECTS) + +# Do notinstall libraries (but shared libraries) + +noinstall: $(INSTALLLIBPATH)/$(SHLIBTARGET) + @true + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +localinstall: +localinstall $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + $(INHERITEDFLAGS) \ + install; \ + fi + ++localinstall: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems localinstalltargets" \ + MAINTARGET=install \ + $(INHERITEDFLAGS) \ + localinstall; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/sttk/Makefile.org +++ shapetools-1.4pl6/src/sttk/Makefile.org @@ -0,0 +1,419 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for ShapeTools toolkit library (sttk) +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $Header: Makefile[4.0] Fri Jul 30 16:00:00 1993 andy@cs.tu-berlin.de frozen $ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = /home/stone/shape/development + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/sttk + +# A short name for this node system + +NODENAME = sttk + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = s_sunos_4 + +# The processor type. + +HOSTTYPE = sun4 + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBASE = /home/stone/shape +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib +INSTALLLIBMODE = 644 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +LIBTARGET = libsttk.a + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = sttk_version.c # source +VERSIONOBJECT = sttk_version.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +SOURCES = strtab.c files.c kbdio.c mktime.c parseargs.c \ + ststring.c sighand.c call.c + +HEADERS = sttk.h + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = +MAN3 = sttkintro.3 stcall.3 stparseargs.3 stsignal.3 ststring.3 \ + sttime.3 sttmpfiles.3 sttransaction.3 stuserio.3 +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +LIBOBJECTS = strtab.o files.o kbdio.o mktime.o parseargs.o \ + ststring.o sighand.o call.o $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -g +MAKELDFLAGS = -g + +CC = cc +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = /usr/bin/ranlib + +# System libraries, local libraries and lint libraries. + +SYSLIBS = +LOCALLIBS = +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(LIBTARGET) + +$(LIBTARGET): $(LIBOBJECTS) + -ar ruv $(LIBTARGET) $(LIBOBJECTS) + @-($(RANLIB) $(LIBTARGET)) 2> /dev/null; true + +localinstalltargets: $(LOCALLIBPATH)/$(LIBTARGET) \ + $(LOCALINCLUDEPATH)/sttk.h + +$(LOCALLIBPATH)/$(LIBTARGET): $(LIBTARGET) + @-echo "Copying $(LIBTARGET) to $(LOCALLIBPATH)"; \ + if [ -f $(LOCALLIBPATH)/$(LIBTARGET) ] ;\ + then \ + mv -f $(LOCALLIBPATH)/$(LIBTARGET) \ + $(LOCALLIBPATH)/$(LIBTARGET).old;\ + fi; \ + cp $(LIBTARGET) $(LOCALLIBPATH)/$(LIBTARGET); \ + chmod $(INSTALLLIBMODE) $(LOCALLIBPATH)/$(LIBTARGET); \ + ($(RANLIB) $(LOCALLIBPATH)/$(LIBTARGET)) 2> /dev/null; true + +$(LOCALINCLUDEPATH)/sttk.h: sttk.h + @-echo "Copying sttk.h to $(LOCALINCLUDEPATH)"; \ + if [ -f $(LOCALINCLUDEPATH)/sttk.h ] && \ + [ ! -w $(LOCALINCLUDEPATH)/sttk.h ]; \ + then \ + chmod u+w $(LOCALINCLUDEPATH)/sttk.h; \ + fi; \ + cp sttk.h $(LOCALINCLUDEPATH)/sttk.h; \ + chmod $(INSTALLINCMODE) $(LOCALINCLUDEPATH)/sttk.h + +installtargets: $(INSTALLLIBPATH)/$(LIBTARGET) \ + $(INSTALLINCPATH)/sttk.h + +$(INSTALLLIBPATH)/$(LIBTARGET): $(LIBTARGET) + @-echo "Installing $(LIBTARGET) in $(INSTALLLIBPATH)"; \ + if [ -f $(INSTALLLIBPATH)/$(LIBTARGET) ] ;\ + then \ + mv -f $(INSTALLLIBPATH)/$(LIBTARGET) \ + $(INSTALLLIBPATH)/$(LIBTARGET).old;\ + fi; \ + cp $(LIBTARGET) $(INSTALLLIBPATH)/$(LIBTARGET); \ + chmod $(INSTALLLIBMODE) $(INSTALLLIBPATH)/$(LIBTARGET); \ + ($(RANLIB) $(INSTALLLIBPATH)/$(LIBTARGET)) 2> /dev/null; true + +$(INSTALLINCPATH)/sttk.h: sttk.h + @-echo "Installing sttk.h in $(INSTALLINCPATH)"; \ + if [ -f $(INSTALLINCPATH)/sttk.h ] && \ + [ ! -w $(INSTALLINCPATH)/sttk.h ]; \ + then \ + chmod u+w $(INSTALLINCPATH)/sttk.h; \ + fi; \ + cp sttk.h $(INSTALLINCPATH)/sttk.h; \ + chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/sttk.h + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(LIBTARGET) $(ALIASES) $(LIBOBJECTS) + +# Do nothing + +noinstall: + @true + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +localinstall: +localinstall $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" install; \ + fi + ++localinstall: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems localinstalltargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(BASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" localinstall; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(BASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" clean; \ + fi + --- shapetools-1.4pl6.orig/src/sttk/call.c +++ shapetools-1.4pl6/src/sttk/call.c @@ -21,9 +21,10 @@ * $Header: call.c[4.0] Thu Jun 24 17:43:24 1993 andy@cs.tu-berlin.de frozen $ */ +#include #include -#include "config.h" +#include "afconfig.h" #include "sttk.h" LOCAL int doCall (progName, argv) --- shapetools-1.4pl6.orig/src/sttk/files.c +++ shapetools-1.4pl6/src/sttk/files.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -21,7 +21,7 @@ * $Header: files.c[4.0] Thu Jun 24 17:43:14 1993 andy@cs.tu-berlin.de frozen $ */ -#include "config.h" +#include "afconfig.h" #include "sttk.h" /*=========================== @@ -66,7 +66,7 @@ if (!path || !*path) path = "/tmp"; - sprintf (tmpName, "%s/sttk%d%d", path, getpid(), tmpCount++); + sprintf (tmpName, "%s/sttk%d%d", path, (int) getpid(), tmpCount++); unlink (tmpName); stRegisterFile (tmpName); return (tmpName); --- shapetools-1.4pl6.orig/src/sttk/kbdio.c +++ shapetools-1.4pl6/src/sttk/kbdio.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -21,7 +21,7 @@ * $Header: kbdio.c[4.0] Thu Jun 24 17:43:16 1993 andy@cs.tu-berlin.de frozen $ */ -#include "config.h" +#include "afconfig.h" #include "sttk.h" #define INITIAL_BUFFER_SIZE 2048 /* for stGetFromStdin() */ @@ -72,7 +72,7 @@ * single charcter "termChar" at the beginning of a new line. * If term_char is -1 text is terminated by ^D. */ - + char *text ; /* pointer to text buffer */ char *tmp ; /* temporary pointer to text buffer */ int tindex ; /* index into text[] (last char read) */ @@ -85,7 +85,7 @@ if (isatty(fileno(stdin))) { char eofMsg[30] ; - + prompt = "> " ; if (termChar == -1) { eofMsg[0] = '\0' ; @@ -112,7 +112,7 @@ tindex > 0 && text[tindex - 1] == termChar && (tindex == 1 || text[tindex - 2] == '\n')) { - + /* termChar is only char on line, so stop reading */ tindex-- ; /* remove termChar from text */ break ; @@ -140,7 +140,7 @@ } clearerr(stdin) ; /* make further reads from stdin possible */ - if (c == EOF & prompt != NULL) { + if (c == EOF && prompt != NULL) { fputc ('\n', stdout) ; } @@ -160,7 +160,7 @@ * stAskConfirm *===================*/ -#define minimum(x,y) (((x) <= (y)) ? (x) : (y)) +#define minimum(x,y) (((x) <= (y)) ? (x) : (y)) #ifdef SIGCONT LOCAL jmp_buf stHere; @@ -195,8 +195,8 @@ stLog (stMessage, ST_LOG_MSG | ST_LOG_NONL); strbuf[0] = '\0'; answer[0] = '\0'; - gets (strbuf); -#ifdef SIGCONT + fgets (strbuf, ST_MSGLEN, stdin); +#ifdef SIGCONT signal (SIGCONT, SIG_DFL); #endif sscanf (strbuf, "%s", answer); --- shapetools-1.4pl6.orig/src/sttk/mktime.c +++ shapetools-1.4pl6/src/sttk/mktime.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -23,10 +23,10 @@ #include -#include "config.h" +#include "afconfig.h" #include "sttk.h" -/* all patterns are followed by an optional close +/* all patterns are followed by an optional close bracket ([]]*) to make atScanBindinhg happy !! */ /* Mon Nov 2[,] 92 */ @@ -114,14 +114,14 @@ static char *mon_tab[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", - "Sep", "Oct", "Nov", "Dec", (char *)0 + "Sep", "Oct", "Nov", "Dec", (char *)0 }; LOCAL int scanMonth(monthStr) char *monthStr; { /* converts "Jan", "Feb" etc. to 0, 1 etc. */ - register int i; + register int i; for (i = 0; mon_tab[i]; i++) { if (!strncmp (mon_tab[i], monthStr, strlen (mon_tab[i]))) @@ -264,17 +264,14 @@ strcpy (dateBuf, timeStr); i = 0; - if (re_comp (date_fmts[0].pat)) { - return (0); - } while (date_fmts[i].pat) { + if (re_comp (date_fmts[i].pat)) { + return (0); + } if (re_exec (dateBuf)) { return (str2tval (dateBuf, i+1, hours, mins, secs)); } i++; - if (re_comp (date_fmts[i].pat)) { - return (0); - } } return (0); } --- shapetools-1.4pl6.orig/src/sttk/parseargs.c +++ shapetools-1.4pl6/src/sttk/parseargs.c @@ -20,7 +20,7 @@ * $Header: parseargs.c[4.0] Thu Jun 24 17:43:19 1993 andy@cs.tu-berlin.de frozen $ */ -#include "config.h" +#include "afconfig.h" #include "sttk.h" #define MINUS_CHAR_REQUIRED 1 --- shapetools-1.4pl6.orig/src/sttk/strtab.c +++ shapetools-1.4pl6/src/sttk/strtab.c @@ -20,7 +20,7 @@ * $Header: strtab.c[4.0] Thu Jun 24 17:43:13 1993 andy@cs.tu-berlin.de frozen $ */ -#include "config.h" +#include "afconfig.h" #include "sttk.h" /*===================================== --- shapetools-1.4pl6.orig/src/sttk/ststring.c +++ shapetools-1.4pl6/src/sttk/ststring.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -22,7 +22,7 @@ */ #include -#include "config.h" +#include "afconfig.h" #include "sttk.h" /*================================= @@ -33,7 +33,7 @@ char *pattern; /* converts "sh" pattern to "ed" pattern */ { - static char resultPattern[NAME_MAX+1]; + static char resultPattern[PATH_MAX+1]; char *patPtr = pattern, *resPtr = resultPattern; if (!pattern || !(*pattern)) @@ -75,8 +75,8 @@ char *subject, *oldStr, *newStr; { /* * replace all occurrences of substring "oldStr" in "subject" by - * string "newStr". Return a pointer to a statically allocated - * string that is the result of this operation. Return NULL + * string "newStr". Return a pointer to a dynamically allocated + * string that is the result of this operation. Return NULL * if anything goes seriously wrong. */ @@ -85,15 +85,19 @@ register char *p, *s; register int j; - if (subject == NULL) - return ""; + if (subject == NULL) { + if ((result = (char *) malloc(1)) == NULL) + return (char *) NULL;; + *result = '\0'; + return result; + } else subject_len = strlen (subject); old_len = oldStr ? strlen (oldStr) : 0; new_len = newStr ? strlen (newStr) : 0; - + if ((result = (char *)malloc (subject_len + 1)) == (char *)NULL) return (char *)NULL; @@ -143,7 +147,7 @@ * work through the string immediately following that token. In * this way subsequent calls will work through the string until no * tokens remain. When no token remains in str, a NULL pointer is - * returned. + * returned. */ static int buf_is_initialized, bufsiz; static char *buf, *thistoken = NULL, *nexttoken = NULL; @@ -155,13 +159,13 @@ if (buf_is_initialized) { if (bufsiz < strsiz+1) { buf = realloc (buf, strsiz+1); - if (!buf) + if (!buf) return (char *)NULL; } } else { buf = malloc (strsiz+1); - if (!buf) + if (!buf) return (char *)NULL; } (void) strcpy (buf, str); --- shapetools-1.4pl6.orig/src/sttk/sttk.h +++ shapetools-1.4pl6/src/sttk/sttk.h @@ -52,7 +52,7 @@ *==============*/ #define ST_ENV "SHAPETOOLS" /* ShapeTools shell environment variable */ -#define ST_ENV_DEFAULT "/usr/local" +#define ST_ENV_DEFAULT "@INSTALLBASE@" #define ST_ENV_INCLUDE "/include" #define ST_ENV_LIB "/lib" #define ST_ENV_SHAPELIB "/lib/shape" --- shapetools-1.4pl6.orig/src/vc/Makefile +++ shapetools-1.4pl6/src/vc/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[5.0] Fri Jul 30 17:56:22 1993 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -40,27 +41,30 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = /usr/local -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -76,7 +80,7 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. TARGET = @@ -94,21 +98,21 @@ # Aliases for (filesystem links to) $(TARGET). -ALIASES = +ALIASES = # The regular source and header files. SOURCES = -HEADERS = +HEADERS = # Auxiliary source and header files that are not genuine part of the # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Sources of variant source components stored under equal names in # different locations. During system builds, only one of each (equally @@ -121,13 +125,13 @@ # The manuals MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) -MAN1 = -MAN3 = -MAN4 = -MAN5 = -MAN6 = -MAN7 = -MAN8 = +MAN1 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = # All source components of the system (should not be changed) @@ -146,20 +150,30 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro + +SHLIBSUFFIX = so +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = -CC = cc +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = -LINTLIBS = +SYSLIB = +STATICLOCALLIBS = +SHAREDLOCALLIBS = +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = # -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) + +INSTALLLDFLAGS = # -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -213,33 +227,43 @@ # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -265,27 +289,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -294,27 +299,8 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + $(INHERITEDFLAGS) \ + install; \ fi +clean: @@ -322,25 +308,6 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi --- shapetools-1.4pl6.orig/src/vc/Makefile.in +++ shapetools-1.4pl6/src/vc/Makefile.in @@ -0,0 +1,312 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for vc +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc + +# A short name for this node system + +NODENAME = shape_VC + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = shape_VC # source +VERSIONOBJECT = # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = atfsit rcs2atfs retrv save scripts vadm vfind vl + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +SOURCES = + +HEADERS = + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIB = @SYSLIBS@ +STATICLOCALLIBS = +SHAREDLOCALLIBS = +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = # -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) + +INSTALLLDFLAGS = # -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + @-rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + $(INHERITEDFLAGS) \ + install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/Makefile.org +++ shapetools-1.4pl6/src/vc/Makefile.org @@ -0,0 +1,346 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for vc +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $Header: Makefile[5.0] Fri Jul 30 17:56:22 1993 andy@cs.tu-berlin.de frozen $ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = /home/stone/shape/development + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc + +# A short name for this node system + +NODENAME = shape_VC + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = s_sunos_4 + +# The processor type. + +HOSTTYPE = sun4 + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBASE = /usr/local +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 644 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = shape_VC # source +VERSIONOBJECT = # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = atfsit rcs2atfs retrv save scripts vadm vfind vl + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +SOURCES = + +HEADERS = + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -g +MAKELDFLAGS = -g + +CC = cc +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = /usr/bin/ranlib + +# System libraries, local libraries and lint libraries. + +SYSLIBS = +LOCALLIBS = +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + @-rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + -if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/atfsit/Makefile +++ shapetools-1.4pl6/src/vc/atfsit/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[4.0] Fri Jul 30 17:39:32 1993 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -40,27 +41,30 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = $(BASE) -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -76,7 +80,7 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. TARGET = atfsit @@ -90,25 +94,25 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # Aliases for (filesystem links to) $(TARGET). -ALIASES = +ALIASES = # The regular source and header files. -SOURCES = atfsit.c +SOURCES = atfsit.c -HEADERS = +HEADERS = # Auxiliary source and header files that are not genuine part of the # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Sources of variant source components stored under equal names in # different locations. During system builds, only one of each (equally @@ -122,12 +126,12 @@ MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) MAN1 = atfsit.1 -MAN3 = -MAN4 = -MAN5 = -MAN6 = -MAN7 = -MAN8 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = # All source components of the system (should not be changed) @@ -146,20 +150,33 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro -CC = cc +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = + +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = -LINTLIBS = +SYSLIB = +STATICLOCALLIBS = +SHAREDLOCALLIBS = +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = # -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) + +INSTALLLDFLAGS = # -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -170,11 +187,11 @@ all: +all $(ALLTARGETS) # The final system building action. - + targets: $(TARGET) $(TARGET): $(LOCALLIBS) $(OBJECTS) - $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(SYSLIBS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) @_aliases="$(ALIASES)"; \ for i in $$_aliases; \ do \ @@ -192,7 +209,8 @@ then \ chmod u+w $(INSTALLBINPATH)/$(TARGET); \ fi; \ - cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) \ + $(OBJECTS) $(INSTALLLDFLAGS) $(SYSLIBS); \ chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ _aliases="$(ALIASES)"; \ for i in $$_aliases; \ @@ -223,32 +241,43 @@ # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -274,26 +303,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -302,26 +313,7 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + install; \ fi +clean: @@ -329,24 +321,6 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi --- shapetools-1.4pl6.orig/src/vc/atfsit/Makefile.in +++ shapetools-1.4pl6/src/vc/atfsit/Makefile.in @@ -0,0 +1,325 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for atfsit +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/atfsit + +# A short name for this node system + +NODENAME = atfsit + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = atfsit + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = atfsitvers.c # source +VERSIONOBJECT = atfsitvers.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +SOURCES = atfsit.c + +HEADERS = + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = atfsit.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = atfsit.o $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIB = @SYSLIBS@ +STATICLOCALLIBS = +SHAREDLOCALLIBS = +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = # -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) + +INSTALLLDFLAGS = # -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) \ + $(OBJECTS) $(INSTALLLDFLAGS) $(SYSLIBS); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/atfsit/atfsit.c +++ shapetools-1.4pl6/src/vc/atfsit/atfsit.c @@ -16,7 +16,7 @@ */ #include -#include "config.h" +#include "afconfig.h" char *atfsit_version(); @@ -36,7 +36,7 @@ /* * Messages to be printed for the user. */ -static char *msg_name; +static char *msg_name; static char *m_stdc = "Standard C", *m_stdcflg = "Standard C with compile flags", *m_include = "C Include", @@ -55,27 +55,27 @@ */ static char *header; #ifdef RCSIT -static char *h_stdc = +static char *h_stdc = "#ifndef lint\nstatic char *RCSid = \"$%s$\";\n#endif\n/*\n * $%s$\n */\n\n"; -static char *h_stdcflg = +static char *h_stdcflg = "#ifndef lint\nstatic char *RCSid = \"$%s$\";\n#ifdef CFFLGS\n\ static char *ConfFlg = CFFLGS;\n\t/* should be defined from within\ Makefile */\n#endif\n#endif\n/*\n * $%s$\n */\n\n"; #else -static char *h_stdc = +static char *h_stdc = "#ifndef lint\nstatic char *AtFSid = \"$%s$\";\n#endif\n/*\n * $%s$\n */\n\n"; -static char *h_stdcflg = +static char *h_stdcflg = "#ifndef lint\nstatic char *AtFSid = \"$%s$\";\n#ifdef CFFLGS\n\ static char *ConfFlg = CFFLGS;\n\t/* should be defined from within\ Makefile */\n#endif\n#endif\n/*\n * $%s$\n */\n\n"; #endif -static char *h_include = +static char *h_include = "/*\n * $%s$\n *\n * $%s$\n */\n\n"; static char *h_make = "#\n# $%s$\n#\n# $%s$\n#\n"; static char *h_shape = "#\n# $%s$\n#\n# $%s$\n#\n"; -static char *h_elisp = +static char *h_elisp = ";;\n;; $%s$\n;; $%s$\n;;\n"; static char *h_manual = "...\n... $%s$\n... \n... $%s$\n...\n"; @@ -123,7 +123,7 @@ /* * debug - print (useless) debugging info. */ - + static void debug(msg) char *msg; { @@ -178,10 +178,10 @@ /* * set_flags - set & check flags */ - + static void set_flags() { - if(cflag || eflag || hflag || mflag || Mflag || sflag || Sflag + if(cflag || eflag || hflag || mflag || Mflag || sflag || Sflag || fflag) { if(cflag) { msg_name = m_stdc; @@ -238,7 +238,7 @@ (suffix = strrchr(file, '.')) ? suffix++ : (suffix = ""); /* fixed by jmp@inesc */ - if((strcmp(file, "makefile") == 0) || + if((strcmp(file, "makefile") == 0) || (strcmp(file, "Makefile") == 0) || (strcmp(file, "shapefile") == 0) || (strcmp(file, "Shapefile") == 0) || @@ -434,7 +434,7 @@ if(strcmp(flags, "") == 0) sprintf(buf, "%s %s %s", vcprog, qflag ? "-q" : "", file); else - sprintf(buf, "%s -%s %s %s", vcprog, flags, + sprintf(buf, "%s -%s %s %s", vcprog, flags, qflag ? "-q" : "", file); sprintf(tmp,"Running ``%s''...\n", buf); debug(tmp); @@ -458,7 +458,7 @@ if(access(atfsit ? "AtFS" : "RCS", 0) != 0){ if(!qflag || debugon) printf("Cannot find \"%s\" directory. Creating...\n", atfsit ? "AtFS" : "RCS"); - if(strcmp(rcsdir, atfsit ? "AtFS" : "RCS") != 0) { + if(strcmp(rcsdir, atfsit ? "AtFS" : "RCS") != 0) { if(symlink(rcsdir, atfsit ? "AtFS" : "RCS") != 0) fatal2("Symbolic link of %s to %s failed.", rcsdir, atfsit ? "AtFS" : "RCS"); } else { @@ -536,10 +536,10 @@ hflag = TRUE; break; case 's': - sflag = TRUE; + sflag = TRUE; break; case 'S': - Sflag = TRUE; + Sflag = TRUE; break; case 'm': mflag = TRUE; @@ -604,7 +604,7 @@ /* * make tmp file once. */ - sprintf (tmpfile, "/tmp/%s%d", progname, getpid()); + sprintf (tmpfile, "/tmp/%s%d", progname, (int) getpid()); while (--argc) { /* Main loop */ file = *++argv; @@ -696,7 +696,7 @@ * kludge part 2 - if the user tried a ci * with a -l option, then the header is * messed up in the currently checked out - * man file. So we have to co the file to + * man file. So we have to co the file to * clean up the header. Plus we use the * -l option of co to insure file locking. */ --- shapetools-1.4pl6.orig/src/vc/rcs2atfs/Makefile +++ shapetools-1.4pl6/src/vc/rcs2atfs/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[3.0] Fri Jul 30 17:44:17 1993 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -40,27 +41,30 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = $(BASE) -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -76,7 +80,7 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. TARGET1 = rcs2atfs @@ -93,16 +97,16 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # Aliases for (filesystem links to) $(TARGET). -ALIASES = +ALIASES = # The regular source and header files. RSOURCES = afind.c main.c out.c readin.c utils.c -USOURCES = utime.c +USOURCES = utime.c SOURCES = $(RSOURCES) $(USOURCES) HEADERS = functions.h rcs2atfs.h @@ -111,9 +115,9 @@ # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Sources of variant source components stored under equal names in # different locations. During system builds, only one of each (equally @@ -127,12 +131,12 @@ MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) MAN1 = rcs2atfs.1 utime.1 -MAN3 = -MAN4 = -MAN5 = -MAN6 = -MAN7 = -MAN8 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = # All source components of the system (should not be changed) @@ -154,20 +158,30 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro + +SHLIBSUFFIX = so +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = -CC = cc +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a -LINTLIBS = +SYSLIB = +STATICLOCALLIBS = $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(LOCALLIBPATH)/libsttk.so $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lsttk -lAtFS + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -192,7 +206,7 @@ targets: $(TARGET1) $(TARGET2) $(TARGET1): $(LOCALLIBS) $(OBJECTS1) - $(CC) $(LDFLAGS) -o $(TARGET1) $(OBJECTS1) $(LOCALLIBS) $(SYSLIBS) + $(CC) $(LDFLAGS) -o $(TARGET1) $(OBJECTS1) $(LOCALLDFLAGS) $(SYSLIBS) @_aliases="$(ALIASES)"; \ for i in $$_aliases; \ do \ @@ -202,7 +216,7 @@ done $(TARGET2): $(LOCALLIBS) $(OBJECTS2) - $(CC) $(LDFLAGS) -o $(TARGET2) $(OBJECTS2) $(LOCALLIBS) $(SYSLIBS) + $(CC) $(LDFLAGS) -o $(TARGET2) $(OBJECTS2) $(LOCALLDFLAGS) $(SYSLIBS) @_aliases="$(ALIASES)"; \ for i in $$_aliases; \ do \ @@ -225,7 +239,8 @@ then \ chmod u+w $(INSTALLBINPATH)/$(TARGET1); \ fi; \ - cp $(TARGET1) $(INSTALLBINPATH)/$(TARGET1); \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET1) \ + $(OBJECTS1) $(INSTALLLDFLAGS) $(SYSLIBS); \ chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET1); \ _aliases="$(ALIASES)"; \ for i in $$_aliases; \ @@ -242,7 +257,8 @@ then \ chmod u+w $(INSTALLBINPATH)/$(TARGET2); \ fi; \ - cp $(TARGET2) $(INSTALLBINPATH)/$(TARGET2); \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET2) \ + $(OBJECTS2) $(INSTALLLDFLAGS) $(SYSLIBS); \ chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET2); \ _aliases="$(ALIASES)"; \ for i in $$_aliases; \ @@ -287,32 +303,43 @@ # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -338,26 +365,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -366,26 +375,7 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + install; \ fi +clean: @@ -393,24 +383,6 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi --- shapetools-1.4pl6.orig/src/vc/rcs2atfs/Makefile.in +++ shapetools-1.4pl6/src/vc/rcs2atfs/Makefile.in @@ -0,0 +1,387 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for rcs2atfs +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/rcs2atfs + +# A short name for this node system + +NODENAME = rcs2atfs + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET1 = rcs2atfs +TARGET2 = utime + +TARGET = $(TARGET1) $(TARGET2) + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = version.c +VERSIONOBJECT = version.o + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +RSOURCES = afind.c main.c out.c readin.c utils.c +USOURCES = utime.c +SOURCES = $(RSOURCES) $(USOURCES) + +HEADERS = functions.h rcs2atfs.h + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = rcs2atfs.1 utime.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS1 = afind.o main.o out.o readin.o utils.o $(VERSIONOBJECT) +OBJECTS2 = utime.o + +OBJECTS = $(OBJECTS1) $(OBJECTS2) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIB = @SYSLIBS@ +STATICLOCALLIBS = $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(LOCALLIBPATH)/libsttk.so $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lsttk -lAtFS + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +funcs: $(RSOURCES) rcs2atfs.h $(VERSIONFILE) + touch functions.h + cextract -I$(INCLUDEPATH) +scm -E -o new_functions.h $(RSOURCES) \ + $(VERSIONFILE) + mv new_functions.h functions.h + +tags: $(SOURCES) $(HEADERS) $(VERSIONFILE) + etags $(SOURCES) $(HEADERS) $(VERSIONFILE) \ + $(PARTIALRELEASEBASE)/src/atfs/*.c $(PARTIALRELEASEBASE)/src/atfstk/*.c + +# The final system building action. + +targets: $(TARGET1) $(TARGET2) + +$(TARGET1): $(LOCALLIBS) $(OBJECTS1) + $(CC) $(LDFLAGS) -o $(TARGET1) $(OBJECTS1) $(LOCALLDFLAGS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET1) to $$i; \ + ln $(TARGET1) $$i; \ + done + +$(TARGET2): $(LOCALLIBS) $(OBJECTS2) + $(CC) $(LDFLAGS) -o $(TARGET2) $(OBJECTS2) $(LOCALLDFLAGS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET2) to $$i; \ + ln $(TARGET2) $$i; \ + done + +# Construction of a library would look like: +#$(TARGET): $(OBJECTS) +# @ar ruv $(TARGET) $(OBJECTS); \ +# ($(RANLIB) $(TARGET)) 2> /dev/null + +installtargets: $(INSTALLBINPATH)/$(TARGET1) $(INSTALLBINPATH)/$(TARGET2) + +$(INSTALLBINPATH)/$(TARGET1): $(TARGET1) + @-echo "installing $(TARGET1) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET1) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET1) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET1); \ + fi; \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET1) \ + $(OBJECTS1) $(INSTALLLDFLAGS) $(SYSLIBS); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET1); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET1) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET1) $(INSTALLBINPATH)/$$i; \ + done + +$(INSTALLBINPATH)/$(TARGET2): $(TARGET2) + @-echo "installing $(TARGET2) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET2) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET2) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET2); \ + fi; \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET2) \ + $(OBJECTS2) $(INSTALLLDFLAGS) $(SYSLIBS); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET2); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET2) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET2) $(INSTALLBINPATH)/$$i; \ + done + +# Installing a library +#installtargets: $(INSTALLLIBPATH)/$(TARGET) installincludes +# +#$(INSTALLLIBPATH)/$(TARGET): $(TARGET) +# @-echo "installing $(TARGET) in $(INSTALLLIBPATH)"; \ +# if [ -f $(INSTALLLIBPATH)/$(TARGET) ] ;\ +# then \ +# mv -f $(INSTALLLIBPATH)/$(TARGET) \ +# $(INSTALLLIBPATH)/$(TARGET).old;\ +# fi; \ +# cp $(TARGET) $(INSTALLLIBPATH)/$(TARGET); \ +# chmod $(INSTALLLIBMODE) $(INSTALLLIBPATH)/$(TARGET); \ +# ($(RANLIB) $(INSTALLLIBPATH)/$(TARGET)) 2> /dev/null + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/rcs2atfs/Makefile.org +++ shapetools-1.4pl6/src/vc/rcs2atfs/Makefile.org @@ -0,0 +1,416 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for rcs2atfs +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $Header: Makefile[3.0] Fri Jul 30 17:44:17 1993 andy@cs.tu-berlin.de frozen $ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = /home/stone/shape/development + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/rcs2atfs + +# A short name for this node system + +NODENAME = rcs2atfs + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = s_sunos_4 + +# The processor type. + +HOSTTYPE = sun4 + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBASE = $(BASE) +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 644 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET1 = rcs2atfs +TARGET2 = utime + +TARGET = $(TARGET1) $(TARGET2) + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = version.c +VERSIONOBJECT = version.o + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +RSOURCES = afind.c main.c out.c readin.c utils.c +USOURCES = utime.c +SOURCES = $(RSOURCES) $(USOURCES) + +HEADERS = functions.h rcs2atfs.h + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = rcs2atfs.1 utime.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS1 = afind.o main.o out.o readin.o utils.o $(VERSIONOBJECT) +OBJECTS2 = utime.o + +OBJECTS = $(OBJECTS1) $(OBJECTS2) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -g +MAKELDFLAGS = -g + +CC = cc +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = /usr/bin/ranlib + +# System libraries, local libraries and lint libraries. + +SYSLIBS = +LOCALLIBS = $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +funcs: $(RSOURCES) rcs2atfs.h $(VERSIONFILE) + touch functions.h + cextract -I$(INCLUDEPATH) +scm -E -o new_functions.h $(RSOURCES) \ + $(VERSIONFILE) + mv new_functions.h functions.h + +tags: $(SOURCES) $(HEADERS) $(VERSIONFILE) + etags $(SOURCES) $(HEADERS) $(VERSIONFILE) \ + $(PARTIALRELEASEBASE)/src/atfs/*.c $(PARTIALRELEASEBASE)/src/atfstk/*.c + +# The final system building action. + +targets: $(TARGET1) $(TARGET2) + +$(TARGET1): $(LOCALLIBS) $(OBJECTS1) + $(CC) $(LDFLAGS) -o $(TARGET1) $(OBJECTS1) $(LOCALLIBS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET1) to $$i; \ + ln $(TARGET1) $$i; \ + done + +$(TARGET2): $(LOCALLIBS) $(OBJECTS2) + $(CC) $(LDFLAGS) -o $(TARGET2) $(OBJECTS2) $(LOCALLIBS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET2) to $$i; \ + ln $(TARGET2) $$i; \ + done + +# Construction of a library would look like: +#$(TARGET): $(OBJECTS) +# @ar ruv $(TARGET) $(OBJECTS); \ +# ($(RANLIB) $(TARGET)) 2> /dev/null + +installtargets: $(INSTALLBINPATH)/$(TARGET1) $(INSTALLBINPATH)/$(TARGET2) + +$(INSTALLBINPATH)/$(TARGET1): $(TARGET1) + @-echo "installing $(TARGET1) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET1) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET1) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET1); \ + fi; \ + cp $(TARGET1) $(INSTALLBINPATH)/$(TARGET1); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET1); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET1) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET1) $(INSTALLBINPATH)/$$i; \ + done + +$(INSTALLBINPATH)/$(TARGET2): $(TARGET2) + @-echo "installing $(TARGET2) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET2) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET2) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET2); \ + fi; \ + cp $(TARGET2) $(INSTALLBINPATH)/$(TARGET2); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET2); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET2) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET2) $(INSTALLBINPATH)/$$i; \ + done + +# Installing a library +#installtargets: $(INSTALLLIBPATH)/$(TARGET) installincludes +# +#$(INSTALLLIBPATH)/$(TARGET): $(TARGET) +# @-echo "installing $(TARGET) in $(INSTALLLIBPATH)"; \ +# if [ -f $(INSTALLLIBPATH)/$(TARGET) ] ;\ +# then \ +# mv -f $(INSTALLLIBPATH)/$(TARGET) \ +# $(INSTALLLIBPATH)/$(TARGET).old;\ +# fi; \ +# cp $(TARGET) $(INSTALLLIBPATH)/$(TARGET); \ +# chmod $(INSTALLLIBMODE) $(INSTALLLIBPATH)/$(TARGET); \ +# ($(RANLIB) $(INSTALLLIBPATH)/$(TARGET)) 2> /dev/null + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/rcs2atfs/functions.h +++ shapetools-1.4pl6/src/vc/rcs2atfs/functions.h @@ -100,10 +100,12 @@ /* duplicate string with check */ char *check_strdup ( char *s ); +#if 0 /* like strdup, but only n characters * the resulting string is null padded, freeable */ char *strndup ( char *s, int n ); +#endif /* return a string concatenated from s1, s2, and s3. * The returned string is freeable. @@ -144,7 +146,7 @@ /* and now the opposite: return the last component of pathname. * returned string is free(3)able. */ -char *basename ( char *pathname ); +char *vc_basename ( char *pathname ); /* return type of file: directory, normal file, RCS file, * RCS directory, error (not stat()able) @@ -296,7 +298,7 @@ /* and now the opposite: return the last component of pathname. * returned string is free(3)able. */ -char *basename (/* char *pathname */); +char *vc_basename (/* char *pathname */); /* return type of file: directory, normal file, RCS file, * RCS directory, error (not stat()able) --- shapetools-1.4pl6.orig/src/vc/rcs2atfs/rcs2atfs.h +++ shapetools-1.4pl6/src/vc/rcs2atfs/rcs2atfs.h @@ -21,6 +21,7 @@ */ #include +#include #include #include "atfs.h" /* includes config.h */ @@ -179,6 +180,8 @@ extern bool recursive ; /* recursively descend directories */ extern int errno ; /* I want to handle ... */ +#if 0 extern char *sys_errlist[] ; /* ... these strings by myself */ +#endif /*EOF*/ --- shapetools-1.4pl6.orig/src/vc/rcs2atfs/readin.c +++ shapetools-1.4pl6/src/vc/rcs2atfs/readin.c @@ -99,7 +99,7 @@ * That's better than sometimes and sometimes not and I * don't know when. */ - rcsfile->working_file = basename(wfile) ; + rcsfile->working_file = vc_basename(wfile) ; free(wfile) ; } else if (!strncmp(input_line, K_comlead, strlen(K_comlead))) { char *tmp = check_strdup(input_line + strlen(K_comlead) + 1) ; --- shapetools-1.4pl6.orig/src/vc/rcs2atfs/utils.c +++ shapetools-1.4pl6/src/vc/rcs2atfs/utils.c @@ -201,6 +201,7 @@ return new ; } +#if 0 /* like strdup, but only n characters * the resulting string is null padded, freeable */ @@ -213,6 +214,7 @@ strncpy0(tmp, s, n) ; return tmp ; } +#endif /* return a string concatenated from s1, s2, and s3. * The returned string is freeable. @@ -360,7 +362,7 @@ /* and now the opposite: return the last component of pathname. * returned string is free(3)able. */ -char *basename(pathname) +char *vc_basename(pathname) char *pathname ; { char *bnp ; /* ptr to basename */ @@ -372,7 +374,7 @@ return check_strdup(++bnp) ; } - + /* return type of file: directory, normal file, RCS file, * RCS directory, error (not stat()able) */ --- shapetools-1.4pl6.orig/src/vc/rcs2atfs/utime.c +++ shapetools-1.4pl6/src/vc/rcs2atfs/utime.c @@ -20,7 +20,7 @@ * $Header: utime.c[3.0] Tue Jun 29 16:38:20 1993 andy@cs.tu-berlin.de frozen $ */ -#include "config.h" +#include "afconfig.h" #include void usage() ; --- shapetools-1.4pl6.orig/src/vc/retrv/Makefile +++ shapetools-1.4pl6/src/vc/retrv/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. # # Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[6.0] Fri Jul 30 17:47:08 1993 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -40,27 +41,30 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = $(BASE) -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -76,7 +80,7 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. TARGET = retrv @@ -90,7 +94,7 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # Aliases for (filesystem links to) $(TARGET). @@ -98,7 +102,7 @@ # The regular source and header files. -SOURCES = retrv.c doretrv.c +SOURCES = retrv.c doretrv.c HEADERS = @@ -106,9 +110,9 @@ # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Sources of variant source components stored under equal names in # different locations. During system builds, only one of each (equally @@ -122,12 +126,12 @@ MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) MAN1 = retrv.1 vcat.1 -MAN3 = -MAN4 = -MAN5 = -MAN6 = -MAN7 = -MAN8 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = # All source components of the system (should not be changed) @@ -146,20 +150,35 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro -CC = cc +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = + +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a -LINTLIBS = +SYSLIB = +STATICLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a \ + $(LOCALLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.so $(LOCALLIBPATH)/libsttk.so \ + $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -170,11 +189,11 @@ all: +all $(ALLTARGETS) # The final system building action. - + targets: $(TARGET) $(TARGET): $(LOCALLIBS) $(OBJECTS) - $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(SYSLIBS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) @_aliases="$(ALIASES)"; \ for i in $$_aliases; \ do \ @@ -192,7 +211,8 @@ then \ chmod u+w $(INSTALLBINPATH)/$(TARGET); \ fi; \ - cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) \ + $(OBJECTS) $(INSTALLLDFLAGS) $(SYSLIBS); \ chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ _aliases="$(ALIASES)"; \ for i in $$_aliases; \ @@ -223,32 +243,43 @@ # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -274,26 +305,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -302,26 +315,7 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + install; \ fi +clean: @@ -329,24 +323,6 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi --- shapetools-1.4pl6.orig/src/vc/retrv/Makefile.in +++ shapetools-1.4pl6/src/vc/retrv/Makefile.in @@ -0,0 +1,327 @@ +# # Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for retrv +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/retrv + +# A short name for this node system + +NODENAME = retrv + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = retrv + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = retrversion.c # source +VERSIONOBJECT = retrversion.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = vcat + +# The regular source and header files. + +SOURCES = retrv.c doretrv.c + +HEADERS = + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = retrv.1 vcat.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = retrv.o doretrv.o $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIB = @SYSLIBS@ +STATICLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a \ + $(LOCALLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.so $(LOCALLIBPATH)/libsttk.so \ + $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) \ + $(OBJECTS) $(INSTALLLDFLAGS) $(SYSLIBS); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/retrv/Makefile.org +++ shapetools-1.4pl6/src/vc/retrv/Makefile.org @@ -0,0 +1,352 @@ +# # Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for retrv +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $Header: Makefile[6.0] Fri Jul 30 17:47:08 1993 andy@cs.tu-berlin.de frozen $ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = /home/stone/shape/development + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/retrv + +# A short name for this node system + +NODENAME = retrv + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = s_sunos_4 + +# The processor type. + +HOSTTYPE = sun4 + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBASE = $(BASE) +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 644 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = retrv + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = retrversion.c # source +VERSIONOBJECT = retrversion.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = vcat + +# The regular source and header files. + +SOURCES = retrv.c doretrv.c + +HEADERS = + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = retrv.1 vcat.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = retrv.o doretrv.o $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -g +MAKELDFLAGS = -g + +CC = cc +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = /usr/bin/ranlib + +# System libraries, local libraries and lint libraries. + +SYSLIBS = +LOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/retrv/retrv.c +++ shapetools-1.4pl6/src/vc/retrv/retrv.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -39,7 +39,7 @@ * With -V an explicit version can be selected. Another argument to -V * could be a symbolic name (hopefully unique). Alternatively, versions * can be selected by supplying certain attribute values to retrv, such as - * the name of the author, the version state, a generation number or a + * the name of the author, the version state, a generation number or a * set of user defined attributes, possibly describing a variant. In case * that more than one version fits the desired attributes, the newest * of them is selected, unless -x (exact!) is specified. -V implies -x. @@ -198,8 +198,8 @@ if (vcatFlag) stExit(1); - if ((nameCount - stThisTransaction.tr_seqno) > 1) { - sprintf (stMessage, "\ncompletely stop retrieving (%d files pending) ?", + if ((nameCount - stThisTransaction.tr_seqno) > 1) { + sprintf (stMessage, "\ncompletely stop retrieving (%d files pending) ?", nameCount - stThisTransaction.tr_seqno); if (stAskConfirm (stMessage, "no")) { if (stThisTransaction.tr_done) { @@ -232,7 +232,8 @@ EXPORT int main (argc, argv) int argc; char **argv; { - int tmpArgc, newArgc, i, j, k, retCode=0; + int tmpArgc, newArgc; + volatile int i, j, k, retCode=0; char *cp, **tmpArgv, **newArgv, path[PATH_MAX], tmpStr[16]; Af_key curKey; Af_set *setPtr; @@ -349,7 +350,3 @@ stLog ("done.", ST_LOG_MSG); return (retCode); } - - - - --- shapetools-1.4pl6.orig/src/vc/save/Makefile +++ shapetools-1.4pl6/src/vc/save/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[8.0] Fri Jul 30 17:28:25 1993 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -40,27 +41,30 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = $(BASE) -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -76,7 +80,7 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. TARGET = save @@ -90,15 +94,15 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # Aliases for (filesystem links to) $(TARGET). -ALIASES = Save +ALIASES = Save vsave # The regular source and header files. -SOURCES = save.c dosave.c +SOURCES = save.c dosave.c HEADERS = @@ -106,9 +110,9 @@ # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Sources of variant source components stored under equal names in # different locations. During system builds, only one of each (equally @@ -122,12 +126,12 @@ MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) MAN1 = save.1 -MAN3 = -MAN4 = -MAN5 = -MAN6 = -MAN7 = -MAN8 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = # All source components of the system (should not be changed) @@ -146,20 +150,36 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro -CC = cc +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = + +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a -LINTLIBS = +SYSLIB = + +STATICLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a \ + $(LOCALLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.so $(LOCALLIBPATH)/libsttk.so \ + $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -170,11 +190,11 @@ all: +all $(ALLTARGETS) # The final system building action. - + targets: $(TARGET) $(TARGET): $(LOCALLIBS) $(OBJECTS) - $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(SYSLIBS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) @_aliases="$(ALIASES)"; \ for i in $$_aliases; \ do \ @@ -192,7 +212,8 @@ then \ chmod u+w $(INSTALLBINPATH)/$(TARGET); \ fi; \ - cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) \ + $(OBJECTS) $(INSTALLLDFLAGS) $(SYSLIBS); \ chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ _aliases="$(ALIASES)"; \ for i in $$_aliases; \ @@ -237,32 +258,43 @@ # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -288,26 +320,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -316,26 +330,7 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + install; \ fi +clean: @@ -343,24 +338,6 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi --- shapetools-1.4pl6.orig/src/vc/save/Makefile.in +++ shapetools-1.4pl6/src/vc/save/Makefile.in @@ -0,0 +1,342 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for save +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/save + +# A short name for this node system + +NODENAME = save + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = save + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = saveversion.c # source +VERSIONOBJECT = saveversion.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = Save vsave + +# The regular source and header files. + +SOURCES = save.c dosave.c + +HEADERS = + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = save.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = save.o dosave.o $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIB = @SYSLIBS@ + +STATICLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a \ + $(LOCALLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.so $(LOCALLIBPATH)/libsttk.so \ + $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) \ + $(OBJECTS) $(INSTALLLDFLAGS) $(SYSLIBS); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +installincludes: $(IFHEADERS) + @-_includes="$(IFHEADERS)"; \ + for i in $$_includes; \ + do \ + echo "installing $$i in $(INSTALLINCPATH)"; \ + if [ -f $(INSTALLINCPATH)/$$i ] && \ + [ ! -w $(INSTALLINCPATH)/$$i ]; \ + then \ + chmod u+w $(INSTALLINCPATH)/$$i; \ + fi; \ + cp $$i $(INSTALLINCPATH)/$$i; \ + chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/save/Makefile.org +++ shapetools-1.4pl6/src/vc/save/Makefile.org @@ -0,0 +1,366 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for save +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $Header: Makefile[8.0] Fri Jul 30 17:28:25 1993 andy@cs.tu-berlin.de frozen $ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = /home/stone/shape/development + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/save + +# A short name for this node system + +NODENAME = save + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = s_sunos_4 + +# The processor type. + +HOSTTYPE = sun4 + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBASE = $(BASE) +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 644 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = save + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = saveversion.c # source +VERSIONOBJECT = saveversion.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = Save + +# The regular source and header files. + +SOURCES = save.c dosave.c + +HEADERS = + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = save.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = save.o dosave.o $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -g +MAKELDFLAGS = -g + +CC = cc +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = /usr/bin/ranlib + +# System libraries, local libraries and lint libraries. + +SYSLIBS = +LOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +installincludes: $(IFHEADERS) + @-_includes="$(IFHEADERS)"; \ + for i in $$_includes; \ + do \ + echo "installing $$i in $(INSTALLINCPATH)"; \ + if [ -f $(INSTALLINCPATH)/$$i ] && \ + [ ! -w $(INSTALLINCPATH)/$$i ]; \ + then \ + chmod u+w $(INSTALLINCPATH)/$$i; \ + fi; \ + cp $$i $(INSTALLINCPATH)/$$i; \ + chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/save/dosave.c +++ shapetools-1.4pl6/src/vc/save/dosave.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -93,12 +93,12 @@ } else { /* lets have a closer look at 'em */ if ((news = malloc ((unsigned)newSize)) == NULL) { - sprintf (stMessage, "Can't malloc %lu bytes.", newSize); + sprintf (stMessage, "Can't malloc %lu bytes.", (unsigned long) newSize); stLog (stMessage, ST_LOG_MSG); stAbortThis (TRUE); } if ((olds = malloc ((unsigned)oldSize)) == NULL) { - sprintf (stMessage, "Can't malloc %lu bytes.", oldSize); + sprintf (stMessage, "Can't malloc %lu bytes.", (unsigned long) oldSize); stLog (stMessage, ST_LOG_MSG); free (news); stAbortThis (TRUE); @@ -118,9 +118,9 @@ } *news = *olds = '\0'; - + if (fread (news, sizeof (char), (size_t)newSize, newf) - != newSize) + != newSize) { stLog ("Couldn't read busy version.", ST_LOG_MSG); free (news); @@ -130,7 +130,7 @@ stAbortThis (TRUE); } if (fread (olds, sizeof (char), (size_t)oldSize, oldf) - != oldSize) + != oldSize) { stLog ("Couldn't read lastsaved version.", ST_LOG_MSG); free (news); @@ -203,9 +203,9 @@ #define NOSHELL 127 -LOCAL char *getnote (prompt, changeflg, force, xintent) - char *prompt, *xintent; - int changeflg, force; +LOCAL char *getnote (prompt, changeflg, force, xintent) + char *prompt, *xintent; + int changeflg, force; { char *tmpname = NULL, *edname, cmd[ST_MSGLEN], *intent; static char *notetxt, *rawnotetxt; @@ -231,18 +231,18 @@ printf("%s\n", intent); } - if (firsttime || (istty && !stQuietFlag && + if (firsttime || (istty && !stQuietFlag && !stAskConfirm ("Use previous log message ?", "yes"))) { rawnotetxt = stGetFromStdin ('.'); rawnotetxt = rawnotetxt ? rawnotetxt : ""; if ((notetxt = malloc (strlen (rawnotetxt))) != (char *)NULL) strcpy (notetxt, rawnotetxt); - else + else notetxt = rawnotetxt; /* not nice but safe */ firsttime = FALSE; } - if ((edbuf = (char *)malloc (strlen (intent) + + if ((edbuf = (char *)malloc (strlen (intent) + strlen (rawnotetxt) +1)) != (char *)NULL) { *edbuf = '\0'; strcat (edbuf, intent); @@ -284,7 +284,7 @@ else return (AT_EMPTYLOG); } - + tmpname = stTmpFile (NULL); stRegisterFile (tmpname); if (intent) { @@ -353,7 +353,7 @@ FILE *fil; char fnam[ST_MSGLEN]; - sprintf (fnam, "%s%d-%d", stProgramName, getpid(), serial++); + sprintf (fnam, "%s%d-%d", stProgramName, (int) getpid(), serial++); if (text) { if ((fil = fopen (fnam, "w")) != NULL) { if (fwrite (text, sizeof (char), strlen (text), fil) != strlen (text)) @@ -402,14 +402,14 @@ EXPORT void saveAFile (spath, busyAso) char *spath; Af_key *busyAso; { /* * Save working file with the given name. Check for changes before saving. - * Unless stQuietFlag is set, the user will be prompted for a note + * Unless stQuietFlag is set, the user will be prompted for a note * describing the changes to be saved. * On the locking strategy: * An author can save a busy version, only if he holds a lock (update * privilege) for the document history. When an archive is newly * created from a (busy) file, such a lock is assumed to be set. * Upon save operations - which are conceptually local to a user context - - * the lock is released. + * the lock is released. * Locks on certain documents can be obtained through means of 'reserve' * which is a User <--> Project transaction. Locally created documents * are placed under project discipline (or configuration control) the @@ -468,7 +468,7 @@ if (aliasName) { if ((tmpkey = atBindVersion (curName, aliasName))) { - sprintf (stMessage, "symbolic name %s already in use by %s[%s] -- ignored.", + sprintf (stMessage, "symbolic name %s already in use by %s[%s] -- ignored.", aliasName, curName, af_retattr (tmpkey, AF_ATTVERSION)); af_dropkey (tmpkey); stLog (stMessage, ST_LOG_WARNING); @@ -498,7 +498,7 @@ note = getText (historyLog); } else { - note = getnote ("How about describing the purpose of this document ?", + note = getnote ("How about describing the purpose of this document ?", changedFlag, TRUE, (char *)NULL); } } /* This was handling of newly created archive */ @@ -522,7 +522,7 @@ char *intent = (char *)0; if (!keepLockFlag) intent = af_retattr (&lastsave, AT_ATTINTENT); - note = getnote ("Do you want to comment your modifications ?", changedFlag, + note = getnote ("Do you want to comment your modifications ?", changedFlag, FALSE, intent); if (intent) free (intent); @@ -564,7 +564,7 @@ } af_setattr (&lastsave, AF_REMOVE, AT_ATTINTENT); atUnlock (&lastsave); - af_lock (newkey, af_afuser (geteuid())); + af_lock (newkey, af_afuser (geteuid())); stThisTransaction.tr_done = TRUE; } else { /* version is unchanged or not locked */ @@ -607,7 +607,7 @@ } strcpy (stMessage, "not removed."); } - else { + else { atUnlock (&lastsave); strcpy (stMessage, "removed."); } @@ -638,7 +638,7 @@ } af_transaction (); af_setattr (&ngkey, AF_REMOVE, AT_ATTALIAS); - atUnlock (newkey); + atUnlock (newkey); af_dropkey (newkey); newkey = &ngkey; } @@ -695,7 +695,7 @@ stLog (af_errmsg (stMessage), ST_LOG_ERROR); } } - else { + else { sprintf (stMessage, "%s removed.", curName); stLog (stMessage, ST_LOG_MSG); } @@ -712,7 +712,7 @@ if (fixType) sprintf (stMessage, "Cannot lock generation %d of %s.", fix_generation, curName); - else + else sprintf (stMessage, "Cannot lock %s-history.", curName); stLog (af_errmsg (stMessage), ST_LOG_ERROR); } --- shapetools-1.4pl6.orig/src/vc/save/save.c +++ shapetools-1.4pl6/src/vc/save/save.c @@ -1,12 +1,12 @@ /* Copyright (C) 1993,1994 by the author(s). - + This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of - this software but only under the conditions described in the ShapeTools + this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be @@ -223,7 +223,7 @@ { disableSig (SIGINT); stRmRegisteredFiles (); - if ((nameCount - stThisTransaction.tr_seqno) > 1) { + if ((nameCount - stThisTransaction.tr_seqno) > 1) { sprintf (stMessage, "\ncompletely stop saving (%d files unsaved) ?", nameCount - stThisTransaction.tr_seqno); if (stAskConfirm (stMessage, "no")) { @@ -261,7 +261,8 @@ EXPORT int main (argc, argv) int argc; char **argv; { - int tmpArgc, newArgc, i, j, k, retCode=0; + int tmpArgc, newArgc; + volatile int i, j, k, retCode=0; char *cp, **tmpArgv, **newArgv, path[PATH_MAX], *bindPtr; Af_key curKey; Af_set *setPtr; @@ -296,7 +297,7 @@ stLog ("Incompatible options: '-fix' and '-newgen'.", ST_LOG_MSGERR); stExit (1); } - + stInterruptAction = interrupt_action; stCatchSigs (); @@ -328,7 +329,7 @@ } *bindPtr = '\0'; } - if ((setPtr = atBindSet (newArgv[i], NULL, ignBusyFlag ? + if ((setPtr = atBindSet (newArgv[i], NULL, ignBusyFlag ? AT_BIND_LASTSAVED : AT_BIND_LAST)) == NULL) { stLog (atBindErrorMsg, ST_LOG_ERROR); stExit (2); @@ -366,4 +367,3 @@ stLog ("done.", ST_LOG_MSG); return (retCode); } - --- shapetools-1.4pl6.orig/src/vc/scripts/Makefile +++ shapetools-1.4pl6/src/vc/scripts/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[3.0] Fri Jul 30 17:45:34 1993 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -40,27 +41,30 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = $(BASE) -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -76,7 +80,7 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. VDIFF_TARGET = vdiff @@ -92,7 +96,7 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # The regular source and header files. @@ -102,16 +106,16 @@ VP_SOURCE = vp.sh SOURCES = $(VDIFF_SOURCE) $(CPHIST_SOURCE) $(RMHIST_SOURCE) $(VP_SOURCE) -HEADERS = +HEADERS = MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) MAN1 = vdiff.1 -MAN3 = -MAN4 = -MAN5 = -MAN6 = -MAN7 = -MAN8 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = # All source components of the system (should not be changed) @@ -125,20 +129,33 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro + +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = -CC = cc +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = -LINTLIBS = +SYSLIB = +STATICLOCALLIBS = +SHAREDLOCALLIBS = +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = # -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) + +INSTALLLDFLAGS = # -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -258,32 +275,43 @@ # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -309,26 +337,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -337,26 +347,7 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + install; \ fi +clean: @@ -364,24 +355,6 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi --- shapetools-1.4pl6.orig/src/vc/scripts/Makefile.in +++ shapetools-1.4pl6/src/vc/scripts/Makefile.in @@ -0,0 +1,359 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for vdiff and other vc scripts +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/scripts + +# A short name for this node system + +NODENAME = vc_scripts + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +VDIFF_TARGET = vdiff +CPHIST_TARGET = cphist +RMHIST_TARGET = rmhist +VP_TARGET = vp + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = Release + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# The regular source and header files. + +VDIFF_SOURCE = vdiff.sh +CPHIST_SOURCE = cphist.sh +RMHIST_SOURCE = rmhist.sh +VP_SOURCE = vp.sh +SOURCES = $(VDIFF_SOURCE) $(CPHIST_SOURCE) $(RMHIST_SOURCE) $(VP_SOURCE) + +HEADERS = + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = vdiff.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIB = @SYSLIBS@ +STATICLOCALLIBS = +SHAREDLOCALLIBS = +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = # -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) + +INSTALLLDFLAGS = # -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(VDIFF_TARGET) $(CPHIST_TARGET) $(RMHIST_TARGET) $(VP_TARGET) + +$(VDIFF_TARGET): $(VDIFF_SOURCE) + @rm -f $(VDIFF_TARGET); \ + if [ $(HOSTSYSTEM) = s_ultrix ] ; then \ + echo '#!/bin/sh5' > $(VDIFF_TARGET) ; \ + else \ + echo '#!/bin/sh' > $(VDIFF_TARGET) ; \ + fi + cat $(VDIFF_SOURCE) >> $(VDIFF_TARGET) + @chmod +x $(VDIFF_TARGET) + +$(CPHIST_TARGET): $(CPHIST_SOURCE) + @rm -f $(CPHIST_TARGET); \ + if [ $(HOSTSYSTEM) = s_ultrix ] ; then \ + echo '#!/bin/sh5' > $(CPHIST_TARGET) ; \ + else \ + echo '#!/bin/sh' > $(CPHIST_TARGET) ; \ + fi + cat $(CPHIST_SOURCE) >> $(CPHIST_TARGET) + @chmod +x $(CPHIST_TARGET) + +$(RMHIST_TARGET): $(RMHIST_SOURCE) + @rm -f $(RMHIST_TARGET); \ + if [ $(HOSTSYSTEM) = s_ultrix ] ; then \ + echo '#!/bin/sh5' > $(RMHIST_TARGET) ; \ + else \ + echo '#!/bin/sh' > $(RMHIST_TARGET) ; \ + fi + cat $(RMHIST_SOURCE) >> $(RMHIST_TARGET) + @chmod +x $(RMHIST_TARGET) + +$(VP_TARGET): $(VP_SOURCE) + @rm -f $(VP_TARGET); \ + if [ $(HOSTSYSTEM) = s_ultrix ] ; then \ + echo '#!/bin/sh5' > $(VP_TARGET) ; \ + else \ + echo '#!/bin/sh' > $(VP_TARGET) ; \ + fi + cat $(VP_SOURCE) >> $(VP_TARGET) + @chmod +x $(VP_TARGET) + +installtargets: $(INSTALLBINPATH)/$(VDIFF_TARGET) \ + $(INSTALLBINPATH)/$(CPHIST_TARGET) \ + $(INSTALLBINPATH)/$(RMHIST_TARGET) \ + $(INSTALLBINPATH)/$(VP_TARGET) + +$(INSTALLBINPATH)/$(VDIFF_TARGET): $(VDIFF_TARGET) + @-echo "installing $(VDIFF_TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(VDIFF_TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(VDIFF_TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(VDIFF_TARGET); \ + fi; \ + cp $(VDIFF_TARGET) $(INSTALLBINPATH)/$(VDIFF_TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(VDIFF_TARGET) + +$(INSTALLBINPATH)/$(CPHIST_TARGET): $(CPHIST_TARGET) + @-echo "installing $(CPHIST_TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(CPHIST_TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(CPHIST_TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(CPHIST_TARGET); \ + fi; \ + cp $(CPHIST_TARGET) $(INSTALLBINPATH)/$(CPHIST_TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(CPHIST_TARGET) + +$(INSTALLBINPATH)/$(RMHIST_TARGET): $(RMHIST_TARGET) + @-echo "installing $(RMHIST_TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(RMHIST_TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(RMHIST_TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(RMHIST_TARGET); \ + fi; \ + cp $(RMHIST_TARGET) $(INSTALLBINPATH)/$(RMHIST_TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(RMHIST_TARGET) + +$(INSTALLBINPATH)/$(VP_TARGET): $(VP_TARGET) + @-echo "installing $(VP_TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(VP_TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(VP_TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(VP_TARGET); \ + fi; \ + cp $(VP_TARGET) $(INSTALLBINPATH)/$(VP_TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(VP_TARGET) + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(VDIFF_TARGET) $(CPHIST_TARGET) $(RMHIST_TARGET) $(VP_TARGET) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/scripts/Makefile.org +++ shapetools-1.4pl6/src/vc/scripts/Makefile.org @@ -0,0 +1,387 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for vdiff and other vc scripts +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $Header: Makefile[3.0] Fri Jul 30 17:45:34 1993 andy@cs.tu-berlin.de frozen $ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = /home/stone/shape/development + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/scripts + +# A short name for this node system + +NODENAME = vc_scripts + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = s_sunos_4 + +# The processor type. + +HOSTTYPE = sun4 + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBASE = $(BASE) +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 644 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +VDIFF_TARGET = vdiff +CPHIST_TARGET = cphist +RMHIST_TARGET = rmhist +VP_TARGET = vp + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = Release + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# The regular source and header files. + +VDIFF_SOURCE = vdiff.sh +CPHIST_SOURCE = cphist.sh +RMHIST_SOURCE = rmhist.sh +VP_SOURCE = vp.sh +SOURCES = $(VDIFF_SOURCE) $(CPHIST_SOURCE) $(RMHIST_SOURCE) $(VP_SOURCE) + +HEADERS = + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = vdiff.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -g +MAKELDFLAGS = -g + +CC = cc +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = /usr/bin/ranlib + +# System libraries, local libraries and lint libraries. + +SYSLIBS = +LOCALLIBS = +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(VDIFF_TARGET) $(CPHIST_TARGET) $(RMHIST_TARGET) $(VP_TARGET) + +$(VDIFF_TARGET): $(VDIFF_SOURCE) + @rm -f $(VDIFF_TARGET); \ + if [ $(HOSTSYSTEM) = s_ultrix ] ; then \ + echo '#!/bin/sh5' > $(VDIFF_TARGET) ; \ + else \ + echo '#!/bin/sh' > $(VDIFF_TARGET) ; \ + fi + cat $(VDIFF_SOURCE) >> $(VDIFF_TARGET) + @chmod +x $(VDIFF_TARGET) + +$(CPHIST_TARGET): $(CPHIST_SOURCE) + @rm -f $(CPHIST_TARGET); \ + if [ $(HOSTSYSTEM) = s_ultrix ] ; then \ + echo '#!/bin/sh5' > $(CPHIST_TARGET) ; \ + else \ + echo '#!/bin/sh' > $(CPHIST_TARGET) ; \ + fi + cat $(CPHIST_SOURCE) >> $(CPHIST_TARGET) + @chmod +x $(CPHIST_TARGET) + +$(RMHIST_TARGET): $(RMHIST_SOURCE) + @rm -f $(RMHIST_TARGET); \ + if [ $(HOSTSYSTEM) = s_ultrix ] ; then \ + echo '#!/bin/sh5' > $(RMHIST_TARGET) ; \ + else \ + echo '#!/bin/sh' > $(RMHIST_TARGET) ; \ + fi + cat $(RMHIST_SOURCE) >> $(RMHIST_TARGET) + @chmod +x $(RMHIST_TARGET) + +$(VP_TARGET): $(VP_SOURCE) + @rm -f $(VP_TARGET); \ + if [ $(HOSTSYSTEM) = s_ultrix ] ; then \ + echo '#!/bin/sh5' > $(VP_TARGET) ; \ + else \ + echo '#!/bin/sh' > $(VP_TARGET) ; \ + fi + cat $(VP_SOURCE) >> $(VP_TARGET) + @chmod +x $(VP_TARGET) + +installtargets: $(INSTALLBINPATH)/$(VDIFF_TARGET) \ + $(INSTALLBINPATH)/$(CPHIST_TARGET) \ + $(INSTALLBINPATH)/$(RMHIST_TARGET) \ + $(INSTALLBINPATH)/$(VP_TARGET) + +$(INSTALLBINPATH)/$(VDIFF_TARGET): $(VDIFF_TARGET) + @-echo "installing $(VDIFF_TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(VDIFF_TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(VDIFF_TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(VDIFF_TARGET); \ + fi; \ + cp $(VDIFF_TARGET) $(INSTALLBINPATH)/$(VDIFF_TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(VDIFF_TARGET) + +$(INSTALLBINPATH)/$(CPHIST_TARGET): $(CPHIST_TARGET) + @-echo "installing $(CPHIST_TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(CPHIST_TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(CPHIST_TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(CPHIST_TARGET); \ + fi; \ + cp $(CPHIST_TARGET) $(INSTALLBINPATH)/$(CPHIST_TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(CPHIST_TARGET) + +$(INSTALLBINPATH)/$(RMHIST_TARGET): $(RMHIST_TARGET) + @-echo "installing $(RMHIST_TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(RMHIST_TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(RMHIST_TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(RMHIST_TARGET); \ + fi; \ + cp $(RMHIST_TARGET) $(INSTALLBINPATH)/$(RMHIST_TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(RMHIST_TARGET) + +$(INSTALLBINPATH)/$(VP_TARGET): $(VP_TARGET) + @-echo "installing $(VP_TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(VP_TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(VP_TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(VP_TARGET); \ + fi; \ + cp $(VP_TARGET) $(INSTALLBINPATH)/$(VP_TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(VP_TARGET) + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(VDIFF_TARGET) $(CPHIST_TARGET) $(RMHIST_TARGET) $(VP_TARGET) + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/vadm/Makefile +++ shapetools-1.4pl6/src/vc/vadm/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[10.0] Thu Aug 26 13:56:10 1993 axel@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -40,27 +41,30 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = $(BASE) -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -76,7 +80,7 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. TARGET = vadm @@ -90,7 +94,7 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # Aliases for (filesystem links to) $(TARGET). @@ -106,9 +110,9 @@ # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Sources of variant source components stored under equal names in # different locations. During system builds, only one of each (equally @@ -122,12 +126,12 @@ MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) MAN1 = vadm.1 sbmt.1 publ.1 accs.1 frze.1 vrm.1 vattr.1 -MAN3 = -MAN4 = -MAN5 = -MAN6 = -MAN7 = -MAN8 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = # All source components of the system (should not be changed) @@ -146,23 +150,38 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro -CC = cc +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = + +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = +SYSLIB = + ATFSTKLIB = $(LOCALLIBPATH)/libAtFStk.a STTKLIB = $(LOCALLIBPATH)/libsttk.a ATFSLIB = $(LOCALLIBPATH)/libAtFS.a -LOCALLIBS = $(ATFSTKLIB) $(STTKLIB) $(ATFSLIB) -LINTLIBS = +STATICLOCALLIBS = $(ATFSTKLIB) $(STTKLIB) $(ATFSLIB) +SHAREDLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.so $(LOCALLIBPATH)/libsttk.so \ + $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -173,11 +192,11 @@ all: +all $(ALLTARGETS) # The final system building action. - + targets: $(TARGET) $(TARGET): $(LOCALLIBS) $(OBJECTS) - $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(SYSLIBS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) @_aliases="$(ALIASES)"; \ for i in $$_aliases; \ do \ @@ -195,7 +214,8 @@ then \ chmod u+w $(INSTALLBINPATH)/$(TARGET); \ fi; \ - cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) \ + $(OBJECTS) $(INSTALLLDFLAGS) $(SYSLIBS); \ chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ _aliases="$(ALIASES)"; \ for i in $$_aliases; \ @@ -226,32 +246,43 @@ # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -277,26 +308,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -305,26 +318,7 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + install; \ fi +clean: @@ -332,24 +326,6 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi --- shapetools-1.4pl6.orig/src/vc/vadm/Makefile.in +++ shapetools-1.4pl6/src/vc/vadm/Makefile.in @@ -0,0 +1,330 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for vadm +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/vadm + +# A short name for this node system + +NODENAME = vadm + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = vadm + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = vadmversion.c # source +VERSIONOBJECT = vadmversion.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = sbmt publ accs frze vrm vattr + +# The regular source and header files. + +SOURCES = vadm.c dovadm.c + +HEADERS = vadm.h + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = vadm.1 sbmt.1 publ.1 accs.1 frze.1 vrm.1 vattr.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = vadm.o dovadm.o $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIB = @SYSLIBS@ + +ATFSTKLIB = $(LOCALLIBPATH)/libAtFStk.a +STTKLIB = $(LOCALLIBPATH)/libsttk.a +ATFSLIB = $(LOCALLIBPATH)/libAtFS.a +STATICLOCALLIBS = $(ATFSTKLIB) $(STTKLIB) $(ATFSLIB) +SHAREDLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.so $(LOCALLIBPATH)/libsttk.so \ + $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) \ + $(OBJECTS) $(INSTALLLDFLAGS) $(SYSLIBS); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/vadm/Makefile.org +++ shapetools-1.4pl6/src/vc/vadm/Makefile.org @@ -0,0 +1,355 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for vadm +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $Header: Makefile[10.0] Thu Aug 26 13:56:10 1993 axel@cs.tu-berlin.de frozen $ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = /home/stone/shape/development + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/vadm + +# A short name for this node system + +NODENAME = vadm + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = s_sunos_4 + +# The processor type. + +HOSTTYPE = sun4 + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBASE = $(BASE) +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 644 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = vadm + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = vadmversion.c # source +VERSIONOBJECT = vadmversion.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = sbmt publ accs frze vrm vattr + +# The regular source and header files. + +SOURCES = vadm.c dovadm.c + +HEADERS = vadm.h + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = vadm.1 sbmt.1 publ.1 accs.1 frze.1 vrm.1 vattr.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = vadm.o dovadm.o $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -g +MAKELDFLAGS = -g + +CC = cc +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = /usr/bin/ranlib + +# System libraries, local libraries and lint libraries. + +SYSLIBS = +ATFSTKLIB = $(LOCALLIBPATH)/libAtFStk.a +STTKLIB = $(LOCALLIBPATH)/libsttk.a +ATFSLIB = $(LOCALLIBPATH)/libAtFS.a +LOCALLIBS = $(ATFSTKLIB) $(STTKLIB) $(ATFSLIB) +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/vfind/Makefile +++ shapetools-1.4pl6/src/vc/vfind/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[5.0] Fri Jul 30 17:42:25 1993 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -40,27 +41,30 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = $(BASE) -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -76,7 +80,7 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. TARGET = vfind @@ -90,25 +94,25 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # Aliases for (filesystem links to) $(TARGET). -ALIASES = +ALIASES = # The regular source and header files. -SOURCES = vfind.c +SOURCES = vfind.c -HEADERS = +HEADERS = # Auxiliary source and header files that are not genuine part of the # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Sources of variant source components stored under equal names in # different locations. During system builds, only one of each (equally @@ -122,12 +126,12 @@ MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) MAN1 = vfind.1 -MAN3 = -MAN4 = -MAN5 = -MAN6 = -MAN7 = -MAN8 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = # All source components of the system (should not be changed) @@ -146,20 +150,35 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro -CC = cc +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = + +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a -LINTLIBS = +SYSLIB = +STATICLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a \ + $(LOCALLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.so $(LOCALLIBPATH)/libsttk.so \ + $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -170,11 +189,11 @@ all: +all $(ALLTARGETS) # The final system building action. - + targets: $(TARGET) $(TARGET): $(LOCALLIBS) $(OBJECTS) - $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(SYSLIBS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) @_aliases="$(ALIASES)"; \ for i in $$_aliases; \ do \ @@ -192,7 +211,8 @@ then \ chmod u+w $(INSTALLBINPATH)/$(TARGET); \ fi; \ - cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) \ + $(OBJECTS) $(INSTALLLDFLAGS) $(SYSLIBS); \ chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ _aliases="$(ALIASES)"; \ for i in $$_aliases; \ @@ -223,32 +243,43 @@ # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -274,26 +305,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -302,26 +315,7 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + install; \ fi +clean: @@ -329,24 +323,6 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi --- shapetools-1.4pl6.orig/src/vc/vfind/Makefile.in +++ shapetools-1.4pl6/src/vc/vfind/Makefile.in @@ -0,0 +1,327 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for vfind +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/vfind + +# A short name for this node system + +NODENAME = vfind + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = vfind + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = vfversion.c # source +VERSIONOBJECT = vfversion.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +SOURCES = vfind.c + +HEADERS = + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = vfind.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = vfind.o $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIB = @SYSLIBS@ +STATICLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a \ + $(LOCALLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.so $(LOCALLIBPATH)/libsttk.so \ + $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) \ + $(OBJECTS) $(INSTALLLDFLAGS) $(SYSLIBS); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/vfind/Makefile.org +++ shapetools-1.4pl6/src/vc/vfind/Makefile.org @@ -0,0 +1,352 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for vfind +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $Header: Makefile[5.0] Fri Jul 30 17:42:25 1993 andy@cs.tu-berlin.de frozen $ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = /home/stone/shape/development + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/vfind + +# A short name for this node system + +NODENAME = vfind + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = s_sunos_4 + +# The processor type. + +HOSTTYPE = sun4 + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBASE = $(BASE) +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 644 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = vfind + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = vfversion.c # source +VERSIONOBJECT = vfversion.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = + +# The regular source and header files. + +SOURCES = vfind.c + +HEADERS = + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = vfind.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = vfind.o $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -g +MAKELDFLAGS = -g + +CC = cc +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = /usr/bin/ranlib + +# System libraries, local libraries and lint libraries. + +SYSLIBS = +LOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/vfind/vfind.c +++ shapetools-1.4pl6/src/vc/vfind/vfind.c @@ -25,6 +25,7 @@ * $Header: vfind.c[5.1] Fri Dec 17 18:44:18 1993 andy@cs.tu-berlin.de frozen $ */ +#include #include #include "atfs.h" #include "atfstk.h" --- shapetools-1.4pl6.orig/src/vc/vl/Makefile +++ shapetools-1.4pl6/src/vc/vl/Makefile @@ -1,12 +1,13 @@ +# Generated automatically from Makefile.in by configure. ## Copyright (C) 1993,1994 by the author(s). -# +# # This software is published in the hope that it will be useful, but # WITHOUT ANY WARRANTY for any part of this software to work correctly # or as described in the manuals. See the ShapeTools Public License # for details. # # Permission is granted to use, copy, modify, or distribute any part of -# this software but only under the conditions described in the ShapeTools +# this software but only under the conditions described in the ShapeTools # Public License. A copy of this license is supposed to have been given # to you along with ShapeTools in a file named LICENSE. Among other # things, this copyright notice and the Public License must be @@ -18,7 +19,7 @@ # Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) # Axel Mahler (Axel.Mahler@cs.tu-berlin.de) # -# $Header: Makefile[9.0] Fri Jul 30 17:08:04 1993 andy@cs.tu-berlin.de frozen $ +# $__Header$ # # -------------------------------------------------------------------- @@ -27,7 +28,7 @@ # The base directory of the project's repository area. -BASE = /home/stone/shape/development +BASE = /home/packages/tmp/shapetools-1.4pl6 # Path to this node system relative to the root of the # repository area defined above (e.g. src/vc/save). @@ -40,27 +41,30 @@ # The operating system, $(TARGET) shall be built for. -HOSTSYSTEM = s_sunos_4 +HOSTSYSTEM = s_linux # The processor type. -HOSTTYPE = sun4 +HOSTTYPE = linux # Preprocessor switches. (eg. -DDEBUG) -SWITCHES = +SWITCHES = -DATFS_OWN_LOCKING # Locations and modes for the installation of executables, header # files, libraries and manuals. -INSTALLBASE = $(BASE) -INSTALLBINPATH = $(INSTALLBASE)/bin +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = /usr +INSTALLBINPATH = ${exec_prefix}/bin INSTALLBINMODE = 755 -INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCPATH = ${prefix}/include INSTALLINCMODE = 444 -INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBPATH = ${exec_prefix}/lib INSTALLLIBMODE = 644 -INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANPATH = ${prefix}/man INSTALLMANMODE = 444 # Directories, where local libraries and header files are to be @@ -76,7 +80,7 @@ # # The system (program, library, etc.) to be built. If you want to # manage multiple programs, you should introduce multiple targets -# (like PROGTARGET LIBTARGET or any better names). In this case you +# (like PROGTARGET LIBTARGET or any better names). In this case you # have to adjust the system building actions accordingly. TARGET = vl @@ -90,7 +94,7 @@ # The names of the subdirectories containing subsystems which are also # to be built. -SUBSYSTEMS = +SUBSYSTEMS = # Aliases for (filesystem links to) $(TARGET). @@ -99,15 +103,15 @@ # The regular source and header files. SOURCES = vl.c display.c -HEADERS = +HEADERS = # Auxiliary source and header files that are not genuine part of the # system (eg. a test environment). These will also be processed on # system building, but will *not* be included in releases. -AUXSOURCES = +AUXSOURCES = -AUXHEADERS = +AUXHEADERS = # Sources of variant source components stored under equal names in # different locations. During system builds, only one of each (equally @@ -121,12 +125,12 @@ MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) MAN1 = vl.1 vlog.1 -MAN3 = -MAN4 = -MAN5 = -MAN6 = -MAN7 = -MAN8 = +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = # All source components of the system (should not be changed) @@ -145,20 +149,35 @@ SHELL = /bin/sh INCLUDES = -I$(LOCALINCLUDEPATH) -MAKECFLAGS = -g -MAKELDFLAGS = -g +MAKECFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-unused-result -Wno-implicit-int -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast +MAKELDFLAGS = -Wl,-z,relro -CC = cc +SHLIBTARGET = lib$(LIBNAME).so.$(SHLIBVERSION) +SHLIBCFLAGS = -DPIC -fPIC +SHLIBLD = gcc -shared +SHLIBSUFFIX = so +SHLIBLOCALLDFLAGS = +SHLIBINSTALLLDFLAGS = + +CC = gcc CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) LDFLAGS = $(MAKELDFLAGS) -RANLIB = /usr/bin/ranlib +RANLIB = ranlib # System libraries, local libraries and lint libraries. -SYSLIBS = -LOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a -LINTLIBS = +SYSLIB = +STATICLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a \ + $(LOCALLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.so $(LOCALLIBPATH)/libsttk.so \ + $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = $(SHAREDLOCALLIBS) +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = # -------------------------------------------------------------------- # the targets @@ -169,11 +188,11 @@ all: +all $(ALLTARGETS) # The final system building action. - + targets: $(TARGET) $(TARGET): $(LOCALLIBS) $(OBJECTS) - $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(SYSLIBS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) @_aliases="$(ALIASES)"; \ for i in $$_aliases; \ do \ @@ -191,7 +210,8 @@ then \ chmod u+w $(INSTALLBINPATH)/$(TARGET); \ fi; \ - cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) \ + $(OBJECTS) $(INSTALLLDFLAGS) $(SYSLIBS); \ chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ _aliases="$(ALIASES)"; \ for i in $$_aliases; \ @@ -236,32 +256,43 @@ # Recursive builds. Performed *before* building $(TARGET) +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + subsystems: @_subsystems="$(SUBSYSTEMS)"; \ for i in $$_subsystems; \ do \ echo cd $$i; \ (cd $$i; $(MAKE) \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" \ + $(INHERITEDFLAGS) \ BINDDEFAULT=$(BINDDEFAULT) \ BINDINSTALL=$(BINDINSTALL) \ COMPILER=$(COMPILER) \ @@ -287,26 +318,8 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" all; \ + $(INHERITEDFLAGS) \ + all; \ fi +install: @@ -315,26 +328,7 @@ else \ $(MAKE) ALLTARGETS="subsystems installtargets" \ MAINTARGET=install \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" install; \ + install; \ fi +clean: @@ -342,24 +336,6 @@ then : ; \ else \ $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ - BASE=$(BASE) \ - HOSTSYSTEM=$(HOSTSYSTEM) \ - HOSTTYPE=$(HOSTTYPE) \ - INSTALLBASE=$(INSTALLBASE) \ - INSTALLBINPATH=$(INSTALLBINPATH) \ - INSTALLBINMODE=$(INSTALLBINMODE) \ - INSTALLINCPATH=$(INSTALLINCPATH) \ - INSTALLINCMODE=$(INSTALLINCMODE) \ - INSTALLLIBPATH=$(INSTALLLIBPATH) \ - INSTALLLIBMODE=$(INSTALLLIBMODE) \ - INSTALLMANPATH=$(INSTALLMANPATH) \ - INSTALLMANMODE=$(INSTALLMANMODE) \ - LOCALLIBPATH=$(LOCALLIBPATH) \ - MAKE="$(MAKE)" \ - SHELL="$(SHELL)" \ - CC="$(CC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - RANLIB="$(RANLIB)" \ - SYSLIBS="$(SYSLIBS)" clean; \ + $(INHERITEDFLAGS) \ + clean; \ fi --- shapetools-1.4pl6.orig/src/vc/vl/Makefile.in +++ shapetools-1.4pl6/src/vc/vl/Makefile.in @@ -0,0 +1,340 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for vl +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $__Header$ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = @BASE@ + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/vl + +# A short name for this node system + +NODENAME = vl + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = @shapehostsystem@ + +# The processor type. + +HOSTTYPE = @shapehosttype@ + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = @SWITCHES@ + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +prefix = $(INSTALLBASE) +exec_prefix = $(INSTALLBASE) + +INSTALLBASE = @prefix@ +INSTALLBINPATH = @bindir@ +INSTALLBINMODE = 755 +INSTALLINCPATH = @includedir@ +INSTALLINCMODE = 444 +INSTALLLIBPATH = @libdir@ +INSTALLLIBMODE = 644 +INSTALLMANPATH = @mandir@ +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = vl + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = vlversion.c # source +VERSIONOBJECT = vlversion.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = vlog + +# The regular source and header files. + +SOURCES = vl.c display.c +HEADERS = + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = vl.1 vlog.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = vl.o display.o $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = @MAKECFLAGS@ +MAKELDFLAGS = @MAKELDFLAGS@ + +SHLIBTARGET = @SHLIBTARGET@ +SHLIBCFLAGS = @SHLIBCFLAGS@ +SHLIBLD = @SHLIBLD@ +SHLIBSUFFIX = @SHLIBSUFFIX@ +SHLIBLOCALLDFLAGS = @SHLIBLOCALLDFLAGS@ +SHLIBINSTALLLDFLAGS = @SHLIBINSTALLLDFLAGS@ + +CC = @CC@ +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = @RANLIB@ + +# System libraries, local libraries and lint libraries. + +SYSLIB = @SYSLIBS@ +STATICLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a \ + $(LOCALLIBPATH)/libAtFS.a +SHAREDLOCALLIBS = $(LOCALLIBPATH)/libAtFStk.so $(LOCALLIBPATH)/libsttk.so \ + $(LOCALLIBPATH)/libAtFS.so +LOCALLIBS = @LOCALLIBS@ +LOCALLDFLAGS = -L$(LOCALLIBPATH) $(SHLIBLOCALLDFLAGS) -lAtFStk -lsttk -lAtFS + +INSTALLLDFLAGS = -L$(INSTALLLIBPATH) $(SHLIBINSTALLLDFLAGS) -lAtFStk -lsttk -lAtFS + +LINTLIBS = @LINTLIBS@ + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLDFLAGS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + $(CC) $(LDFLAGS) -o $(INSTALLBINPATH)/$(TARGET) \ + $(OBJECTS) $(INSTALLLDFLAGS) $(SYSLIBS); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +installincludes: $(IFHEADERS) + @-_includes="$(IFHEADERS)"; \ + for i in $$_includes; \ + do \ + echo "installing $$i in $(INSTALLINCPATH)"; \ + if [ -f $(INSTALLINCPATH)/$$i ] && \ + [ ! -w $(INSTALLINCPATH)/$$i ]; \ + then \ + chmod u+w $(INSTALLINCPATH)/$$i; \ + fi; \ + cp $$i $(INSTALLINCPATH)/$$i; \ + chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +INHERITEDFLAGS = \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + LOCALINCLUDEPATH=$(LOCALINCLUDEPATH) \ + LOCALLIBS="$(LOCALLIBS)" \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SHLIBTARGET="$(SHLIBTARGET)" \ + SHLIBCFLAGS="$(SHLIBCFLAGS)" \ + SHLIBLD="$(SHLIBLD)" \ + SHLIBSUFFIX="$(SHLIBSUFFIX)" \ + SHLIBLOCALLDFLAGS="$(SHLIBLOCALLDFLAGS)" \ + SHLIBINSTALLLDFLAGS="$(SHLIBINSTALLLDFLAGS)" \ + SYSLIBS="$(SYSLIBS)" + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + $(INHERITEDFLAGS) \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + $(INHERITEDFLAGS) \ + all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + $(INHERITEDFLAGS) \ + clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/vl/Makefile.org +++ shapetools-1.4pl6/src/vc/vl/Makefile.org @@ -0,0 +1,365 @@ +## Copyright (C) 1993,1994 by the author(s). +# +# This software is published in the hope that it will be useful, but +# WITHOUT ANY WARRANTY for any part of this software to work correctly +# or as described in the manuals. See the ShapeTools Public License +# for details. +# +# Permission is granted to use, copy, modify, or distribute any part of +# this software but only under the conditions described in the ShapeTools +# Public License. A copy of this license is supposed to have been given +# to you along with ShapeTools in a file named LICENSE. Among other +# things, this copyright notice and the Public License must be +# preserved on all copies. + +# +# Makefile for vl +# +# Authors: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) +# Axel Mahler (Axel.Mahler@cs.tu-berlin.de) +# +# $Header: Makefile[9.0] Fri Jul 30 17:08:04 1993 andy@cs.tu-berlin.de frozen $ +# + +# -------------------------------------------------------------------- +# locations and general macros +# -------------------------------------------------------------------- + +# The base directory of the project's repository area. + +BASE = /home/stone/shape/development + +# Path to this node system relative to the root of the +# repository area defined above (e.g. src/vc/save). + +NODEPATH = src/vc/vl + +# A short name for this node system + +NODENAME = vl + +# The operating system, $(TARGET) shall be built for. + +HOSTSYSTEM = s_sunos_4 + +# The processor type. + +HOSTTYPE = sun4 + +# Preprocessor switches. (eg. -DDEBUG) + +SWITCHES = + +# Locations and modes for the installation of executables, header +# files, libraries and manuals. + +INSTALLBASE = $(BASE) +INSTALLBINPATH = $(INSTALLBASE)/bin +INSTALLBINMODE = 755 +INSTALLINCPATH = $(INSTALLBASE)/include +INSTALLINCMODE = 444 +INSTALLLIBPATH = $(INSTALLBASE)/lib/shape +INSTALLLIBMODE = 644 +INSTALLMANPATH = $(INSTALLBASE)/man +INSTALLMANMODE = 444 + +# Directories, where local libraries and header files are to be +# installed for project wide use. + +LOCALLIBPATH = $(BASE)/lib +LOCALINCLUDEPATH = $(BASE)/include + +# -------------------------------------------------------------------- +# the system's components +# -------------------------------------------------------------------- + +# +# The system (program, library, etc.) to be built. If you want to +# manage multiple programs, you should introduce multiple targets +# (like PROGTARGET LIBTARGET or any better names). In this case you +# have to adjust the system building actions accordingly. + +TARGET = vl + +# The release number generator. The version number of this file will +# be used as release identifier for the whole system. + +VERSIONFILE = vlversion.c # source +VERSIONOBJECT = vlversion.o # derived (if source contains program code) + +# The names of the subdirectories containing subsystems which are also +# to be built. + +SUBSYSTEMS = + +# Aliases for (filesystem links to) $(TARGET). + +ALIASES = vlog + +# The regular source and header files. + +SOURCES = vl.c display.c +HEADERS = + +# Auxiliary source and header files that are not genuine part of the +# system (eg. a test environment). These will also be processed on +# system building, but will *not* be included in releases. + +AUXSOURCES = + +AUXHEADERS = + +# Sources of variant source components stored under equal names in +# different locations. During system builds, only one of each (equally +# named) group is chosen. Source distributions need all of them. + +VARIANTSOURCES = + +VARIANTHEADERS = + +# The manuals + +MANUALS = $(MAN1) $(MAN3) $(MAN4) $(MAN5) $(MAN6) $(MAN7) $(MAN8) +MAN1 = vl.1 vlog.1 +MAN3 = +MAN4 = +MAN5 = +MAN6 = +MAN7 = +MAN8 = + +# All source components of the system (should not be changed) + +COMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile Makefile Dependencies + +# The derived files. All files, that are automatically produced during +# a build process should be listed here. + +OBJECTS = vl.o display.o $(VERSIONOBJECT) + +# -------------------------------------------------------------------- +# tools, flags, libraries etc. +# -------------------------------------------------------------------- + +MAKE = make +SHELL = /bin/sh + +INCLUDES = -I$(LOCALINCLUDEPATH) +MAKECFLAGS = -g +MAKELDFLAGS = -g + +CC = cc +CFLAGS = $(INCLUDES) $(MAKECFLAGS) $(SWITCHES) +LDFLAGS = $(MAKELDFLAGS) + +RANLIB = /usr/bin/ranlib + +# System libraries, local libraries and lint libraries. + +SYSLIBS = +LOCALLIBS = $(LOCALLIBPATH)/libAtFStk.a $(LOCALLIBPATH)/libsttk.a $(LOCALLIBPATH)/libAtFS.a +LINTLIBS = + +# -------------------------------------------------------------------- +# the targets +# -------------------------------------------------------------------- + +# The default action (do not change) + +all: +all $(ALLTARGETS) + +# The final system building action. + +targets: $(TARGET) + +$(TARGET): $(LOCALLIBS) $(OBJECTS) + $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LOCALLIBS) $(SYSLIBS) + @_aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $$i; \ + echo linking $(TARGET) to $$i; \ + ln $(TARGET) $$i; \ + done + +installtargets: $(INSTALLBINPATH)/$(TARGET) + +$(INSTALLBINPATH)/$(TARGET): $(TARGET) + @-echo "installing $(TARGET) in $(INSTALLBINPATH)"; \ + if [ -f $(INSTALLBINPATH)/$(TARGET) ] && \ + [ ! -w $(INSTALLBINPATH)/$(TARGET) ]; \ + then \ + chmod u+w $(INSTALLBINPATH)/$(TARGET); \ + fi; \ + cp $(TARGET) $(INSTALLBINPATH)/$(TARGET); \ + chmod $(INSTALLBINMODE) $(INSTALLBINPATH)/$(TARGET); \ + _aliases="$(ALIASES)"; \ + for i in $$_aliases; \ + do \ + rm -f $(INSTALLBINPATH)/$$i; \ + echo "linking $(INSTALLBINPATH)/$(TARGET) to $(INSTALLBINPATH)/$$i"; \ + ln $(INSTALLBINPATH)/$(TARGET) $(INSTALLBINPATH)/$$i; \ + done + +installmanuals: $(MANUALS) + @-_manuals="$(MAN1)"; \ + for i in $$_manuals; \ + do \ + echo "installing $$i in $(INSTALLMANPATH)/man1"; \ + if [ -f $(INSTALLMANPATH)/man1/$$i ] && \ + [ ! -w $(INSTALLMANPATH)/man1/$$i ]; \ + then \ + chmod u+w $(INSTALLMANPATH)/man1/$$i; \ + fi; \ + cp $$i $(INSTALLMANPATH)/man1/$$i; \ + chmod $(INSTALLMANMODE) $(INSTALLMANPATH)/man1/$$i; \ + done + +installincludes: $(IFHEADERS) + @-_includes="$(IFHEADERS)"; \ + for i in $$_includes; \ + do \ + echo "installing $$i in $(INSTALLINCPATH)"; \ + if [ -f $(INSTALLINCPATH)/$$i ] && \ + [ ! -w $(INSTALLINCPATH)/$$i ]; \ + then \ + chmod u+w $(INSTALLINCPATH)/$$i; \ + fi; \ + cp $$i $(INSTALLINCPATH)/$$i; \ + chmod $(INSTALLINCMODE) $(INSTALLINCPATH)/$$i; \ + done + +# The cleanup action. Removes all automatically rederivable files. + +doclean: + rm -f $(TARGET) $(ALIASES) $(OBJECTS) + +# Recursive builds. Performed *before* building $(TARGET) + +subsystems: + @_subsystems="$(SUBSYSTEMS)"; \ + for i in $$_subsystems; \ + do \ + echo cd $$i; \ + (cd $$i; $(MAKE) \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" \ + BINDDEFAULT=$(BINDDEFAULT) \ + BINDINSTALL=$(BINDINSTALL) \ + COMPILER=$(COMPILER) \ + QUALITY=$(QUALITY) \ + TOTALRELEASEBASE=$(TOTALRELEASEBASE) \ + PARTIALRELEASEBASE=$(PARTIALRELEASEBASE) \ + SHAPELIBPATH=$(SHAPELIBPATH) \ + ALLTARGETS= \ + MAINTARGET= \ + $(MAINTARGET) ); \ + done + +# -------------------------------------------------------------------- +# internals (do not modify) +# -------------------------------------------------------------------- + +install: +install $(ALLTARGETS) + +clean: +clean $(ALLTARGETS) + ++all: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems targets" MAINTARGET=all \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" all; \ + fi + ++install: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems installtargets" \ + MAINTARGET=install \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" install; \ + fi + ++clean: + @-if [ -n "$(ALLTARGETS)" ]; \ + then : ; \ + else \ + $(MAKE) ALLTARGETS="subsystems doclean" MAINTARGET=clean \ + BASE=$(BASE) \ + HOSTSYSTEM=$(HOSTSYSTEM) \ + HOSTTYPE=$(HOSTTYPE) \ + INSTALLBASE=$(INSTALLBASE) \ + INSTALLBINPATH=$(INSTALLBINPATH) \ + INSTALLBINMODE=$(INSTALLBINMODE) \ + INSTALLINCPATH=$(INSTALLINCPATH) \ + INSTALLINCMODE=$(INSTALLINCMODE) \ + INSTALLLIBPATH=$(INSTALLLIBPATH) \ + INSTALLLIBMODE=$(INSTALLLIBMODE) \ + INSTALLMANPATH=$(INSTALLMANPATH) \ + INSTALLMANMODE=$(INSTALLMANMODE) \ + LOCALLIBPATH=$(LOCALLIBPATH) \ + MAKE="$(MAKE)" \ + SHELL="$(SHELL)" \ + CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ + RANLIB="$(RANLIB)" \ + SYSLIBS="$(SYSLIBS)" clean; \ + fi --- shapetools-1.4pl6.orig/src/vc/vl/vl.c +++ shapetools-1.4pl6/src/vc/vl/vl.c @@ -23,6 +23,7 @@ * $Header: vl.c[9.0] Thu Jan 20 13:10:24 1994 andy@cs.tu-berlin.de frozen $ */ +#include extern int errno; #include "atfs.h" --- shapetools-1.4pl6.orig/vgrep-2.0/Makefile.in +++ shapetools-1.4pl6/vgrep-2.0/Makefile.in @@ -1,4 +1,4 @@ -# Makefile for GNU grep +# Makefile for ve?grep, derived from GNU grep # Copyright (C) 1992 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -40,19 +40,24 @@ DEFS=-DGREP @DEFS@ # Extra libraries. -LIBS=@LIBS@ +SHAPELIBPATH = $(SHAPETOOLS)/lib +SHAPEINCPATH = $(SHAPETOOLS)/include +SHAPELIBS = -lAtFStk -lAtFS -lsttk + +LIBS=$(SHAPELIBS) @LIBS@ ALLOCA=@ALLOCA@ -CFLAGS=-O -LDFLAGS=$(CFLAGS) +CDEBUG=-I$(SHAPEINCPATH) +CFLAGS= $(MAKECFLAGS) $(CDEBUG) +LDFLAGS= $(MAKELDFLAGS) -L$(SHAPELIBPATH) prefix=/usr/local exec_prefix=$(prefix) # Prefix for installed program, normally empty or `g'. -binprefix= +binprefix=v # Prefix for installed man page, normally empty or `g'. -manprefix= +manprefix=v # Where to install executables. bindir=$(exec_prefix)/bin @@ -69,12 +74,13 @@ #### End of system configuration section. #### SRCS=grep.c getopt.c regex.c dfa.c kwset.c obstack.c search.c -OBJS=grep.o getopt.o regex.o dfa.o kwset.o obstack.o search.o +#OBJS=grep.o getopt.o regex.o dfa.o kwset.o obstack.o search.o +OBJS=grep.o getopt.o dfa.o kwset.o obstack.o search.o .c.o: $(CC) $(CFLAGS) $(DEFS) -I$(srcdir) -c $< -all: grep check.done +all: vgrep check.done # For Saber C. grep.load: $(SRCS) @@ -85,26 +91,27 @@ $(LINT) $(CFLAGS) $(DEFS) -I$(srcdir) $(SRCS) install: all - $(INSTALL_PROGRAM) grep $(bindir)/$(binprefix)grep + $(INSTALL_PROGRAM) vgrep $(bindir)/$(binprefix)grep rm -f $(bindir)/$(binprefix)egrep - $(LN) $(bindir)/$(binprefix)grep $(bindir)/$(binprefix)egrep + $(LN) -s grep $(bindir)/$(binprefix)egrep rm -f $(bindir)/$(binprefix)fgrep - $(LN) $(bindir)/$(binprefix)grep $(bindir)/$(binprefix)fgrep + $(LN) -s grep $(bindir)/$(binprefix)fgrep $(INSTALL_DATA) $(srcdir)/grep.man $(mandir)/grep.$(manext) check: - AWK=$(AWK) sh $(srcdir)/tests/check.sh $(srcdir)/tests + AWK=$(AWK) LD_LIBRARY_PATH=$(SHAPETOOLS)/lib \ + sh $(srcdir)/tests/check.sh $(srcdir)/tests touch check.done -check.done: grep - AWK=$(AWK) sh $(srcdir)/tests/check.sh $(srcdir)/tests +check.done: vgrep + -AWK=$(AWK) sh $(srcdir)/tests/check.sh $(srcdir)/tests touch check.done -grep: $(OBJS) $(LIBOBJS) $(ALLOCA) - $(CC) $(LDFLAGS) -o grep $(OBJS) $(LIBOBJS) $(LIBS) $(ALLOCA) +vgrep: $(OBJS) $(LIBOBJS) $(ALLOCA) + $(CC) $(LDFLAGS) -o vgrep $(OBJS) $(LIBOBJS) $(LIBS) $(ALLOCA) clean: - rm -f core grep *.o check.done tmp.script khadafy.out + rm -f core vgrep *.o check.done tmp.script khadafy.out mostlyclean: clean --- shapetools-1.4pl6.orig/vgrep-2.0/grep.c +++ shapetools-1.4pl6/vgrep-2.0/grep.c @@ -59,6 +59,9 @@ #include "getpagesize.h" #include "grep.h" +#include "../include/atfs.h" +#include "../src/atfstk/atfstk.h" + #undef MAX #define MAX(A,B) ((A) > (B) ? (A) : (B)) @@ -285,7 +288,7 @@ MAP_PRIVATE | MAP_FIXED, bufdesc, bufoffset); if (maddr == (caddr_t) -1) { - fprintf(stderr, "%s: warning: %s: %s\n", filename, + fprintf(stderr, "%s: warning: %s\n", filename, strerror(errno)); goto tryread; } @@ -309,10 +312,10 @@ bufmapped = 0; lseek(bufdesc, bufoffset, 0); } - cc = read(bufdesc, buffer + bufsalloc, bufalloc - bufsalloc); + cc = atReadExpand(bufdesc, buffer + bufsalloc, bufalloc - bufsalloc); } #else - cc = read(bufdesc, buffer + bufsalloc, bufalloc - bufsalloc); + cc = atReadExpand(bufdesc, buffer + bufsalloc, bufalloc - bufsalloc); #endif if (cc > 0) buflim = buffer + bufsalloc + cc; @@ -362,7 +365,7 @@ if (out_line) { nlscan(beg); - printf("%d%c", ++totalnl, sep); + printf("%lu%c", ++totalnl, sep); lastnl = lim; } if (out_byte) @@ -563,10 +566,10 @@ return nlines; } -static char version[] = "GNU grep version 2.0"; +static char version[] = "ve?grep 1.0, derived from GNU grep version 2.0"; #define USAGE \ - "usage: %s [-[[AB] ]] [-[CEFGVchilnqsvwx]] [-[ef]] []\n" + "usage: %s [vbind-options] [-[[AB] ]] [-[CEFGVchilnqsvwx]] [-[ef]] []\n" static void usage() @@ -606,6 +609,8 @@ extern char *optarg; extern int optind; + atBindSetArgv(&argc, &argv); + prog = argv[0]; if (prog && strrchr(prog, '/')) prog = strrchr(prog, '/') + 1; @@ -777,7 +782,7 @@ if (optind < argc) while (optind < argc) { - desc = strcmp(argv[optind], "-") ? open(argv[optind], O_RDONLY) : 0; + desc = strcmp(argv[optind], "-") ? atOpenExpand(argv[optind], 0) : 0; if (desc < 0) { if (!suppress_errors) @@ -803,7 +808,7 @@ printf("%s\n", filename); } if (desc != 0) - close(desc); + atCloseExpand(desc); ++optind; } else --- shapetools-1.4pl6.orig/vgrep-2.0/grep.man +++ shapetools-1.4pl6/vgrep-2.0/grep.man @@ -1,9 +1,11 @@ -.TH GREP 1 "1992 September 10" "GNU Project" +.TH VGREP 1 "1992 September 10" "GNU Project" .SH NAME -grep, egrep, fgrep \- print lines matching a pattern +vgrep, vegrep, vfgrep \- print lines matching a pattern .SH SYNOPOSIS -.B grep +.B vgrep [ +.I vbind-options +] [ .BR \- [[ AB "] ]\c" .I "num" ] @@ -17,25 +19,27 @@ | .BI \-f file ] [ -.I files... +.I "names..." ] .SH DESCRIPTION .PP -.B Grep -searches the named input -.I files -(or standard input if no files are named, or -the file name +.B Vgrep +is GNU +.B grep +with a patch to access AtFS version objects. +.I Vgrep +searches the files and AtFS version objects listed in the arguments +(or standard input if no names are given, or the name .B \- is given) for lines containing a match to the given .IR pattern . By default, -.B grep +.B vgrep prints the matching lines. .PP There are three major variants of -.BR grep , +.BR vgrep , controlled by the following options. .PD 0 .TP @@ -56,22 +60,35 @@ any of which is to be matched. .LP In addition, two variant programs -.B egrep +.B vegrep and -.B fgrep +.B vfgrep are available. -.B Egrep -is similiar (but not identical) to -.BR "grep\ \-E" , +.B Vegrep +is similar (but not identical) to +.BR "vgrep\ \-E" , and is compatible with the historical Unix .BR egrep . -.B Fgrep +.B Vfgrep is the same as -.BR "grep\ \-F" . +.BR "vgrep\ \-F" . .PD .LP +.I Vgrep +understands the standard version binding options of the Shape toolkit. +The +.I names +on the command line are replaced by the appropriate version IDs of the +selected version object. +.LP +The +.I vbind-options +are shapeTools' standard options for version binding. +A description of these options can be found in the manual page of +.IR vbind (1). +.LP All variants of -.B grep +.B vgrep understand the following options: .PD 0 .TP @@ -79,7 +96,7 @@ Matches will be printed with .I num lines of leading and trailing context. However, -.B grep +.B vgrep will never print any given line more than once. .TP .BI \-A " num" @@ -98,7 +115,7 @@ .TP .B \-V Print the version number of -.B grep +.B vgrep to standard error. This version number should be included in all bug reports (see below). .TP @@ -172,7 +189,7 @@ Regular expressions are constructed analagously to arithmetic expressions, by using various operators to combine smaller expressions. .PP -.B Grep +.B Vgrep understands two different versions of regular expression syntax: ``basic'' and ``extended.'' In .RB "GNU\ " grep , @@ -343,7 +360,7 @@ .BR \e) . .PP In -.B egrep +.B vegrep the metacharacter .B { loses its special meaning; instead use @@ -357,6 +374,28 @@ Exit status is 2 if there were syntax errors in the pattern, inaccessible input files, or other system errors. +.SH EXAMPLES +Grep for ``foo'' in version 1.43 of smile.c: +.IP +\fCvgrep foo smile.c[1.43]\fP +.LP +Grep for ``foo'' in the last version of smile.c (last saved version or +busy file, if available): +.IP +\fCvgrep -last foo smile.c\fP +.LP +Grep for ``foo'' in all versions of C files that have been created +since February 14 1993: +.IP +\fCvgrep -since 14.2.93 foo \e\(**.c\fP +.LP +Grep for ``foo'' in all versions carrying the symbolic name +``Release-2.3'': +.IP +\fCvgrep foo \e\(**[Release-2.3]\fP +.SH "SEE ALSO" +emacs(1), ed(1), sh(1), vbind(1), atread(3), +.I "GNU Emacs Manual" .SH BUGS .PP Email bug reports to @@ -365,11 +404,11 @@ .PP Large repetition counts in the .BI { m , n } -construct may cause grep to use lots of memory. +construct may cause vgrep to use lots of memory. In addition, certain other obscure regular expressions require exponential time and space, and may cause -.B grep +.B vgrep to run out of memory. .PP Backreferences are very slow, and may require exponential time. --- shapetools-1.4pl6.orig/vgrep-2.0/tests/check.sh +++ shapetools-1.4pl6/vgrep-2.0/tests/check.sh @@ -7,7 +7,7 @@ failures=0 # The Khadafy test is brought to you by Scott Anderson . . . -./grep -E -f $testdir/khadafy.regexp $testdir/khadafy.lines > khadafy.out +./vgrep -E -f $testdir/khadafy.regexp $testdir/khadafy.lines > khadafy.out if cmp $testdir/khadafy.lines khadafy.out then : --- shapetools-1.4pl6.orig/vgrep-2.0/tests/scriptgen.awk +++ shapetools-1.4pl6/vgrep-2.0/tests/scriptgen.awk @@ -1,6 +1,6 @@ BEGIN { print "failures=0"; } $0 !~ /^#/ && NF == 3 { - print "echo '" $3 "' | ./grep -E -e '" $2 "' > /dev/null 2>&1"; + print "echo '" $3 "' | ./vgrep -E -e '" $2 "' > /dev/null 2>&1"; print "if [ $? != " $1 " ]" print "then" printf "\techo Spencer test \\#%d failed\n", ++n