Tuesday, July 5, 2011

dejagnu up and running

trying to follow this:
http://www.gnu.org/software/dejagnu/manual/x199.html

tl;dr


dginn% adduser dgt
dginn% sudo su dgt
dgt@dginn:/home/ozzloy$ cd
dgt@dginn:~$ cp .bashrc .bashrc_old
dgt@dginn:~$ vim .bashrc
dgt@dginn:~$ diff -u .bashrc_old .bashrc
--- .bashrc_old 2011-07-05 20:48:12.213693305 -0700
+++ .bashrc 2011-07-05 20:49:43.243826829 -0700
@@ -102,3 +102,5 @@
. /etc/bash_completion
fi

+PS1="\u:\w\$ "
+
dgt@dginn:~$ exit
exit
dginn% sudo su dgt
dgt:/home/ozzloy$ cd
dgt:~$ mkdir dejagnu.test
dgt:~$ cd !$
cd dejagnu.test
dgt:~/dejagnu.test$ cp -r /usr/share/doc/dejagnu/examples/calc/\
{configure.in,Makefile.am,calc.c,testsuite} . # from 3.2.2

dgt:~/dejagnu.test$ aclocal
dgt:~/dejagnu.test$ autoconf
dgt:~/dejagnu.test$ autoheader
dgt:~/dejagnu.test$ cp Makefile.am Makefile.am_old
dgt:~/dejagnu.test$ vim Makefile.am
dgt:~/dejagnu.test$ diff -u Makefile.am_old Makefile.am # note that this differs from section 3.2.2
--- Makefile.am_old 2011-07-05 21:11:44.795765132 -0700
+++ Makefile.am 2011-07-05 21:17:20.026256810 -0700
@@ -18,7 +18,8 @@
AUTOMAKE_OPTIONS = dejagnu

check_PROGRAMS = calc
+bin_PROGRAMS = calc
calc_SOURCES = calc.c

EXTRA_DIST = testsuite/calc.test/calc.exp testsuite/config/unix.exp calc.1
-RUNTESTDEFAULTFLAGS = --tool calc CALC=`pwd`/calc --srcdir $$srcdir/testsuite
+RUNTESTDEFAULTFLAGS = --tool calc CALC=`pwd`/calc --srcdir ./testsuite

dgt:~/dejagnu.test$ touch NEWS README AUTHORS ChangeLog # run this and the next before automake --add-missing
dgt:~/dejagnu.test$ mkdir doc # to avoid "config.status: error: cannot find input file: `Makefile.in'" when running ./configure
dgt:~/dejagnu.test$ automake --add-missing
Makefile.am: installing `./INSTALL'
Makefile.am: installing `./COPYING' using GNU General Public License v3 file
Makefile.am: Consider adding the COPYING file to the version control system
Makefile.am: for your code, to avoid questions about which license your project uses.
Makefile.am: installing `./depcomp'
dgt:~/dejagnu.test$ ls
aclocal.m4 calc.h.in COPYING install-sh missing
AUTHORS ChangeLog depcomp Makefile.am NEWS
autom4te.cache configure doc Makefile.am_old README
calc.c configure.in INSTALL Makefile.in testsuite
# note the presence of Makefile.in. this file is only added by automake --add-missing
# if the files NEWS README AUTHORS ChangeLog and doc/ exist
dgt:~/dejagnu.test$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for strcmp... yes
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating calc.h
config.status: calc.h is unchanged
config.status: executing depfiles commands
# note lack of "config.status: error: cannot find input file: `Makefile.in'"
dgt:~/dejagnu.test$ make
make all-am
make[1]: Entering directory `/home/dgt/dejagnu.test'
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT calc.o -MD -MP -MF .deps/calc.Tpo -c -o calc.o calc.c
mv -f .deps/calc.Tpo .deps/calc.Po
gcc -g -O2 -o calc calc.o
make[1]: Leaving directory `/home/dgt/dejagnu.test'

No comments:

Post a Comment

Where am I?