~ubuntu-branches/ubuntu/karmic/dejagnu/karmic

« back to all changes in this revision

Viewing changes to Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Jacobowitz
  • Date: 2006-12-11 09:06:59 UTC
  • mfrom: (2.1.6 edgy)
  • Revision ID: james.westby@ubuntu.com-20061211090659-w586kgi3giz84053
Tags: 1.4.4.cvs20060709-3
* Acknowledge previous NMUs.
* Fix permissions on /usr/share/dejagnu when building without fakeroot
  (Closes: #392589, #379809).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
AUTOMAKE_OPTIONS = dejagnu
4
4
 
5
 
# Install all the associated data files
6
 
SUBDIRS = doc # testsuite example
 
5
EXTRA_DIST = ChangeLog.0 MAINTAINERS runtest site.tmpl \
 
6
        $(pkgdata_DATA) $(pkgdata_SCRIPTS) \
 
7
        $(config_DATA) $(config_SCRIPTS) \
 
8
        $(baseboard_DATA) $(baseboard_SCRIPTS) \
 
9
        $(TESTSUITE_FILES) $(XML) $(CONTRIB)
7
10
 
8
 
# Install the bourne shell script driver in the bindir
9
11
bin_SCRIPTS = runtest
10
 
 
11
 
# Install the main DejaGnu expect file in the datadir
12
 
pkgdata_SCRIPTS = runtest.exp
13
 
 
14
 
# Install config.guess too, so we can use it to figure out what type
15
 
# of machine we're running on.
16
 
libexecdir = $(pkgdatadir)/libexec
17
 
libexec_SCRIPTS = config.guess
18
 
 
19
 
DATE = `date "+%Y%m%d`
20
 
 
21
 
TLCSH = @TCLSH@
22
 
PKGDIR = /opt
23
 
 
24
 
RUNTESTDEFAULTFLAGS = --srcdir $(srcdir)/testsuite RUNTEST=$(RUNTEST)
25
 
RUNTEST = ` \
26
 
  if [ -f ${srcdir}/runtest$(EXEEXT) ] ; then \
27
 
    echo ${srcdir}/runtest$(EXEEXT); \
28
 
  else echo "ERROR: runtest not found" ; exit 1; fi`
29
 
 
30
 
CLEANFILES = x.log x.sum site.bak setval.tmp
31
 
check-DEJAGNU:
32
 
        cd testsuite ; $(MAKE) check
33
 
        cd example ; $(MAKE) check
34
 
 
35
 
# Since we don't use SUBDIRS, we have to manually clean the
36
 
# subdirectories. We don't use SUBDIRS, so the example or test cases
37
 
# don't get built by default for a "make all".
38
 
clean-local:
39
 
        cd doc       ; $(MAKE) clean
40
 
        cd testsuite ; $(MAKE) clean
41
 
        cd example   ; $(MAKE) clean
42
 
 
43
 
# Set ourselves up to build an RPM
44
 
tarball: book1.html overview.ps overview.pdf
45
 
        -rm -fr dejagnu-${VERSION}
46
 
        cp -fpPR $(srcdir) dejagnu-${VERSION}
47
 
        src=$(srcdir); \
48
 
        dir=`(cd $${src}; pwd)`; \
49
 
        (cd dejagnu-${VERSION} ; $${dir}/Clean.tcl); \
50
 
          cp -R $(srcdir)/doc/html dejagnu-${VERSION}/doc/; \
51
 
          cp $(srcdir)/doc/overview.ps dejagnu-${VERSION}/doc/; \
52
 
          cp $(srcdir)/doc/overview.pdf dejagnu-${VERSION}/doc/; \
53
 
          cp $(srcdir)/doc/overview.rtf dejagnu-${VERSION}/doc/; \
54
 
          tar cvf ../dejagnu-${VERSION}.tar dejagnu-${VERSION}; \
55
 
          gzip -9fv ../dejagnu-${VERSION}.tar
56
 
 
57
 
rpmspec: $(srcdir)/packaging/rpm/dejagnu.spec
 
12
include_HEADERS = dejagnu.h
 
13
 
 
14
pkgdata_SCRIPTS = \
 
15
  runtest.exp \
 
16
  lib/debugger.exp lib/dejagnu.exp lib/dg.exp lib/framework.exp \
 
17
  lib/ftp.exp lib/kermit.exp lib/libgloss.exp lib/remote.exp \
 
18
  lib/rlogin.exp lib/rsh.exp lib/standard.exp lib/target.exp \
 
19
  lib/targetdb.exp lib/telnet.exp lib/tip.exp lib/utils.exp
 
20
 
 
21
configdir = $(pkgdatadir)/config
 
22
config_DATA = config/README
 
23
config_SCRIPTS = \
 
24
        config/arc.exp \
 
25
        config/arm-ice.exp \
 
26
        config/base-config.exp \
 
27
        config/base68k.exp \
 
28
        config/bug.exp \
 
29
        config/cfdbug.exp \
 
30
        config/cygmon.exp \
 
31
        config/d10v.exp \
 
32
        config/ddb-ether.exp \
 
33
        config/ddb.exp \
 
34
        config/default.exp \
 
35
        config/dos.exp \
 
36
        config/dve.exp \
 
37
        config/gdb-comm.exp \
 
38
        config/gdb_stub.exp \
 
39
        config/h8300.exp \
 
40
        config/i386-bozo.exp \
 
41
        config/i960.exp \
 
42
        config/m32r-stub.exp \
 
43
        config/m32r.exp \
 
44
        config/m68hc11.exp \
 
45
        config/m68k-emc.exp \
 
46
        config/mips-idt.exp \
 
47
        config/mn10200-eval.exp \
 
48
        config/mn10300-eval.exp \
 
49
        config/netware.exp \
 
50
        config/powerpc-bug.exp \
 
51
        config/proelf.exp \
 
52
        config/rom68k.exp \
 
53
        config/sh.exp \
 
54
        config/sid.exp \
 
55
        config/sim.exp \
 
56
        config/slite.exp \
 
57
        config/sparclet.exp \
 
58
        config/tic80.exp \
 
59
        config/unix.exp \
 
60
        config/vr4100.exp \
 
61
        config/vr4300.exp \
 
62
        config/vr5000.exp \
 
63
        config/vxworks.exp
 
64
 
 
65
baseboarddir = $(pkgdatadir)/baseboards
 
66
baseboard_DATA = baseboards/README
 
67
baseboard_SCRIPTS = \
 
68
        baseboards/am33_2.0-libremote.exp \
 
69
        baseboards/arc-sim.exp \
 
70
        baseboards/arm-ice.exp \
 
71
        baseboards/arm-sid.exp \
 
72
        baseboards/arm-sim.exp \
 
73
        baseboards/basic-sid.exp \
 
74
        baseboards/basic-sim.exp \
 
75
        baseboards/cf.exp \
 
76
        baseboards/cygmon.exp \
 
77
        baseboards/cygwin.exp \
 
78
        baseboards/d10v-sim.exp \
 
79
        baseboards/d10v.exp \
 
80
        baseboards/d30v-sim.exp \
 
81
        baseboards/danlite-elf.exp \
 
82
        baseboards/dos.exp \
 
83
        baseboards/fr30-cygmon.exp \
 
84
        baseboards/fr30-elf.exp \
 
85
        baseboards/fr30-sim.exp \
 
86
        baseboards/frv-elf.exp \
 
87
        baseboards/frv-sim.exp \
 
88
        baseboards/frv-tiger.exp \
 
89
        baseboards/frv-tomcat.exp \
 
90
        baseboards/gdbserver-sample.exp \
 
91
        baseboards/h8300-sim.exp \
 
92
        baseboards/h8300.exp \
 
93
        baseboards/i386-bozo.exp \
 
94
        baseboards/i386-sid.exp \
 
95
        baseboards/i960-cyclone.exp \
 
96
        baseboards/i960-sim.exp \
 
97
        baseboards/jmr3904-sim.exp \
 
98
        baseboards/linux-gdbserver.exp \
 
99
        baseboards/linux-libremote.exp \
 
100
        baseboards/m32r-elf.exp \
 
101
        baseboards/m32r-sid.exp \
 
102
        baseboards/m32r-sim.exp \
 
103
        baseboards/m68hc11-sim.exp \
 
104
        baseboards/m68k-emc.exp \
 
105
        baseboards/m68k-sid.exp \
 
106
        baseboards/mcore-elf.exp \
 
107
        baseboards/mcore-moto-sim.exp \
 
108
        baseboards/mcore-pe.exp \
 
109
        baseboards/mcore-sim.exp \
 
110
        baseboards/mips-idt.exp \
 
111
        baseboards/mips-lnews-sim.exp \
 
112
        baseboards/mips-lsi-sim.exp \
 
113
        baseboards/mips-sim-idt32.exp \
 
114
        baseboards/mips-sim-idt64.exp \
 
115
        baseboards/mips-sim.exp \
 
116
        baseboards/mips64-sim.exp \
 
117
        baseboards/mips64vr4100-sim.exp \
 
118
        baseboards/mmixware-sim.exp \
 
119
        baseboards/mn10200-cygmon.exp \
 
120
        baseboards/mn10200-sim.exp \
 
121
        baseboards/mn10300-cygmon.exp \
 
122
        baseboards/mn10300-sim.exp \
 
123
        baseboards/msparc-cygmon.exp \
 
124
        baseboards/mt-sid.exp \
 
125
        baseboards/op50n.exp \
 
126
        baseboards/powerpc-bug.exp \
 
127
        baseboards/powerpc-bug1.exp \
 
128
        baseboards/powerpc-sim.exp \
 
129
        baseboards/powerpcle-sim.exp \
 
130
        baseboards/rom68k-idp.exp \
 
131
        baseboards/sh-hms.exp \
 
132
        baseboards/sh-sid.exp \
 
133
        baseboards/sh-sim.exp \
 
134
        baseboards/sparc-sim.exp \
 
135
        baseboards/sparc64-sim.exp \
 
136
        baseboards/sparclet-aout.exp \
 
137
        baseboards/sparclite-coff.exp \
 
138
        baseboards/sparclite-cygmon.exp \
 
139
        baseboards/sparclite-sim-le.exp \
 
140
        baseboards/sparclite-sim.exp \
 
141
        baseboards/strongarm-cygmon.exp \
 
142
        baseboards/tic80-sim.exp \
 
143
        baseboards/tx39-dve.exp \
 
144
        baseboards/tx39-sim.exp \
 
145
        baseboards/unix.exp \
 
146
        baseboards/usparc-cygmon.exp \
 
147
        baseboards/v850-sim.exp \
 
148
        baseboards/vr4100-ddb.exp \
 
149
        baseboards/vr4100-sim.exp \
 
150
        baseboards/vr4111-sim.exp \
 
151
        baseboards/vr4300-ddb.exp \
 
152
        baseboards/vr4300-sim.exp \
 
153
        baseboards/vr4300.exp \
 
154
        baseboards/vr5000-ddb.exp \
 
155
        baseboards/vx4300.exp \
 
156
        baseboards/vx68k.exp \
 
157
        baseboards/vx960.exp \
 
158
        baseboards/vxsparc.exp \
 
159
        baseboards/x86-cygmon.exp \
 
160
        baseboards/xscale-cygmon.exp \
 
161
        baseboards/xtensa-sim.exp
 
162
 
 
163
pkgdata_DATA = stub-loader.c testglue.c
 
164
 
 
165
djlibexecdir = $(pkgdatadir)/libexec
 
166
djlibexec_SCRIPTS = config.guess
 
167
 
 
168
# Contributed scripts, etc.
 
169
 
 
170
CONTRIB = contrib/compare_tests
 
171
 
 
172
# Testsuite.
 
173
 
 
174
TESTSUITE_FILES = \
 
175
        testsuite/runtest.all/topdir/subdir1/subsubdir1/subsubfile1 \
 
176
        testsuite/runtest.all/topdir/subdir1/subfile1 \
 
177
        testsuite/runtest.all/topdir/subdir1/subfile2 \
 
178
        testsuite/runtest.all/topdir/subdir2/subfile2 \
 
179
        testsuite/runtest.all/libs.exp \
 
180
        testsuite/runtest.all/options.exp \
 
181
        testsuite/runtest.all/remote.test \
 
182
        testsuite/runtest.all/stats-sub.exp \
 
183
        testsuite/runtest.all/stats.exp \
 
184
        testsuite/runtest.all/target.test \
 
185
        testsuite/runtest.all/utils.test \
 
186
        testsuite/runtest.all/clone_output.test \
 
187
        testsuite/runtest.all/config.test \
 
188
        testsuite/runtest.all/default_procs.tcl \
 
189
        testsuite/config/default.exp \
 
190
        testsuite/lib/libsup.exp \
 
191
        testsuite/lib/util-defs.exp \
 
192
        testsuite/libdejagnu/tunit.exp
 
193
 
 
194
RUNTEST = ${top_srcdir}/runtest
 
195
RUNTESTDEFAULTFLAGS = --srcdir $(srcdir)/testsuite
 
196
 
 
197
AM_CXXFLAGS = -I$(top_srcdir) -g
 
198
check_PROGRAMS = unit
 
199
unit_SOURCES = testsuite/libdejagnu/unit.cc
 
200
 
 
201
# Documentation.
 
202
 
 
203
dist_man_MANS = doc/runtest.1
 
204
info_TEXINFOS = doc/dejagnu.texi
 
205
 
 
206
DOCBOOK2PDF = @DOCBOOK2PDF@
 
207
DOCBOOK2RTF= = @DOCBOOK2RTF@
 
208
DOCBOOK2PS = @DOCBOOK2PS@
 
209
DOCBOOK2HTML = @DOCBOOK2HTML@
 
210
DOCBOOK2TEXI = @DOCBOOK2TEXI@
 
211
 
 
212
XML = doc/dejagnu.xml doc/legal.xml doc/ref.xml doc/user.xml
 
213
 
 
214
dejagnu.pdf: $(XML)
 
215
        $(DOCBOOK2PDF) $(srcdir)/doc/dejagnu.xml
 
216
 
 
217
dejagnu.ps: $(XML)
 
218
        $(DOCBOOK2PS) $(srcdir)/doc/dejagnu.xml
 
219
 
 
220
dejagnu.rtf: $(XML)
 
221
        $(DOCBOOK2RTF) $(srcdir)/doc/dejagnu.xml
 
222
 
 
223
html:
 
224
        $(DOCBOOK2HTML) -o html $(srcdir)/doc/dejagnu.xml
 
225
 
 
226
doc/dejagnu.texi: $(XML)
 
227
        $(DOCBOOK2TEXI) --string-param directory-description="The GNU testing framework." --string-param directory-category="Programming" $(srcdir)/doc/dejagnu.xml
 
228
        mv dejagnu.texi $(srcdir)/doc
 
229
 
 
230
# Packaging.
 
231
 
 
232
# RPM
 
233
rpm: dist $(srcdir)/packaging/rpm/dejagnu.spec
58
234
        cp -f $(srcdir)/packaging/rpm/dejagnu.spec /usr/src/redhat/SPECS/
59
 
 
60
 
# Build an RPM package
61
 
rpm: tarball rpmspec
62
 
        cp -f ../dejagnu-${VERSION}.tar.gz /usr/src/redhat/SOURCES/
 
235
        cp -f dejagnu-${VERSION}.tar.gz /usr/src/redhat/SOURCES/
63
236
        rpm -ba /usr/src/redhat/SPECS/dejagnu.spec
64
237
 
65
 
# Build a Debian deb package
66
 
deb: book1.html overview.ps overview.pdf
67
 
        -rm -fr dejagnu-${VERSION}
68
 
        cp -fpr $(srcdir) dejagnu-${VERSION}
69
 
        @echo "clean up stuff we don't want in the source file"
70
 
        src=$(srcdir); \
71
 
        dir=`(cd $${src}; pwd)`; \
72
 
        (cd dejagnu-${VERSION} ; $${dir}/Clean.tcl);
73
 
        -mkdir -p doc/html;
74
 
        -cp -fr $(srcdir)/packaging/deb dejagnu-${VERSION}/
75
 
        -cp -fr doc/html dejagnu-${VERSION}/doc/;
76
 
        -cp -fr doc/overview.ps dejagnu-${VERSION}/doc/;
77
 
        -cp -fr doc/overview.pdf dejagnu-${VERSION}/doc/;
78
 
        -cp -fr doc/overview.rtf dejagnu-${VERSION}/doc/;
 
238
# Debian GNU/Linux package
 
239
deb: dist
 
240
        rm -rf dejagnu-${VERSION}
 
241
        tar xfz dejagnu-${VERSION}.tar.gz
 
242
        cp -fr $(srcdir)/packaging/deb dejagnu-${VERSION}/
79
243
        (cd dejagnu-${VERSION}; dpkg-buildpackage)
80
244
 
81
 
# Build a Solaris package
82
 
solpkg: $(srcdir)/packaging/pkg/prototype
83
 
        if test ! -d $(PKGDIR)/dejagnu; then \
84
 
          rm -fr dejagnu-${VERSION}; \
85
 
          mkdir dejagnu-${VERSION}; \
86
 
          cd dejagnu-${VERSION}; \
87
 
          $(srcdir)/configure -v --prefix $(PKGDIR)/dejagnu; \
88
 
          make install ; \
89
 
        fi
 
245
# Most proprietary Unices use /opt for optional packages.
 
246
PKGDIR = /opt
 
247
 
 
248
$(PKGDIR)/dejagnu:
 
249
        rm -rf dejagnu-${VERSION}
 
250
        mkdir dejagnu-${VERSION}
 
251
        cd dejagnu-${VERSION}
 
252
        $(srcdir)/configure -v --prefix $@
 
253
        make install
 
254
 
 
255
# Solaris package
 
256
solpkg: $(PKGDIR)/dejagnu
90
257
        cp $(srcdir)/packaging/pkg/prototype /tmp
91
258
        cp $(srcdir)/packaging/pkg/pkginfo /tmp
92
259
        here=`pwd`; \
94
261
          pkgmk -o -r / -d /tmp; \
95
262
          tar cf $$here/dejagnu-${VERSION}.SPARC.2.8.pkg.tar DejaGnu; \
96
263
          gzip -9fv  $$here/dejagnu-${VERSION}.SPARC.2.8.pkg.tar
97
 
        rm -fr /tmp/prototype /tmp/pkginfo /tmp/DejaGnu
 
264
        rm -rf /tmp/prototype /tmp/pkginfo /tmp/DejaGnu
98
265
 
99
 
# Build a HP depot package
100
 
hpdepot: # $(srcdir)/packaging/depot/dejagnu.psf
101
 
        if test ! -d $(PKGDIR)/dejagnu; then \
102
 
        rm -fr dejagnu-${VERSION}; \
103
 
        mkdir dejagnu-${VERSION}; \
104
 
        cd dejagnu-${VERSION}; \
105
 
        $(srcdir)/configure -v --prefix $(PKGDIR)/dejagnu; \
106
 
        make install ; \
107
 
        fi
 
266
# HP depot package
 
267
hpdepot: $(PKGDIR)/dejagnu
108
268
        swpackage -s $(srcdir)/packaging/depot/dejagnu.psf -x target_type=directory -d /tmp
109
269
        here=`pwd`; \
110
 
        cd /tmp; \
111
 
        tar cf $$here/dejagnu-${VERSION}.hpux11.depot dejagnu; \
112
 
        gzip -9fv  $$here/dejagnu-${VERSION}.hpux11.depot; \
113
 
        rm -fr /tmp/dejagnu
114
 
 
115
 
book1.html overview.ps overview.pdf install-doc:
116
 
        cd doc && $(MAKE) $(FLAGS_TO_PASS) $@
117
 
 
118
 
# Automake sucks when it comes to building a distribution, so
119
 
# we just copy the source tree onto of what Automake did, and
120
 
# then we Clean it. Automake only includes the source files.
121
 
# We want all the testsuites, data files, and html versions of the doc.
122
 
dist-hook: rpmspec book1.html overview.ps overview.pdf
123
 
        -rm -fr $(distdir)
124
 
        cp -fpr $(srcdir) $(distdir)
125
 
        (cd $(distdir) ; $(TCLSH) $(srcdir)/Clean.tcl)
126
 
        -cp -fr doc/html $(distdir)/doc/
127
 
        -cp -fr doc/overview.ps $(distdir)/doc/
128
 
        -cp -fr doc/overview.pdf $(distdir)/doc/
129
 
 
130
 
# Below, host-independent data files that need to get installed.
131
 
# We do it this way so we can use globbing.
132
 
 
133
 
lib_dest = $(DESTDIR)$(pkgdatadir)
134
 
lib_files = $(srcdir)/*.c $(srcdir)/lib/*.exp
135
 
 
136
 
baseboards_dest = $(DESTDIR)$(pkgdatadir)/baseboards
137
 
baseboards_files = $(srcdir)/baseboards/README $(srcdir)/baseboards/*.exp
138
 
 
139
 
include_dest = $(DESTDIR)$(includedir)
140
 
config_dest = $(DESTDIR)$(pkgdatadir)/config
141
 
config_files = $(srcdir)/config/README $(srcdir)/config/*.exp
142
 
 
143
 
install-data-local:
144
 
        $(mkinstalldirs) $(lib_dest) $(include_dest)
145
 
        for f in $(lib_files); do \
146
 
          test ! -f "$$f" || $(INSTALL_DATA) $$f $(lib_dest); \
147
 
        done
148
 
        $(mkinstalldirs) $(baseboards_dest)
149
 
        for f in $(baseboards_files); do \
150
 
          test ! -f "$$f" || $(INSTALL_DATA) $$f $(baseboards_dest); \
151
 
        done
152
 
        $(INSTALL_DATA) $(srcdir)/dejagnu.h $(include_dest); \
153
 
        $(mkinstalldirs) $(config_dest)
154
 
        for f in $(config_files); do \
155
 
          test ! -f "$$f" || $(INSTALL_DATA) $$f $(config_dest); \
156
 
        done
157
 
 
158
 
uninstall-local:
159
 
        for f in $(lib_files); do \
160
 
          test ! -f "$$f" || rm -f $(lib_dest)/`basename "$$f"`; \
161
 
        done
162
 
        for f in $(config_files); do \
163
 
          test ! -f "$$f" || rm -f $(config_dest)/`basename "$$f"`; \
164
 
        done
165
 
        for f in $(baseboards_files); do \
166
 
          test ! -f "$$f" || rm -f $(baseboards_dest)/`basename "$$f"`; \
167
 
        done
168
 
 
169
 
        for f in $(baseboards_files); do \
170
 
          test ! -f "$$f" || rm -f $(baseboards_dest)/`basename "$$f"`; \
171
 
        done
172
 
        rm -f $(include_dest)/dejagnu.h;
173
 
 
174
 
site.exp: Makefile
175
 
        @echo 'Making a new site.exp file...'
176
 
        @test ! -f site.bak || rm -f site.bak
177
 
        @echo '## these variables are automatically generated by make ##' > $@-t
178
 
        @echo '# Do not edit here.  If you wish to override these values' >> $-t
179
 
        @echo '# edit the last section' >> $@-t
180
 
        @echo 'set srcdir $(srcdir)' >> $@-t
181
 
        @echo 'set objdir' `pwd` >> $@-t
182
 
        @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
183
 
        @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t
184
 
        @test ! -f site.exp || mv site.exp site.bak
185
 
        @mv $@-t site.exp
 
270
          cd /tmp; \
 
271
          tar cf $$here/dejagnu-${VERSION}.hpux11.depot dejagnu; \
 
272
          gzip -9fv  $$here/dejagnu-${VERSION}.hpux11.depot; \
 
273
          rm -rf /tmp/dejagnu