commands: install helpers in libexec
Script helpers to the evl command are installed in $prefix/libexec. By convention, source scripts are suffixed by ".evl" to identify them unambiguously. They are copied to $libexec/evl-<script>. Signed-off-by: Philippe Gerum <rpm@xenomai.org>
This commit is contained in:
parent
2014a9aff7
commit
333cacc1f5
|
@ -2,10 +2,11 @@
|
|||
|
||||
include ../config.mk
|
||||
|
||||
CMDFILES := $(wildcard *.c)
|
||||
BINARIES = $(CMDFILES:%.c=%)
|
||||
TARGETS = $(CMDFILES:%.c=$(O_DIR)/%)
|
||||
DEPFILES = $(CMDFILES:%.c=$(O_DIR)/%.d)
|
||||
SRCFILES := $(wildcard *.c)
|
||||
BINARIES = $(SRCFILES:%.c=%)
|
||||
TARGETS = $(SRCFILES:%.c=$(O_DIR)/%)
|
||||
DEPFILES = $(SRCFILES:%.c=$(O_DIR)/%.d)
|
||||
HELPERS = $(wildcard *.evl)
|
||||
|
||||
CMD_CPPFLAGS := $(BASE_CPPFLAGS) -I.
|
||||
CMD_CFLAGS := $(CMD_CPPFLAGS) $(BASE_CFLAGS)
|
||||
|
@ -14,9 +15,13 @@ override CFLAGS := $(CMD_CFLAGS) $(CFLAGS)
|
|||
all: $(TARGETS)
|
||||
|
||||
install: all
|
||||
$(Q)for bin in $(BINARIES); do \
|
||||
$(INSTALL) -D $(O_DIR)/$$bin $(DESTDIR)/$(bindir)/$$bin; \
|
||||
done
|
||||
$(call inst-cmd,commands, \
|
||||
for bin in $(BINARIES); do \
|
||||
$(INSTALL) -D $(O_DIR)/$$bin $(DESTDIR)/$(bindir)/$$bin; done)
|
||||
$(call inst-cmd,helpers, \
|
||||
for hlp in $(HELPERS); do \
|
||||
name=evl-$$(basename $$hlp .evl); \
|
||||
$(INSTALL) -D $$hlp $(DESTDIR)/$(libexecdir)/$$name; done)
|
||||
|
||||
clean clobber mrproper:
|
||||
$(Q)$(RM) -f $(TARGETS) $(DEPFILES)
|
||||
|
|
Loading…
Reference in New Issue