File: install

package info (click to toggle)
postgresql-filedump 9.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 164 kB
  • ctags: 103
  • sloc: ansic: 1,476; makefile: 55; sh: 15
file content (33 lines) | stat: -rw-r--r-- 1,098 bytes parent folder | download
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
--- a/Makefile
+++ b/Makefile
@@ -3,8 +3,8 @@
 # note this must match version macros in pg_filedump.h
 FD_VERSION=9.6.0
 
-CC=gcc
-CFLAGS=-g -O -Wall -Wmissing-prototypes -Wmissing-declarations
+#CC=gcc
+#CFLAGS=-g -O -Wall -Wmissing-prototypes -Wmissing-declarations
 
 # If working with a PG source directory, point PGSQL_INCLUDE_DIR to its
 # src/include subdirectory.  If working with an installed tree, point to
@@ -12,7 +12,7 @@ CFLAGS=-g -O -Wall -Wmissing-prototypes
 PG_CONFIG=pg_config
 PGSQL_INCLUDE_DIR=$(shell $(PG_CONFIG) --includedir-server)
 PGSQL_LIB_DIR=$(shell $(PG_CONFIG) --libdir)
-
+PGSQL_BIN_DIR=$(shell $(PG_CONFIG) --bindir)
 
 DISTFILES= README.pg_filedump Makefile Makefile.contrib \
 	pg_filedump.h pg_filedump.c
@@ -25,6 +25,10 @@ pg_filedump: pg_filedump.o
 pg_filedump.o: pg_filedump.c
 	${CC} ${CFLAGS} -I${PGSQL_INCLUDE_DIR} pg_filedump.c -c
 
+install: pg_filedump
+	mkdir -p $(DESTDIR)$(PGSQL_BIN_DIR)
+	install pg_filedump $(DESTDIR)$(PGSQL_BIN_DIR)
+
 dist:
 	rm -rf pg_filedump-${FD_VERSION} pg_filedump-${FD_VERSION}.tar.gz
 	mkdir pg_filedump-${FD_VERSION}