forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (22 loc) · 1.1 KB
/
Makefile
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
MODULE_TOPDIR = ..
include $(MODULE_TOPDIR)/include/Make/Other.make
SRCFILES = WIND DEFAULT_WIND VAR PROJ_INFO PROJ_UNITS MYNAME
DBFMAPS = mysites point
SQLITEMAPS = country_boundaries
MAPFILES = dbln coor topo head cidx sidx hist
DBFFILES := $(foreach map,$(DBFMAPS),dbf/$(map).dbf)
SQLITEFILES = sqlite/sqlite.db
VECTFILES := $(foreach map,$(DBFMAPS),$(foreach file,$(MAPFILES),vector/$(map)/$(file))) $(foreach map,$(SQLITEMAPS),$(foreach file,$(MAPFILES),vector/$(map)/$(file)))
SRC := $(SRCFILES) $(DBFFILES) $(SQLITEFILES) $(VECTFILES)
SRCDIRS := PERMANENT PERMANENT/vector PERMANENT/dbf PERMANENT/sqlite $(patsubst %,PERMANENT/vector/%,$(DBFMAPS)) $(patsubst %,PERMANENT/vector/%,$(SQLITEMAPS))
DSTDIR = $(ARCH_DISTDIR)/demolocation
DST := $(patsubst %,$(DSTDIR)/PERMANENT/%,$(SRC))
DSTDIRS := $(patsubst %,$(DSTDIR)/%,$(SRCDIRS))
RCFILE = $(DSTDIR)/.grassrc$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR)
default: $(DST) $(RCFILE)
$(DSTDIR)/PERMANENT/%: PERMANENT/% | $(DSTDIRS)
$(INSTALL_DATA) $< $@
$(DSTDIRS): %:
$(MKDIR) $@
$(RCFILE): grassrc.tmpl | $(DSTDIRS)
sed 's!@GISDBASE@!$(RUN_GISBASE)!' < $< > $@