diff options
Diffstat (limited to 'pgm2/makefile')
-rwxr-xr-x | pgm2/makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pgm2/makefile b/pgm2/makefile new file mode 100755 index 0000000..3486352 --- /dev/null +++ b/pgm2/makefile @@ -0,0 +1,31 @@ +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 |