File: Makefile.in

package info (click to toggle)
pgpointcloud 1.2.1-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 4,840 kB
  • sloc: sql: 41,137; ansic: 10,943; xml: 935; cpp: 282; perl: 248; makefile: 185; sh: 72
file content (72 lines) | stat: -rw-r--r-- 1,889 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
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
65
66
67
68
69
70
71
72
# pointcloud

include ../config.mk

SQLPP = @SQLPP@

OBJS = \
	pc_inout.o \
	pc_access.o \
	pc_editor.o \
	pc_pgsql.o

SED = sed
EXTENSION = pointcloud
EXTVERSION=$(shell cat ../Version.config)
EXTVERSION_MAJOR=$(shell cut -d. -f1,2 ../Version.config)
MODULE_big = $(EXTENSION)-$(EXTVERSION_MAJOR)
UPGRADABLE = 1.1.0 1.1.1 1.2.0

UPGRADES = \
  $(shell echo $(UPGRADABLE) | \
     $(SED) 's/^/$(EXTENSION)--/' | \
     $(SED) 's/$$/--$(EXTVERSION).sql/' | \
     $(SED) 's/ /--$(EXTVERSION).sql $(EXTENSION)--/g') \
  $(EXTENSION)--$(EXTVERSION)--$(EXTVERSION)next.sql \
  $(EXTENSION)--$(EXTVERSION)next--$(EXTVERSION).sql

DATA_built = \
  $(EXTENSION).control \
  $(EXTENSION)--$(EXTVERSION).sql \
  $(UPGRADES)

REGRESS = 

ifeq ("$(PGSQL_MAJOR_VERSION)", "9")
REGRESS += pointcloud_pg9
else
REGRESS += pointcloud
endif

REGRESS += pointcloud_columns schema

ifeq ("$(PGSQL_MAJOR_VERSION)", "9")
ifneq ("$(LAZPERF_STATUS)", "disabled")
REGRESS += pointcloud_laz_pg9
endif
else
ifneq ("$(LAZPERF_STATUS)", "disabled")
REGRESS += pointcloud_laz
endif
endif

# Add in build/link flags for lib
PG_CPPFLAGS += -I../lib
SHLIB_LINK += ../lib/$(LIB_A) ../lib/$(LIB_A_LAZPERF) -lstdc++ $(filter -lm, $(LIBS)) $(XML2_LDFLAGS) $(ZLIB_LDFLAGS)

# We are going to use PGXS for sure
include $(PGXS)

$(EXTENSION).control: $(EXTENSION).control.in Makefile
	$(SED) -e 's/#POINTCLOUD_VERSION#/$(EXTVERSION)/' \
         -e 's/#POINTCLOUD_VERSION_MAJOR#/$(EXTVERSION_MAJOR)/' $< > $@

$(EXTENSION)--$(EXTVERSION).sql: $(EXTENSION).sql.in Makefile
	$(SQLPP) -I. $< | $(SED) -e 's/#POINTCLOUD_VERSION#/$(EXTVERSION)/' > $@

# NOTE: relies on PERL being defined by PGXS
$(EXTENSION)--%--$(EXTVERSION).sql: $(EXTENSION)--$(EXTVERSION).sql ../util/proc_upgrade.pl
	cat $< | ../util/proc_upgrade.pl > $@

$(EXTENSION)--%--$(EXTVERSION)next.sql: $(EXTENSION)--$(EXTVERSION)next--$(EXTVERSION).sql
	ln -f $< $@