|
1 |
| -#------------------------------------------------------------------------- |
2 |
| -# |
3 |
| -# Makefile-- |
4 |
| -# Makefile for regress (the regression test) |
5 |
| -# |
6 |
| -# Copyright (c) 1994, Regents of the University of California |
7 |
| -# |
8 |
| -# |
9 |
| -# IDENTIFICATION |
10 |
| -# $Header: /cvsroot/pgsql/src/test/regress/Makefile,v 1.12 1997/01/05 21:17:36 bryanh Exp $ |
11 |
| -# |
12 |
| -#------------------------------------------------------------------------- |
13 |
| - |
14 |
| -SRCDIR= ../.. |
15 |
| -include ../../Makefile.global |
16 |
| - |
17 |
| -CFLAGS+= -I$(LIBPQDIR) -I../../include |
18 |
| - |
19 |
| -# |
20 |
| -# DLOBJS is the dynamically-loaded object file. The regression test uses |
21 |
| -# this when it does a CREATE FUNCTION ... LANGUAGE 'C'). |
22 |
| -# |
23 |
| -DLOBJS= regress$(DLSUFFIX) |
24 |
| - |
25 |
| -# |
26 |
| -# ... plus test query inputs |
27 |
| -# |
28 |
| -# INFILES is the files the regression test uses for input. |
29 |
| -INFILES=$(DLOBJS)\ |
30 |
| - create.sql queries.sql errors.sql destroy.sql security.sql\ |
31 |
| - expected.out |
32 |
| -# |
33 |
| -# plus exports files |
34 |
| -# |
35 |
| -ifdefEXPSUFF |
36 |
| -INFILES+=$(DLOBJS:.o=$(EXPSUFF)) |
37 |
| -endif |
38 |
| - |
39 |
| -# OUTFILES is the files that get created by running the regression test. |
40 |
| -OUTFILES= stud_emp.data onek.data regress.out aportal.out |
41 |
| - |
42 |
| -# |
43 |
| -# prepare to run the test (including clean-up after the last run) |
44 |
| -# |
45 |
| -all:$(INFILES) |
46 |
| -rm -f$(OUTFILES) |
47 |
| - |
48 |
| -# |
49 |
| -# run the test |
50 |
| -# |
51 |
| -runtest:$(INFILES) expected.out |
52 |
| -$(SHELL) ./regress.sh2>&1| tee regress.out |
53 |
| -@echo"ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out" |
54 |
| - |
55 |
| -# The expected.input file is part of the distribution. It was made by hand |
56 |
| -# from 'regress.out' from a reference run of the regression test, replacing |
57 |
| -# installation-dependent things with names like _CWD_. The following rule |
58 |
| -# turns those names back into real values for the instant installation to |
59 |
| -# create a standard (expected.out) against which to compare regress.out |
60 |
| -# from the experimental run. |
61 |
| -# |
62 |
| -# |
63 |
| -expected.out: expected.input |
64 |
| -if [-z"$$USER" ];then USER=$$LOGNAME;fi;\ |
65 |
| -if [-z"$$USER" ];then USER=`whoami`;fi;\ |
66 |
| -if [-z"$$USER" ];thenecho'Cannot deduce $USER.';exit 1;fi;\ |
67 |
| -rm -f expected.out;\ |
68 |
| -MYTZ=`date| cut -c21`;\ |
69 |
| -C="`pwd`";\ |
70 |
| -sed -e"s:_CWD_:$$C:g"\ |
71 |
| - -e"s:_OBJWD_:$$C:g"\ |
72 |
| --e"s:_DLSUFFIX_:$(DLSUFFIX):g"\ |
73 |
| - -e"s;\([A-Z][a-z][a-z][^ ]* [A-Z][a-z][a-z] [0-9 ][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9] \)[A-Z]\([A-Z][A-Z]\);\1$$MYTZ\2;g"\ |
74 |
| - -e"s;\([A-Z][a-z][a-z][^ ]* [A-Z][a-z][a-z] [0-9 ][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] \)[A-Z]\([A-Z][A-Z] [0-9][0-9][0-9][0-9]\);\1$$MYTZ\2;g"\ |
75 |
| - -e"s:_USER_:$$USER:g"< expected.input> expected.out |
76 |
| -@echo"YOUR EXPECTED RESULTS ARE NOW IN FILE expected.out." |
77 |
| - |
78 |
| -%.sql:%.source |
79 |
| -if [-z"$$USER" ];then USER=$$LOGNAME;fi;\ |
80 |
| -if [-z"$$USER" ];then USER=`whoami`;fi;\ |
81 |
| -if [-z"$$USER" ];thenecho'Cannot deduce $$USER.';exit 1;fi;\ |
82 |
| -rm -f$@;\ |
83 |
| -C=`pwd`;\ |
84 |
| -sed -e"s:_CWD_:$$C:g"\ |
85 |
| - -e"s:_OBJWD_:$$C:g"\ |
86 |
| - -e"s:_DLSUFFIX_:$(DLSUFFIX):g"\ |
87 |
| - -e"s/_USER_/$$USER/g"<$<>$@ |
88 |
| - |
89 |
| -clean: |
90 |
| -rm -f$(INFILES) |
91 |
| -rm -f$(OUTFILES) |
92 |
| - |
| 1 | +# The Postgres make files exploit features of GNU make that other makes |
| 2 | +# do not have. Because it is a common mistake for users to try to build |
| 3 | +# Postgres with a different make, we have this make file that does nothing |
| 4 | +# but tell the user to use GNU make. |
| 5 | + |
| 6 | +# If the user were using GNU make now, this file would not get used because |
| 7 | +# GNU make uses a make file named "GNUmakefile" in preference to "Makefile" |
| 8 | +# if it exists. Postgres is shipped with a "GNUmakefile". |
| 9 | + |
| 10 | +allinstallcleandepdepend: |
| 11 | +@echo"You must use GNU make to use Postgres. It may be installed" |
| 12 | +@echo"on your system with the name 'gmake'." |