2 # Makefile for tcl debugger
5 VERSION = \"@DBG_VERSION_FULL@\"
6 SHORT_VERSION = @DBG_VERSION@
8 # Compatible with Tcl version 7.5
9 # Compatible with Tk version 4.1
14 ######################################################################
15 # The following lines are things you are likely to want to change
16 ######################################################################
18 # Tcl include files. (If you haven't installed Tcl yet, read the README file).
19 # This must point to the directory that contains ALL of Tcl's include
20 # files, not just the public ones.
21 TCLHDIR = @TCLHDIRDASHI@
24 # You should be able to leave this just the way it is. However, here are some
25 # note if you run into problems:
27 # Avoid -O (optimize) unless you are convinced your optimizer is flawless
28 # (hint: not a chance). I have heard many reports of -O causing Expect to
30 # I encourage you to use -g (debugging). While it is unlikely you will
31 # encounter an internal error in Expect, should this happen, I may just need
32 # the -g information and then you will need to recompile Expect. As an aside,
33 # Expect is not a space or time pig, so this won't affect the performance of
34 # your Expect scripts.
35 # Note: On Linux systems which only have dynamic X libraries, the -g prevents
36 # the linker from using them. So do not use -g on such systems.
37 CFLAGS = @DBG_CFLAGS@ @DBG_SHLIB_CFLAGS@
39 # which C compiler to use
42 # By default, `make install' will install the appropriate files in
43 # /usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
44 # an installation prefix other than /usr/local here:
47 # You can specify a separate installation prefix for architecture-specific
48 # files such as binaries and libraries.
49 exec_prefix = @exec_prefix@
51 # If you have ranlib but it should be avoided, change this from "ranlib" #
52 # to something innocuous like "echo". Known systems with this problem:
54 UNSHARED_RANLIB = @UNSHARED_RANLIB@
56 ######################################################################
57 # End of things you are likely to want to change
58 ######################################################################
60 libdir = $(exec_prefix)/lib
61 datadir = $(prefix)/lib
64 man1dir = $(mandir)/man1
65 includedir = $(prefix)/include
67 # Where to store utility scripts. This corresponds to the variable
69 DBG_SCRIPTDIR = $(datadir)/dbg
72 INSTALL_PROGRAM = @INSTALL_PROGRAM@
73 INSTALL_DATA = @INSTALL_DATA@
78 # TCLHDIR includes "-I"
79 CPPFLAGS = -I. -I$(srcdir) $(TCLHDIR) \
80 -DDBG_VERSION=$(VERSION) \
81 -DDBG_SCRIPTDIR=\"$(DBG_SCRIPTDIR)\"
83 CFLAGS_INT = $(MH_CFLAGS) $(CPPFLAGS) $(CFLAGS)
86 $(CC) -c $(CFLAGS_INT) $(HDEFS) $<
88 CFILES = Dbg.c Dbg_cmd.c
89 OFILES = Dbg.o Dbg_cmd.o
91 # libraries (both .a and shared)
92 DBG_LIB_FILES = @DBG_LIB_FILES@
93 # default Dbg library (shared if possible, otherwise static)
94 DBG_LIB_FILE = @DBG_LIB_FILE@
95 # Dbg object library (.a)
96 DBG_UNSHARED_LIB_FILE = @DBG_UNSHARED_LIB_FILE@
97 # Dbg object library (shared, if possible)
98 DBG_SHARED_LIB_FILE = @DBG_SHARED_LIB_FILE@
100 all: $(DBG_LIB_FILES)
102 $(DBG_UNSHARED_LIB_FILE): $(OFILES)
103 -rm -f $(DBG_UNSHARED_LIB_FILE)
104 $(AR) $(ARFLAGS) $(DBG_UNSHARED_LIB_FILE) $(OFILES)
105 -$(UNSHARED_RANLIB) $(DBG_UNSHARED_LIB_FILE)
107 $(DBG_SHARED_LIB_FILE): $(OFILES)
108 -rm -f $(DBG_SHARED_LIB_FILE)
109 @TCL_SHLIB_LD@ -o $(DBG_SHARED_LIB_FILE) $(OFILES)
111 # Delete all the installed files that the `install' target creates
112 # (but not the noninstalled files such as `make all' creates)
114 -rm -f $(man1dir)/tcldbg.1 \
115 $(libdir)/$(DBG_SHARED_LIB_FILE) \
116 $(libdir)/$(DBG_UNSHARED_LIB_FILE) \
117 $(includedir)/Dbg.h \
118 $(DBG_SCRIPTDIR)/pkgIndex.tcl
120 install: $(DBG_LIB_FILES)
121 ${srcdir}/mkinstalldirs $(man1dir) $(libdir) $(includedir) $(DBG_SCRIPTDIR)
122 $(INSTALL_DATA) $(srcdir)/tcldbg.man $(man1dir)/tcldbg.1
123 if [ -s $(DBG_UNSHARED_LIB_FILE) ] ; then \
124 $(INSTALL_DATA) $(DBG_UNSHARED_LIB_FILE) $(libdir)/$(DBG_UNSHARED_LIB_FILE) ; \
125 $(UNSHARED_RANLIB) $(libdir)/$(DBG_UNSHARED_LIB_FILE) ; \
127 if [ -s $(DBG_SHARED_LIB_FILE) ] ; then \
128 $(INSTALL_DATA) $(DBG_SHARED_LIB_FILE) $(libdir)/$(DBG_SHARED_LIB_FILE) ; \
130 $(INSTALL_DATA) $(srcdir)/Dbg.h $(includedir)
131 # create utility-script directory
132 $(INSTALL_DATA) $(srcdir)/Dbg_lib.tcl $(DBG_SCRIPTDIR)
133 $(INSTALL_DATA) $(srcdir)/tclIndex $(DBG_SCRIPTDIR)
136 ###################################
137 # Targets for Makefile and configure
138 ###################################
140 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) config.status
141 @echo "Rebuilding the Makefile..."
142 $(SHELL) config.status
144 configure: $(srcdir)/configure.in $(srcdir)/Makefile.in $(srcdir)/aclocal.m4
145 autoconf configure.in > configure
146 -@chmod a+x configure
149 config.status: $(srcdir)/configure
150 @echo "Rebuilding config.status..."
151 $(SHELL) ./config.status --recheck
153 ################################################
154 # Various "clean" targets follow GNU conventions
155 ################################################
159 $(DBG_UNSHARED_LIB_FILE) $(DBG_SHARED_LIB_FILE)
161 # like "clean", but also delete files created by "configure"
163 -rm -f Makefile config.status config.cache config.log Dbg_cf.h
165 # like "clean", but doesn't delete test utilities or massaged scripts
166 # because most people don't have to worry about them
169 $(DBG_UNSHARED_LIB_FILE) $(DBG_SHARED_LIB_FILE)
171 # delete everything from current directory that can be reconstructed
172 # except for configure
175 tclIndex: Dbg_lib.tcl
176 expect -c "auto_mkindex . *.tcl;exit"
181 lint $(LINTFLAGS) $(CPPFLAGS) $(CFILES) $(TCLLINTLIB) | tee debug.lint
183 ##################################
184 # Targets for development at NIST
185 ##################################
188 configure --verbose --prefix=/depot/tcl --exec-prefix=/depot/tcl/arch
190 # report globals that shouldn't be public but are
192 nm $(DBG_UNSHARED_LIB_FILE) | egrep -v " [a-zU] | _Dbg"
194 # after copying source directory, restablish all links
197 ln -s ../expect/aclocal.m4
199 ######################################
200 # Targets for pushing out releases
201 ######################################
203 FTPDIR = /proj/itl/www/div826/subject/expect/tcl-debug
205 ftp: tcl-debug-$(SHORT_VERSION).tar.Z tcl-debug-$(SHORT_VERSION).tar.gz
206 cp tcl-debug-$(SHORT_VERSION).tar.Z $(FTPDIR)/tcl-debug.tar.Z
207 cp tcl-debug-$(SHORT_VERSION).tar.gz $(FTPDIR)/tcl-debug.tar.gz
209 cp README $(FTPDIR)/README.distribution
210 rm tcl-debug-$(SHORT_VERSION).tar*
211 ls -l $(FTPDIR)/tcl-debug.tar*
213 # make an alpha relase and install it on ftp server
214 alpha: tcl-debug-$(SHORT_VERSION).tar.Z tcl-debug-$(SHORT_VERSION).tar.gz
215 cp tcl-debug-$(SHORT_VERSION).tar.Z $(FTPDIR)/tcl-debug-alpha.tar.Z
216 cp tcl-debug-$(SHORT_VERSION).tar.gz $(FTPDIR)/tcl-debug-alpha.tar.gz
217 rm tcl-debug-$(SHORT_VERSION).tar*
218 ls -l $(FTPDIR)/tcl-debug-alpha.tar*
220 tcl-debug-$(SHORT_VERSION).tar:
221 rm -f ../tcl-debug-$(SHORT_VERSION)
222 ln -s `pwd` ../tcl-debug-$(SHORT_VERSION)
223 cd ..;tar cvfh $@ `pubfile tcl-debug-$(SHORT_VERSION)`
226 tcl-debug-$(SHORT_VERSION).tar.Z: tcl-debug-$(SHORT_VERSION).tar
227 compress -fc tcl-debug-$(SHORT_VERSION).tar > $@
229 tcl-debug-$(SHORT_VERSION).tar.gz: tcl-debug-$(SHORT_VERSION).tar
230 gzip -fc tcl-debug-$(SHORT_VERSION).tar > $@
232 Dbg.o: $(srcdir)/Dbg.c $(srcdir)/Dbg.h