summaryrefslogblamecommitdiff
path: root/pgm2/makefile
blob: 34863526df9e0a5aa3042e44c57d82db167d03e6 (plain) (tree)






























                                                                          
all:
  gcc -Wall -o rgpp rgpp.c -lm

clean:
  rm rgpp

debug:
  gcc -Wall -g -o rgpp rgpp.c -lm

test:
  gcc -Wall -o rgpp rgpp.c -lm

  # a) [6 pts] Straightforward line mode with a banner and line numbers:
  grep -r -H -n -s -I -i the p2test | ./rgpp -l -b -n

  # b) [7 pts] Straightforward word mode with a banner and line numbers:
  grep -r -H -n -s -I -i the p2test | ./rgpp -w the -b -n

  # c) [4 pts] Dealing with lots of files/hits:
  grep -r -H -n -s -I -i the /usr/share/gutenprint | ./rgpp -l -b > output

  # a) [1 pt] Invalid option (must produce error message):
  grep -r -H -n -s -I -i the p2test | ./rgpp -l -b -k

  # b) [1 pt] Invalid first option (must produce error message):
  grep -r -H -n -s -I -i the p2test | ./rgpp -n -l -b

  # c) [1 pt] Mismatch problems (no message and garbage out OK):
  grep -r -H -n -s -I -i se p2test | ./rgpp -w the -b -n

  rm rgpp