view android/Makefile @ 610:92f77b6d0d99

Utilities for enabling access to Android SDK.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Mon, 18 Jan 2016 01:06:17 +0200
parents misc/Makefile@41c5dab96724
children
line wrap: on
line source

SHELL = /bin/sh

# Disable built in pattern rules.
MAKEFLAGS += -r
# Disable built in variables.
MAKEFLAGS += -R
# Disable built in suffix rules.
.SUFFIXES:
# Delete target file if command fails.
.DELETE_ON_ERROR:
# Default target.
.DEFAULT_GOAL = all

ifeq '' '$(prefix)'
  ifneq '' '$(HOME)'
    prefix = $(HOME)/usr
  else
    $(error HOME env var and prefix var are not set!)
  endif
endif

bindir = $(prefix)/bin

FILES = my-android-activate my-android-symlink

.PHONY: all
all:

.PHONY: check
check:

.PHONY: install
install:
	[ -d $(bindir) ] || mkdir -p $(bindir)
	for file in $(FILES); do \
		filenoext=$${file%.sh}; \
		filenoext=$${filenoext%.py}; \
		install -m 755 $$file $(bindir)/$$filenoext; \
	done

.PHONY: uninstall
uninstall:
	for file in $(FILES); do \
		filenoext=$${file%.sh}; \
		filenoext=$${filenoext%.py}; \
		[ -e $(bindir)/$$file ] && if rm $(bindir)/$$file; then :; else echo Unable to delete $(bindir)/$$file; exit 1; fi || :; \
		[ -e $(bindir)/$$filenoext ] && if rm $(bindir)/$$filenoext; then :; else echo Unable to delete $(bindir)/$$filenoext; exit 1; fi || :; \
	done

.PHONY: distclean
distclean: clean

.PHONY: clean
clean: