File: common_target.mk

package info (click to toggle)
oar 2.5.4-2
  • links: PTS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 11,064 kB
  • sloc: perl: 28,891; ruby: 5,813; sh: 5,208; ml: 3,408; sql: 3,255; cpp: 2,277; ansic: 702; makefile: 389; php: 99; exp: 23
file content (26 lines) | stat: -rw-r--r-- 535 bytes parent folder | download | duplicates (10)
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
# This file factorize the shared target {mandir|sbindir|bindir|...}{install|uninstall}

ifndef TARGET_DIR
echo "No TARGET_DIR defined. Fail !"
exit 1
endif

TARGET_DIR_RIGHTS?=755
TARGET_FILE_RIGHTS?=755


BUILDED_FILES=$(patsubst %.in,%,$(SOURCE_FILES))
TARGET_FILES=$(addprefix $(TARGET_DIR)/,$(notdir $(BUILDED_FILES)))

ifdef SOURCE_FILES
install:
	install -m $(TARGET_DIR_RIGHTS) -d $(TARGET_DIR)
	install -m $(TARGET_FILE_RIGHTS) $(BUILDED_FILES) $(TARGET_DIR)

uninstall:
	-rm -f $(TARGET_FILES)
else
install:
uninstall:
endif