diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-09-27 21:31:10 -0300 |
---|---|---|
committer | Olliver Schinagl <oliver@schinagl.nl> | 2014-10-09 20:15:55 +0200 |
commit | 88beb7703b805cc5bc4ba2e74d7f2d8f5b886c73 (patch) | |
tree | cd48e7631341534f89746865fc860ef385c02878 /Makefile | |
parent | 4aad3134beb551c820d3bfb5e26f8829e109aca2 (diff) | |
download | dtv-scan-tables-88beb7703b805cc5bc4ba2e74d7f2d8f5b886c73.tar.gz |
Add targets to install the files at the system
In order to be easier to package the scan tables, add
some targets to install the files, and add the instructions
about how to use it at the README file.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -14,6 +14,7 @@ MKDIR = mkdir -p DVBFORMATCONVERT = dvb-format-convert DVBV3DIRS = atsc dvb-c dvb-s dvb-t +DVBV5DIRS = $(DVBV3DIRS) isdb-t DVBV3CHANNELFILES = $(foreach dir,$(DVBV3DIRS),$(wildcard $(dir)/*)) @@ -25,6 +26,22 @@ DVBV5OUTPUTDIR = dvbv5 PHONY := clean dvbv3 dvbv5 +ifeq ($(PREFIX),) +PREFIX = /usr/local +endif + +ifeq ($(DATADIR),) +DATADIR = $(PREFIX)/share +endif + +ifeq ($(DVBV5DIR),) +DVBV5DIR = dvbv5 +endif + +ifeq ($(DVBV3DIR),) +DVBV3DIR = dvbv3 +endif + dvbv3: @$(foreach var,$(DVBV3DIRS), $(MKDIR) $(DVBV3OUTPUTDIR)/$(var);) @$(foreach var,$(DVBV3CHANNELFILES), $(DVBFORMATCONVERT) $(DVBFORMATCONVERT_CHANNEL_DVBV3) $(var) $(DVBV3OUTPUTDIR)/$(var);) @@ -34,6 +51,13 @@ dvbv5: $(DVBV3OUTPUTDIR) @$(foreach var,$(DVBV3DIRS), $(MKDIR) $(DVBV5OUTPUTDIR)/$(var);) @$(foreach var,$(DVBV3CHANNELFILES), $(DVBFORMATCONVERT) $(DVBFORMATCONVERT_CHANNEL_DVBV5) $(DVBV3OUTPUTDIR)/$(var) $(DVBV5OUTPUTDIR)/$(var);) +install: + @mkdir -p $(DATADIR)/$(DVBV5DIR) + $(foreach var,$(DVBV5DIRS), install -d -p $(DATADIR)/$(DVBV5DIR)/$(var); install -D -p -m 644 $(var)/* $(DATADIR)/$(DVBV5DIR)/$(var);) + +install_v3: + @mkdir -p $(DATADIR)/$(DVBV3DIR) + $(foreach var,$(DVBV3DIRS), install -d -p $(DATADIR)/$(DVBV3DIR)/$(var); install -D -p -m 644 $(DVBV3OUTPUTDIR)/$(var)/* $(DATADIR)/$(DVBV3DIR)/$(var);) clean: rm -rf $(DVBV3OUTPUTDIR)/ $(DVBV5OUTPUTDIR)/ |