# Generated automatically from Makefile.in by configure. SHELL= /bin/sh srcdir=. prefix=/usr/local exec_prefix=${prefix} BINDIR=$(exec_prefix)/bin LIBDIR=$(exec_prefix)/lib INCDIR=$(prefix)/include MANDIR=$(prefix)/man CC= cc OPTIM= -g -O CFLAGS= -fno-common -I. -I$(srcdir) -I$(INCDIR) LIBS= -L$(LIBDIR) -lutf OBJS= ssam.o main.o EXE= ssam INSTALL= /usr/bin/install -c -o root -g wheel INSTALL_DATA= install -o root -g wheel -m 444 RANLIB= ranlib $(EXE) : $(OBJS) $(CC) $(OBJS) $(LIBS) -o $(EXE) tst: $(EXE) test -d tests || ln -s $(srcdir)/tests . @echo "No news is good news..." @echo "1. Multiple changes, parsing space" @./$(EXE) ', x/include/ c/import/' < tests/test.in > 1.out -@diff tests/1.exp 1.out @echo "2. Testing delimiter parsing, no space" @./$(EXE) ',x:\.:c|DOT|' < tests/test.in > 2.out -@diff tests/2.exp 2.out @echo "3. Testing insertion" @./$(EXE) ', x/\./ a/DOT./' < tests/test.in > 3.out -@diff tests/3.exp 3.out @echo "4. Testing 'y' cmd" @./$(EXE) ', y/include/ c/other stuff/' < tests/test.in > 4.out -@diff tests/4.exp 4.out @echo "5. Testing 's' cmd" @./$(EXE) ', s/(agc)\.h/\1\1\1.H/' < tests/test.in > 5.out -@diff tests/5.exp 5.out @echo "6. Testing address ranges" @./$(EXE) '#10,#255 s/agc/AGC/' < tests/test.in > 6.out -@diff tests/6.exp 6.out @echo "7. Testing 'm' cmd" @./$(EXE) '#10,#20 m #30' < tests/test.in > 7.out -@diff tests/7.exp 7.out @echo "8. Testing 'w' cmd, and file manipulation" @cp tests/test.in tests/8.exp @./$(EXE) -w ', x/agc/ c/AGC/ w' tests/8.exp @./$(EXE) ',x/agc/c/AGC/' < tests/test.in > 8.out -@diff tests/8.exp 8.out @echo "9. Testing -n arg, and 'p' cmd" @./$(EXE) -n '0,5p' < tests/test.in > 9.out -@diff tests/9.exp 9.out @echo "10. Testing relative addresses and eqcmd" @./$(EXE) -n ', x/include/ { +- = p }' < tests/test.in > A.out -@diff tests/A.exp A.out @echo "11. Testing UTF searching" @./$(EXE) -n ', x/J\u00f6/ { +- = p }' < tests/B.in > B.out -@diff tests/B.exp B.out @echo "12. Testing UTF searching with set collation sequence" @./$(EXE) -a Deutsch -n ', x/J[a-z]rg/ { +- = p }' < tests/B.in > C.out -@diff tests/C.exp C.out @echo "13. Testing NULL file name" @./$(EXE) 'X/col/p' < tests/test.in > D.out -@diff tests/D.exp D.out @echo "14. Testing ure /^/ special case" @./$(EXE) ', x/^/ i/> /' < tests/test.in > E.out -@diff tests/E.exp E.out @echo "15. Testing complex command (from bkonarski@calibersys.com)" @./$(EXE) ',x/Last.+/{x/modified/c/Modified/}' < tests/F.in > F.out -@diff tests/F.exp F.out @echo "16. Testing append command (from tony@cs.jcu.edu.au)" @./$(EXE) ',x/col/a/XXX/' < tests/G.in > G.out -@diff tests/G.exp G.out @echo "17. Testing change command (from tony@cs.jcu.edu.au)" @./$(EXE) ',x/col/c/XXX/' < tests/G.in > H.out -@diff tests/H.exp H.out @echo "18. Testing even more complex command (from bkonarski@calibersys.com)" @./$(EXE) ',x/Last.+/{x/modified/c/Modified/x/reviewed/c/revieweD/}' < tests/F.in > I.out -@diff tests/I.exp I.out @echo "19. Testing simple file initialisation and searching" @./$(EXE) -n ', x/include/ +-' < tests/test.in > J.out -@diff tests/J.exp J.out @echo "20. Testing escaped separators in UTF regexps" @./$(EXE) -n ', x/include.+\// +-' < tests/test.in > K.out -@diff tests/K.exp K.out @echo "21. Removing blank lines from a file" -@./$(EXE) ', x/^\n/ d' < tests/L.in > L.out -@diff tests/L.exp L.out @echo "22. Testing interpreted escape sequences in arguments" @./$(EXE) ', x/\n\n/ c/Alistair\n(But this is OK \\n)/' < tests/L.in > M.out -@diff tests/M.exp M.out @echo "23. Testing -f arg - taking commands from a file" @./$(EXE) -n -f tests/N.in < tests/test.in > N.out -@diff tests/N.exp N.out @echo "24. Testing byte offsets" @./$(EXE) -b -n ', x/J\u00f6/ { +- = p }' < tests/B.in > O.out -@diff tests/O.exp O.out @echo "25. Testing multiple complex address handling" @./$(EXE) -n '$$-/#include/, p' < tests/test.in > P.out -@diff tests/P.exp P.out @echo "26. Testing straightforward search" @./$(EXE) -n '/agc\.h/, p' < tests/test.in > Q.out -@diff tests/Q.exp Q.out @echo "27. Testing default p command" @./$(EXE) -n '$$-/#include/,' < tests/test.in > R.out -@diff tests/R.exp R.out @echo "28. Testing explanation code" @./$(EXE) -x '$$-/#include/,' tests/test.in > S.out -@diff tests/S.exp S.out @echo "29. Testing multiple inter-related changes (from alan@oldp.nmsu.edu)" @./$(EXE) ', x/a/d , x/b/d' < tests/T.in > T.out -@diff tests/T.exp T.out @echo "30. Testing nul-byte terminated pattern (from byron@netapp.com)" @./$(EXE) ', x/include/ c/INCLUDE' < tests/test.in > U.out -@diff tests/U.exp U.out @echo "31. Testing default p in a block" @./$(EXE) -x 'X/.*/ { , x/include/ +- }' ssam.[ch] > V.out -@diff tests/V.exp V.out @echo "32. Testing looping over files" @./$(EXE) 'X/.*/ { , x/include/ +- }' ssam.[ch] > W.out -@diff tests/W.exp W.out @echo "33. Testing nested blocks" @./$(EXE) 'X/\.[ch]/ { , x/include/ { = +- } }' ssam.[ch] > X.out -@diff tests/X.exp X.out @echo "34. Testing non-nl-terminated input (from Bengt Kleberg )" @./$(EXE) ', x/./ c/1/' < tests/Y.in > Y.out -@diff tests/Y.exp Y.out @echo "35. Testing newline recognition" @./$(EXE) ', x/^/ i/> /' < tests/Z.in > Z.out -@diff tests/Z.exp Z.out @echo "36. Testing +- at EOF" @./$(EXE) ', x/^/ i/> / +-' < tests/Z.in > a.out -@diff tests/a.exp a.out @echo "37. Testing UTF char offsets and regexps" @./$(EXE) ', x/^/ i/> / +-' < tests/b.in > b.out -@diff tests/b.exp b.out @echo "Testing error conditions" @echo "E1. Testing non-existent file" -@./$(EXE) -n ', x/include/ +-' test.in > E1.out 2>&1 -@diff tests/E1.exp E1.out @echo "E2. Testing block overflow" -@./$(EXE) ', x/include/ {{}' < tests/test.in > E2.out 2>&1 -@diff tests/E2.exp E2.out @echo "E3. Testing block underflow" -@./$(EXE) ', x/include/ {}}' < tests/test.in > E3.out 2>&1 -@diff tests/E3.exp E3.out @echo "E4. Testing unterminated search expression" -@./$(EXE) ', x/include +-' < tests/test.in > E4.out 2>&1 -@diff tests/E4.exp E4.out @echo "E5. Testing unknown command" -@./$(EXE) ', ?/include/ +-' < tests/test.in > E5.out 2>&1 -@diff tests/E5.exp E5.out @echo "Removing temporary files" @rm -f 1.out 2.out 3.out 4.out 5.out 6.out 7.out 8.out tests/8.exp @rm -f 9.out A.out B.out C.out D.out E.out F.out G.out H.out I.out @rm -f J.out K.out L.out M.out N.out O.out P.out Q.out R.out S.out @rm -f T.out U.out V.out W.out X.out Y.out Z.out a.out b.out @rm -f E1.out E2.out E3.out E4.out E5.out clean: rm -f *.out $(EXE) $(OBJS) distclean: make clean rm -f config.cache config.log config.status Makefile config.h install: $(srcdir)/mkinstalldirs $(BINDIR) $(MANDIR)/man1/ $(INSTALL) ssam $(BINDIR) $(INSTALL_DATA) $(srcdir)/ssam.1 $(MANDIR)/man1/ ci: ci -l ssam.c main.c agc.h ssam.h config.h.in Makefile.in configure.in ssam.1