-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile.in
64 lines (50 loc) · 1.7 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
CC = @CC@
EXTRA_OBJS = @EXTRA_OBJS@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
datarootdir = @datarootdir@
datadir = @datadir@
mandir = @mandir@
docdir = @docdir@
htmldir = @htmldir@
INSTALL = @INSTALL@
VERSION = @PACKAGE_VERSION@
EXE = pgreplay
OBJS = parse.o replayitem.o main.o replayfile.o database.o $(EXTRA_OBJS)
HEADERS = config.h pgreplay.h
.PHONY: clean distclean tarball test install install_bin install_man install_html
.SUFFIXES: .o .c .h
$(EXE): $(OBJS) $(HEADERS)
$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(OBJS) $(LDFLAGS) $(LIBS)
$(OBJS): $(HEADERS)
clean:
rm -f $(OBJS) $(EXE)
distclean: clean
rm -rf Makefile config.h config.h.in~ config.log config.cache config.status autom4te.cache test/runtest.sh pgreplay-$(VERSION).tar*
tarball: distclean
if tar --version 2>/dev/null | grep -q GNU; then : ;else echo "this requires GNU tar" 1>&2; exit 1; fi
ln -s "`pwd`" /tmp/pgreplay-$(VERSION)
tar -cf pgreplay-$(VERSION).tar -h -C /tmp --exclude .svn --exclude CVS --exclude pgreplay-$(VERSION).tar pgreplay-$(VERSION) --exclude test/testrun.c
rm /tmp/pgreplay-$(VERSION)
gzip -9 pgreplay-$(VERSION).tar
$(EXE).html: $(EXE).1
groff -Thtml -mman $< > $@
test: $(EXE) test/runtest.sh
cd test && ./runtest.sh
install: install_bin install_man
install_bin: $(EXE)
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) -m 0755 $< $(DESTDIR)$(bindir)/$<
install_man: $(EXE).1
$(INSTALL) -d $(DESTDIR)$(mandir)/man1
$(INSTALL) -m 0644 $< $(DESTDIR)$(mandir)/man1/$<
install_html: $(EXE).html
$(INSTALL) -d $(DESTDIR)$(htmldir)
$(INSTALL) -m 0644 $< $(DESTDIR)$(htmldir)/$<
.c.o:
$(CC) -c $(CFLAGS) -DVERSION='"$(VERSION)"' $<