1 ## Process this file with automake to generate Makefile.in
3 AUTOMAKE_OPTIONS = dejagnu
5 # Install all the associated data files
6 SUBDIRS = doc # testsuite example
8 # Install the bourne shell script driver in the bindir
11 # Install the main DejaGnu expect file in the datadir
12 pkgdata_SCRIPTS = runtest.exp
14 # Install config.guess too, so we can use it to figure out
15 # what type of machine we're running on.
16 libexecdir = $(pkgdatadir)/libexec
17 libexec_SCRIPTS = config.guess
19 DATE = `date "+%Y%m%d`
24 RUNTESTDEFAULTFLAGS = --srcdir $(srcdir)/testsuite RUNTEST=$(RUNTEST)
26 if [ -f ${srcdir}/runtest$(EXEEXT) ] ; then \
27 echo ${srcdir}/runtest$(EXEEXT); \
28 else echo "ERROR: runtest not found" ; exit 1; fi`
30 CLEANFILES = x.log x.sum site.bak setval.tmp
32 cd testsuite ; $(MAKE) check
33 cd example ; $(MAKE) check
34 # @echo "Do nothing here, cause we don't want to run the tests twice"
36 # Since we don't use SUBDIRS, we have to manually clean the sub directories.
37 # We don't use SUBDIRS, so the excample or test cases don't get built
38 # by default for a "make all".
40 cd doc ; $(MAKE) clean
41 cd testsuite ; $(MAKE) clean
42 cd example ; $(MAKE) clean
44 # Set ourselves up to build a RedHat package
45 tarball: overview.html overview.ps overview.pdf
46 -rm -fr dejagnu-${VERSION}
47 cp -fpr $(srcdir) dejagnu-${VERSION}
48 @echo "clean up stuff we don't want in the source file"
50 dir=`(cd $${src}; pwd)`; \
51 (cd dejagnu-${VERSION} ; $${dir}/Clean.tcl); \
53 cp -fr doc/html dejagnu-${VERSION}/doc/; \
54 cp -fr doc/overview.ps dejagnu-${VERSION}/doc/; \
55 cp -fr doc/overview.pdf dejagnu-${VERSION}/doc/; \
56 cp -fr doc/overview.rtf dejagnu-${VERSION}/doc/; \
57 tar cvf ../dejagnu-${VERSION}.tar dejagnu-${VERSION}; \
58 gzip -9fv ../dejagnu-${VERSION}.tar; \
59 cp -f ../dejagnu-${VERSION}.tar.gz /usr/src/redhat/SOURCES/; \
60 cp -f $${dir}/redhat/dejagnu.spec /usr/src/redhat/SPECS/
62 # this builds a date stamped tarball of the current sources
64 -rm -fr dejagnu-${DATE}
65 cp -fpr $(srcdir) dejagnu-${DATE}
66 @echo "clean up stuff we don't want in the source file"
68 dir=`(cd $${src}; pwd)`; \
69 (cd dejagnu-${DATE} ; $${dir}/Clean.tcl);
71 -cp -fr doc/html dejagnu-${DATE}/doc/
72 -cp -fr doc/overview.ps dejagnu-${DATE}/doc/
73 -cp -fr doc/overview.pdf dejagnu-${DATE}/doc/
74 -cp -fr doc/overview.rtf dejagnu-${DATE}/doc/
75 tar cf ../dejagnu-${DATE}.tar dejagnu-${DATE}
76 gzip -9fv ../dejagnu-${DATE}.tar
78 rpmspec: $(srcdir)/redhat/dejagnu.spec
79 cp -f $(srcdir)/redhat/dejagnu.spec /usr/src/redhat/SPECS/
81 # this builds a Redhat Linux style rpm package
83 cp -f ../$(distdir).tar.gz /usr/src/redhat/SOURCES/
84 rpm -ba /usr/src/redhat/SPECS/dejagnu.spec
86 # this builds a Debian Linux style deb package.
87 deb: overview.html overview.ps overview.pdf
88 -rm -fr dejagnu-${VERSION}
89 cp -fpr $(srcdir) dejagnu-${VERSION}
90 @echo "clean up stuff we don't want in the source file"
92 dir=`(cd $${src}; pwd)`; \
93 (cd dejagnu-${VERSION} ; $${dir}/Clean.tcl);
95 -cp -fr $(srcdir)/debian dejagnu-${VERSION}/
96 -cp -fr doc/html dejagnu-${VERSION}/doc/;
97 -cp -fr doc/overview.ps dejagnu-${VERSION}/doc/;
98 -cp -fr doc/overview.pdf dejagnu-${VERSION}/doc/;
99 -cp -fr doc/overview.rtf dejagnu-${VERSION}/doc/;
100 (cd dejagnu-${VERSION}; dpkg-buildpackage)
102 # this builds a Solaris style pkg package.
103 solpkg: $(srcdir)/pkg/prototype
104 if test ! -d $(PKGDIR)/dejagnu; then \
105 rm -fr dejagnu-${VERSION}; \
106 mkdir dejagnu-${VERSION}; \
107 cd dejagnu-${VERSION}; \
108 $(srcdir)/configure -v --prefix $(PKGDIR)/dejagnu; \
111 cp $(srcdir)/pkg/prototype /tmp
112 cp $(srcdir)/pkg/pkginfo /tmp
115 pkgmk -o -r / -d /tmp; \
116 tar cf $$here/dejagnu-${VERSION}.SPARC.2.8.pkg.tar DejaGnu; \
117 gzip -9fv $$here/dejagnu-${VERSION}.SPARC.2.8.pkg.tar
118 rm -fr /tmp/prototype /tmp/pkginfo /tmp/DejaGnu
120 # this builds a HPUX style depot file
121 hpdepot: # $(srcdir)/depot/dejagnu.psf
122 if test ! -d $(PKGDIR)/dejagnu; then \
123 rm -fr dejagnu-${VERSION}; \
124 mkdir dejagnu-${VERSION}; \
125 cd dejagnu-${VERSION}; \
126 $(srcdir)/configure -v --prefix $(PKGDIR)/dejagnu; \
129 swpackage -s /home/projects/dejagnu/depot/dejagnu.psf -x target_type=directory -d /tmp
132 tar cf $$here/dejagnu-${VERSION}.hpux11.depot dejagnu; \
133 gzip -9fv $$here/dejagnu-${VERSION}.hpux11.depot; \
136 overview.html overview.ps overview.pdf install-doc:
137 cd doc && $(MAKE) $(FLAGS_TO_PASS) $@
139 # Automake sucks when it comes to building a distribution, so
140 # we just copy the source tree onto of what Automake did, and
141 # then we Clean it. Automake only includes the source files.
142 # We want all the testsuites, data files, and html versions of the doc.
143 dist-hook: rpmspec overview.html overview.ps overview.pdf
145 cp -fpr $(srcdir) $(distdir)
146 (cd $(distdir) ; $(TCLSH) $(srcdir)/Clean.tcl)
147 -cp -fr doc/html $(distdir)/doc/
148 -cp -fr doc/overview.ps $(distdir)/doc/
149 -cp -fr doc/overview.pdf $(distdir)/doc/
152 # Below, host-independent data files that need to get installed.
153 # We do it this way so we can use globbing.
155 lib_dest = $(DESTDIR)$(pkgdatadir)
156 lib_files = $(srcdir)/*.c $(srcdir)/lib/*.exp
158 baseboards_dest = $(DESTDIR)$(pkgdatadir)/baseboards
159 baseboards_files = $(srcdir)/baseboards/README $(srcdir)/baseboards/*.exp
161 config_dest = $(DESTDIR)$(pkgdatadir)/config
162 config_files = $(srcdir)/config/README $(srcdir)/config/*.exp
165 $(mkinstalldirs) $(lib_dest) $(includedir)
166 for f in $(lib_files); do \
167 test ! -f "$$f" || $(INSTALL_DATA) $$f $(lib_dest); \
169 $(mkinstalldirs) $(baseboards_dest)
170 for f in $(baseboards_files); do \
171 test ! -f "$$f" || $(INSTALL_DATA) $$f $(baseboards_dest); \
173 $(INSTALL_DATA) $(srcdir)/dejagnu.h $(includedir); \
174 $(mkinstalldirs) $(config_dest)
175 for f in $(config_files); do \
176 test ! -f "$$f" || $(INSTALL_DATA) $$f $(config_dest); \
180 for f in $(lib_files); do \
181 test ! -f "$$f" || rm -f $(lib_dest)/`basename "$$f"`; \
183 for f in $(config_files); do \
184 test ! -f "$$f" || rm -f $(config_dest)/`basename "$$f"`; \
186 for f in $(baseboards_files); do \
187 test ! -f "$$f" || rm -f $(baseboards_dest)/`basename "$$f"`; \
190 for f in $(baseboards_files); do \
191 test ! -f "$$f" || rm -f $(baseboards_dest)/`basename "$$f"`; \
193 rm -f $(includedir)/dejagnu.h;
196 @echo 'Making a new site.exp file...'
197 @test ! -f site.bak || rm -f site.bak
198 @echo '## these variables are automatically generated by make ##' > $@-t
199 @echo '# Do not edit here. If you wish to override these values' >> $-t
200 @echo '# edit the last section' >> $@-t
201 @echo 'set srcdir $(srcdir)' >> $@-t
202 @echo 'set objdir' `pwd` >> $@-t
203 @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
204 @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
205 @test ! -f site.exp || mv site.exp site.bak