]> granicus.if.org Git - postgresql/blob - src/backend/utils/misc/Makefile
New configure test for flex, which recognizes only flex but does so in all
[postgresql] / src / backend / utils / misc / Makefile
1 # $Header: /cvsroot/pgsql/src/backend/utils/misc/Makefile,v 1.18 2000/08/28 11:53:20 petere Exp $
2
3 subdir = src/backend/utils/misc
4 top_builddir = ../../../..
5 include $(top_builddir)/src/Makefile.global
6
7 OBJS = database.o superuser.o guc.o guc-file.o ps_status.o
8
9 # This location might depend on the installation directories. Therefore
10 # we can't subsitute it into config.h.
11 ifdef krb_srvtab
12 CPPFLAGS += -DPG_KRB_SRVTAB='"$(krb_srvtab)"'
13 endif
14
15
16 all: SUBSYS.o
17
18 SUBSYS.o: $(OBJS)
19         $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
20
21 guc-file.c: guc-file.l
22 ifdef FLEX
23         $(FLEX) $(FLEXFLAGS) $<
24         sed -e 's/^yy/GUC_yy/g' -e 's/\([^a-zA-Z0-9_]\)yy/\1GUC_yy/g' lex.yy.c > $@
25         rm -f lex.yy.c
26 else
27         @$(missing) flex $< $@
28 endif
29
30 # Note: guc-file.c is not deleted by 'make clean',
31 # since we want to ship it in distribution tarballs.
32 clean: 
33         rm -f SUBSYS.o $(OBJS)
34         @rm -f lex.yy.c
35
36 depend dep:
37         $(CC) -MM $(CFLAGS) *.c >depend
38
39 ifeq (depend,$(wildcard depend))
40 include depend
41 endif