File: Makefile

package info (click to toggle)
pgpointcloud 1.2.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,892 kB
  • sloc: sql: 40,767; ansic: 11,045; xml: 935; makefile: 297; cpp: 282; perl: 248; python: 178; sh: 92
file content (44 lines) | stat: -rw-r--r-- 1,341 bytes parent folder | download | duplicates (2)
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
# pointcloud

include ../config.mk

#MODULE_big = pointcloud_postgis
#OBJS =
SED = sed
EXTENSION = pointcloud_postgis
EXTVERSION=$(shell cat ../Version.config)

UPGRADABLE = 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4
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 = pointcloud

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

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

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

$(EXTENSION)--$(EXTVERSION).sql: $(EXTENSION).sql.in Makefile
	$(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 $< $@