1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299
|
#### Start of system configuration section. ####
# Prototype Gri Makefile. Developers - read first few lines for instructions.
# $Id: Makefile.in,v 1.24 2000/01/07 15:16:09 kelley Exp $
# <<<--- DEVELOPERS - YOU MAY NEED TO EDIT THIS SECTION ------------------->>>
# <<< Uncomment next line on linux machines, to get debugging malloc lib. >>>
#LINUX_DEBUG_LIB=-L/usr/debug_include
# <<< Uncomment next 2 lines to get debugging malloc/string library. >>>
#DBMALLOC_LIBS=-ldbmalloc
#DBMALLOC_DEFS=-DUSE_DBMALLOC=1
# <<< Here is documentation on dbmalloc, from 'man dbmalloc' >>>
# <<< As an example, to set up the session to generate a core file >>>
# <<< for every malloc warning, to drop core and exit on a malloc >>>
# <<< fatal, and to log all messages to the file "malloc_log" do >>>
# <<< the following: >>>
# <<< >>>
# <<< export MALLOC_WARN=131 >>>
# <<< export MALLOC_FATAL=1 >>>
# <<< export MALLOC_ERRFILE=malloc_log >>>
# <<< then do >>>
# <<< gdb gri core >>>
# <<< to get into debugger. A good gdb command to know is >>>
# <<< where >>>
# <<< which gives location in gri where problem occured. >>>
# <<<--- DEVELOPERS - END OF SECTION YOU MIGHT NEED TO EDIT --------------->>>
srcdir = .
AWK = gawk
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
LIBS = $(DBMALLOC_LIBS) $(LINUX_DEBUG_LIB) @LIBS@ -lm
DEFS = -DVERSION=\"$(VERSION)\" -DDEFAULT_GRI_DIR=\"$(libdir)\" -DAWK=\"gawk\" $(DBMALLOC_DEFS) $(HAVE_LINUX) @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@
EXTRA_CFLAGS = @EXTRA_CFLAGS@ $(LINUX_EXTRA_CFLAGS)
EXTRA_CFLAGS_TEMPLATE = @EXTRA_CFLAGS_TEMPLATE@ $(LINUX_EXTRA_CFLAGS)
prefix = @prefix@
bindir = $(prefix)/$(VERSION)/bin
libdir = $(prefix)/$(VERSION)/lib
#### End of system configuration section. ####
OBJS = G_string.o GriColor.o GriPath.o GriState.o chopword.o close.o \
command.o convert.o debug.o delete.o differ.o doline.o draw.o endup.o \
expect.o file.o filter.o flip.o gr.o gr_coll.o graxes.o grcntour.o \
gri.o grimage.o grinterp.o grsmooth.o grstring.o heal.o help.o \
if.o ignore.o image.o input.o insert.o interp.o mask.o math.o \
new.o open.o popen.o query.o quit.o read.o regress.o reorder.o \
rescale.o rewind.o rpn.o rpncalc.o scales.o set.o show.o skip.o \
smooth.o startup.o state.o stats.o storage.o synonyms.o template.o \
timer.o utility.o variable.o version.o while.o write.o
gri: $(OBJS)
$(CXX) -o gri $(LDFLAGS) $(OBJS) $(LIBS)
# Here are a few explicit rules used by the author for debugging;
# it is emphaticallyy *not* a complete list. If you edit the
# source files you must do
# make clean
# make
# to compile using all the actual dependencies.
GriColor.o: GriColor.hh
GriState.o: GriState.hh
gr.o: GriState.hh
gri.o: GriState.hh
set.o: GriState.hh
state.o: GriState.hh
template.o: GriState.hh
command.o: tags.hh
variable.o: Variable.hh
synonyms.o: Synonym.hh
convert.o: GMatrix.hh
grcntour.o: GMatrix.hh
gri.o: GMatrix.hh
grsmooth.o: GMatrix.hh
smooth.o: GMatrix.hh
G_string.o: G_string.hh
CXX = @CXX@
# Special rule for templates, so as not to use
# -fno-implicit-templates (g++ weirdness). This special
# case depends on whether -frepo exists ... and whether the installer
# has temerity to try it!
template.o: template.cc
$(CXX) -c -Wall $(CXXFLAGS) $(EXTRA_CFLAGS_TEMPLATE) $(DEFS) -I$(srcdir) $<
.SUFFIXES: .cc
.cc.o:
$(CXX) -c $(CXXFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir) $<
# Handle startup in special way since it needs version number.
startup.o: version.cc startup.cc
$(CXX) -c $(CXXFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir) startup.cc
debian-lib = $(debian)/usr/share/gri/$(version)
install_linux_debian: gri
echo "Installing into '$(debian)' directory"
install -d $(debian-lib)
if test -f startup.debian; then cat startup.debian | sed -e s,VSN,${VERSION}, > tmp; $(INSTALL_DATA) tmp $(debian-lib)/startup.msg; rm -f tmp; else echo "WARNING: no startup.debian file!"; fi;
install -m 755 gri $(debian)/usr/bin/gri-$(version)
(cd $(debian)/usr/bin; ln -fs gri-$(version) gri)
install -m 644 gri.cmd $(debian-lib)/gri.cmd
if test -f gri_merge; then install -m 755 gri_merge $(debian)/usr/bin/gri_merge; else echo "WARNING: no gri_merge file!"; fi;
if test -f gri_unpage; then install -m 755 gri_unpage $(debian)/usr/bin/gri_unpage; else echo "WARNING: no gri_unpage file!";fi;
install_linux_redhat:
if test ! -d /opt/gri ; then mkdir -m 755 -p /opt/gri ; fi
if test ! -d /opt/gri/bin ; then mkdir -m 755 -p /opt/gri/bin ; fi
if test ! -d /opt/gri/lib ; then mkdir -m 755 -p /opt/gri/lib ; fi
if test ! -d /opt/gri/doc ; then mkdir -m 755 -p /opt/gri/doc ; fi
if test ! -d /opt/gri/doc/html ; then mkdir -m 755 -p /opt/gri/doc/html ; fi
if test ! -d /opt/gri/doc/html/examples ; then mkdir -m 755 -p /opt/gri/doc/html/examples ; fi
if test ! -d /opt/gri/doc/html/resources ; then mkdir -m 755 -p /opt/gri/doc/html/resources ; fi
if test -f startup.redhat; then cat startup.redhat | sed -e s,VSN,${VERSION}, > tmp; $(INSTALL_DATA) tmp /opt/gri/lib/startup.msg; rm -f tmp; else echo "WARNING: no startup.redhat file!"; fi;
/usr/bin/install -m 755 gri /opt/gri/bin/gri
/usr/bin/install -m 755 gri_merge /opt/gri/bin/gri_merge
/usr/bin/install -m 755 gri_unpage /opt/gri/bin/gri_unpage
/usr/bin/install -m 644 gri.cmd /opt/gri/lib/gri.cmd
/usr/bin/install -m 644 license.txt /opt/gri/lib/license.txt
#
# gri mode (tweaked a bit for redhat since debian goes to web to see manual)
cp -f gri-mode.el tmp
# Following sed conversion broken -- no idea why
#sed -e 's,WWW-page "http://phys.ocean.dal.ca/~kelley/gri/gri1.html",WWW-page "file:/opt/gri/doc/html/index.html",' tmp > gri-mode.el
/usr/bin/install -m 644 gri-mode.el /usr/share/emacs/site-lisp
mv tmp gri-mode.el
#
/usr/bin/install -m 644 doc/gri-manpage-redhat.1 /usr/man/man1/gri.1
/usr/bin/install -m 644 doc/*.html /opt/gri/doc/html
/usr/bin/install -m 644 doc/resources/*ps /opt/gri/doc/html/resources
/usr/bin/install -m 644 doc/resources/*eps /opt/gri/doc/html/resources
/usr/bin/install -m 644 doc/resources/*gif /opt/gri/doc/html/resources
/usr/bin/install -m 644 doc/resources/*txt /opt/gri/doc/html/resources
/usr/bin/install -m 644 doc/examples/* /opt/gri/doc/html/examples
/usr/bin/install -m 644 doc/gri /usr/info
/usr/bin/install -m 644 doc/gri-[1-9] /usr/info
/usr/bin/install -m 644 doc/gri-[1-9][0-9] /usr/info
gzip -f /usr/info/gri
gzip -f /usr/info/gri-[1-9]
gzip -f /usr/info/gri-[1-9][0-9]
echo -e '#!/bin/sh\n/opt/gri/bin/gri -directory /opt/gri/lib $$@' > /usr/bin/gri
chmod a+rx /usr/bin/gri
# Install all relevant files, creating directories, destroying old
# links and creating new links as necessary.
install: all
echo "Installing into '$(prefix)' directory"
# make directories if nonexistent
if test ! -d $(prefix)/bin ; then mkdir -p $(prefix)/bin ; fi
if test ! -d $(prefix)/lib ; then mkdir -p $(prefix)/lib ; fi
if test ! -d $(bindir) ; then mkdir -p $(bindir) ; fi
if test ! -d $(libdir) ; then mkdir -p $(libdir) ; fi
# startup_message
cat startup.msg | sed -e s,VSN,${VERSION}, > tmp
$(INSTALL_DATA) tmp $(libdir)/startup.msg
rm -f tmp
# put stuff in NUMBERED directories
$(INSTALL_PROGRAM) gri $(bindir)/gri
$(INSTALL_DATA) gri.cmd $(libdir)/gri.cmd
$(INSTALL_DATA) license.txt $(libdir)/license.txt
$(INSTALL_PROGRAM) gri_merge $(bindir)/gri_merge
$(INSTALL_PROGRAM) gri_unpage $(bindir)/gri_unpage
# link back from numbered directories to unnumbered ones
rm -f $(prefix)/bin/gri
rm -f $(prefix)/lib/gri.cmd
rm -f $(prefix)/lib/license.txt
rm -f $(prefix)/lib/startup.msg
ln -s $(bindir)/gri $(prefix)/bin/gri
ln -s $(libdir)/gri.cmd $(prefix)/lib/gri.cmd
ln -s $(libdir)/license.txt $(prefix)/lib/license.txt
ln -s $(libdir)/startup.msg $(prefix)/lib/startup.msg
chmod og-w $(prefix)/bin/gri
chmod a+rx $(prefix)/bin/gri
chmod og-w $(prefix)/lib/gri.cmd
chmod a-x $(prefix)/lib/gri.cmd
chmod a+r $(prefix)/lib/gri.cmd
chmod og-w $(prefix)/lib/license.txt
chmod a-x $(prefix)/lib/license.txt
chmod a+r $(prefix)/lib/license.txt
chmod og-w $(prefix)/lib/startup.msg
chmod a-x $(prefix)/lib/startup.msg
chmod a+r $(prefix)/lib/startup.msg
echo This version Gri, numbered $(VERSION), was compiled by user \"`whoami`\" > $(prefix)/$(VERSION)/COMPILED.BY
echo on `date`, on host `uname -n` >> $(prefix)/$(VERSION)/COMPILED.BY
chmod a+r $(prefix)/$(VERSION)/COMPILED.BY
cd doc; prefix=$(prefix) make html-install
all: force
make gri
make doc
force:
doc: force
cd doc; make info html
etags:
etags *.cc *.hh
clean:
rm -f gri *.o *.rpo core *.bak *.BAK *~ config.cache \#*
distclean:
make clean
rm -f config.log config.cache config.status Makefile
# Source distribution
SOURCE_NAME = gri-$(VERSION)
VERSION = `awk '/_gri_number/{print $$4}' version.cc|sed -e s/\\"//g -e s/\;//`
SRC_DIR = .
DOC_DIR = ./doc
DEST_DIR = /home/kelley
source:
# Clean directory, if existent.
-rm -rf $(SOURCE_NAME)
mkdir $(SOURCE_NAME)
#
# Copy source
-cp $(SRC_DIR)/*.cc $(SRC_DIR)/*.hh $(SRC_DIR)/gri.cmd $(SRC_DIR)/license.txt \
$(SRC_DIR)/Makefile.in $(SRC_DIR)/Makefile.dj2\
$(SRC_DIR)/configure \
$(SRC_DIR)/configure.in \
$(SRC_DIR)/install-sh \
$(SRC_DIR)/copyright.txt $(SRC_DIR)/AUTHOR $(SRC_DIR)/README* \
$(SRC_DIR)/gri-mode.el\
$(SRC_DIR)/gri_merge\
$(SRC_DIR)/gri_unpage\
$(SRC_DIR)/startup.msg $(SRC_DIR)/startup.debian $(SRC_DIR)/startup.redhat \
$(SRC_DIR)/gri-*.spec\
$(SRC_DIR)/grilogo.gif\
$(SOURCE_NAME)
-chmod a+r $(SOURCE_NAME)/gri.cmd
-chmod a+r $(SOURCE_NAME)/license.txt
#
# Copy documentation
mkdir $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/gri.archive $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/archive-to-html.pl $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/cmdrefcard.tex $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/refcard.tex $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/Makefile $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/FAQ.html $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/gri-manpage.1 $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/gri-manpage-debian.1 $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/gri-manpage-redhat.1 $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/gri.texi $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/texinfo2HTML $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/HTML_subdivide $(SOURCE_NAME)/doc
-cp $(DOC_DIR)/make_html_index $(SOURCE_NAME)/doc
mkdir $(SOURCE_NAME)/doc/resources
chmod a+x $(SOURCE_NAME)/doc/resources
-cp $(DOC_DIR)/resources/*.eps $(DOC_DIR)/resources/*.gif $(DOC_DIR)/resources/*txt $(SOURCE_NAME)/doc/resources
chmod a+r $(SOURCE_NAME)/doc/resources/*
mkdir $(SOURCE_NAME)/doc/examples
chmod a+x $(SOURCE_NAME)/doc/examples
-cp $(DOC_DIR)/examples/*.gif $(SOURCE_NAME)/doc/examples
-cp $(DOC_DIR)/examples/*.gri $(SOURCE_NAME)/doc/examples
-cp $(DOC_DIR)/examples/*.txt $(SOURCE_NAME)/doc/examples
-cp $(DOC_DIR)/examples/*.dat $(SOURCE_NAME)/doc/examples
-cp $(DOC_DIR)/examples/*.ps $(SOURCE_NAME)/doc/examples
-cp $(DOC_DIR)/examples/FEM.pl $(SOURCE_NAME)/doc/examples
-cp $(DOC_DIR)/examples/model.elements $(SOURCE_NAME)/doc/examples
-cp $(DOC_DIR)/examples/model.nodes $(SOURCE_NAME)/doc/examples
-cp $(DOC_DIR)/examples/Makefile $(SOURCE_NAME)/doc/examples
chmod a+r $(SOURCE_NAME)/doc/examples/*
chmod a+r $(SOURCE_NAME)/*
# Tar package, compress it, install it.
tar -c -f $(SOURCE_NAME).tar $(SOURCE_NAME)
rm -rf $(SOURCE_NAME)
gzip $(SOURCE_NAME).tar
mv $(SOURCE_NAME).tar.gz $(SOURCE_NAME).tgz
-cp $(SOURCE_NAME).tgz $(DEST_DIR)
chmod a+r $(DEST_DIR)/$(SOURCE_NAME).tgz
rm -f $(SOURCE_NAME).tgz
README-ftp:
lynx -dump README-ftp.html > README-ftp
chmod a+r README-ftp
what_is_new:
@for f in *.spec gri.cmd *cc *hh Makefile.in configure.in doc/gri.texi doc/Makefile;\
do diff --brief $$f ../$$f;\
done
|