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
21 RUNTESTDEFAULTFLAGS = --srcdir $(srcdir)/testsuite RUNTEST=$(RUNTEST)
23 if [ -f ${srcdir}/runtest$(EXEEXT) ] ; then \
24 echo ${srcdir}/runtest$(EXEEXT) ; \
25 else echo "ERROR: runtest not found" ; exit 1; fi`
27 CLEANFILES = x.log x.sum site.bak setval.tmp
29 @echo "Do nothing here, cause we don't want to run the tests twice"
31 # Set ourselves up to build a RedHat package
32 tarball: overview.html overview.ps overview.pdf
33 -rm -fr dejagnu-${VERSION}
34 cp -fpr $(srcdir) dejagnu-${VERSION}
35 @echo "clean up stuff we don't want in the source file"
37 dir=`(cd $${src}; pwd)`; \
38 (cd dejagnu-${VERSION} ; $${dir}/Clean.tcl); \
39 -mkdir -p doc/overview; \
40 -cp -fr doc/overview dejagnu-${VERSION}/doc/; \
41 -cp -fr doc/overview.ps dejagnu-${VERSION}/doc/; \
42 -cp -fr doc/overview.pdf dejagnu-${VERSION}/doc/; \
43 tar cvf ../dejagnu-${VERSION}.tar dejagnu-${VERSION}; \
44 gzip -9fv ../dejagnu-${VERSION}.tar; \
45 cp -f ../dejagnu-${VERSION}.tar.gz /usr/src/redhat/SOURCES/; \
46 cp -f $${dir}/redhat/dejagnu.spec /usr/src/redhat/SPECS/
48 DATE = `date "+%Y%m%d`
50 -rm -fr dejagnu-${DATE}
51 cp -fpr $(srcdir) dejagnu-${DATE}
52 @echo "clean up stuff we don't want in the source file"
54 dir=`(cd $${src}; pwd)`; \
55 (cd dejagnu-${DATE} ; $${dir}/Clean.tcl);
56 -mkdir -p doc/overview
57 -cp -fr doc/overview dejagnu-${DATE}/doc/
58 -cp -fr doc/overview.ps dejagnu-${DATE}/doc/
59 -cp -fr doc/overview.pdf dejagnu-${DATE}/doc/
60 tar cf ../dejagnu-${DATE}.tar dejagnu-${DATE}
61 gzip -9fv ../dejagnu-${DATE}.tar
63 rpmspec: $(srcdir)/redhat/dejagnu.spec
64 cp -f $(srcdir)/redhat/dejagnu.spec /usr/src/redhat/SPECS/
67 cp -f ../$(distdir).tar.gz /usr/src/redhat/SOURCES/
68 rpm -ba /usr/src/redhat/SPECS/dejagnu.spec
70 deb: overview.html overview.ps overview.pdf
71 -rm -fr dejagnu-${VERSION}
72 cp -fpr $(srcdir) dejagnu-${VERSION}
73 @echo "clean up stuff we don't want in the source file"
75 dir=`(cd $${src}; pwd)`; \
76 (cd dejagnu-${VERSION} ; $${dir}/Clean.tcl);
77 -mkdir -p doc/overview;
78 -cp -fr $(srcdir)/debian dejagnu-${VERSION}/;
79 -cp -fr doc/overview dejagnu-${VERSION}/doc/;
80 -cp -fr doc/overview.ps dejagnu-${VERSION}/doc/;
81 -cp -fr doc/overview.pdf dejagnu-${VERSION}/doc/;
82 (cd dejagnu-${VERSION}; dpkg-buildpackage)
84 overview.html overview.ps overview.pdf install-doc:
85 cd doc && $(MAKE) $(FLAGS_TO_PASS) $@
87 # Automake sucks when it comes to building a distribution, so
88 # we just copy the source tree onto of what Automake did, and
89 # then we Clean it. Automake only includes the source files.
90 # We want all the testsuites, data files, and html versions of the doc.
91 dist-hook: rpmspec overview.html overview.ps overview.pdf
93 cp -fpr $(srcdir) $(distdir)
94 (cd $(distdir) ; $(TCLSH) $(srcdir)/Clean.tcl)
95 -cp -fr doc/overview $(distdir)/doc/
96 -cp -fr doc/overview.ps $(distdir)/doc/
97 -cp -fr doc/overview.pdf $(distdir)/doc/
100 # Below, host-independent data files that need to get installed.
101 # We do it this way so we can use globbing.
103 lib_dest = $(DESTDIR)$(pkgdatadir)
104 lib_files = $(srcdir)/*.c $(srcdir)/lib/*.exp
106 baseboards_dest = $(DESTDIR)$(pkgdatadir)/baseboards
107 baseboards_files = $(srcdir)/baseboards/README $(srcdir)/baseboards/*.exp
109 config_dest = $(DESTDIR)$(pkgdatadir)/config
110 config_files = $(srcdir)/config/README $(srcdir)/config/*.exp
113 $(mkinstalldirs) $(lib_dest) $(includedir)
114 for f in $(lib_files); do \
115 test ! -f "$$f" || $(INSTALL_DATA) $$f $(lib_dest); \
118 $(mkinstalldirs) $(baseboards_dest)
119 for f in $(baseboards_files); do \
120 test ! -f "$$f" || $(INSTALL_DATA) $$f $(baseboards_dest); \
123 $(INSTALL_DATA) $(srcdir)/dejagnu.h $(includedir); \
125 $(mkinstalldirs) $(config_dest)
126 for f in $(config_files); do \
127 test ! -f "$$f" || $(INSTALL_DATA) $$f $(config_dest); \
131 for f in $(lib_files); do \
132 test ! -f "$$f" || rm -f $(lib_dest)/`basename "$$f"`; \
134 for f in $(config_files); do \
135 test ! -f "$$f" || rm -f $(config_dest)/`basename "$$f"`; \
137 for f in $(baseboards_files); do \
138 test ! -f "$$f" || rm -f $(baseboards_dest)/`basename "$$f"`; \
141 for f in $(baseboards_files); do \
142 test ! -f "$$f" || rm -f $(baseboards_dest)/`basename "$$f"`; \
144 rm -f $(includedir)/dejagnu.h;
147 @echo 'Making a new site.exp file...'
148 @test ! -f site.bak || rm -f site.bak
149 @echo '## these variables are automatically generated by make ##' > $@-t
150 @echo '# Do not edit here. If you wish to override these values' >> $-t
151 @echo '# edit the last section' >> $@-t
152 @echo 'set srcdir $(srcdir)' >> $@-t
153 @echo 'set objdir' `pwd` >> $@-t
154 @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
155 @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
156 @test ! -f site.exp || mv site.exp site.bak