Skip to content

Commit

Permalink
Add fesvr; only globally install fesvr headers/libs
Browse files Browse the repository at this point in the history
  • Loading branch information
aswaterman committed Mar 31, 2019
1 parent 61cb96d commit f49618c
Show file tree
Hide file tree
Showing 41 changed files with 6,512 additions and 232 deletions.
26 changes: 8 additions & 18 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,10 @@ endif
# Installation directories

prefix := @prefix@
enable_stow := @enable_stow@

ifeq ($(enable_stow),yes)
stow_pkg_dir := $(prefix)/pkgs
INSTALLDIR ?= $(DESTDIR)$(stow_pkg_dir)/$(project_name)-$(project_ver)
else
INSTALLDIR ?= $(DESTDIR)$(prefix)
endif
INSTALLDIR ?= $(DESTDIR)$(prefix)

install_hdrs_dir := $(INSTALLDIR)/include/$(project_name)
install_hdrs_dir := $(INSTALLDIR)/include
install_libs_dir := $(INSTALLDIR)/lib
install_exes_dir := $(INSTALLDIR)/bin

Expand Down Expand Up @@ -307,7 +301,8 @@ deps += $$($(2)_deps)

test_outs += $$($(2)_test_outs)

install_hdrs += $$(addprefix $(src_dir)/$(1)/, $$($(2)_hdrs))
install_hdrs += $$(addprefix $(src_dir)/$(1)/, $$($(2)_install_hdrs))
install_libs += $$(if $$($(2)_install_lib),lib$(1).a,)
install_exes += $$($(2)_install_prog_exes)
install_pcs += riscv-$(1).pc

Expand Down Expand Up @@ -352,11 +347,12 @@ check : check-cpp check-bin
# Installation
#-------------------------------------------------------------------------

install-hdrs : $(install_hdrs) config.h
install-hdrs : $(install_hdrs)
$(MKINSTALLDIRS) $(install_hdrs_dir)
for file in $^; \
for file in $(subst $(src_dir)/,,$^); \
do \
$(INSTALL_HDR) $$file $(install_hdrs_dir); \
$(MKINSTALLDIRS) $(install_hdrs_dir)/`dirname $$file`; \
$(INSTALL_HDR) $(src_dir)/$$file $(install_hdrs_dir)/`dirname $$file`; \
done

install-libs : $(install_libs)
Expand All @@ -381,12 +377,6 @@ install-pc : $(install_pcs)
done

install : install-hdrs install-libs install-exes install-pc
ifeq ($(enable_stow),yes)
$(MKINSTALLDIRS) $(stow_pkg_dir)
cd $(stow_pkg_dir) && \
$(STOW) --delete $(project_name)-* && \
$(STOW) $(project_name)-$(project_ver)
endif

.PHONY : install install-hdrs install-libs install-exes

Expand Down
43 changes: 0 additions & 43 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -59,49 +59,6 @@ AC_DEFUN([MCPPBS_PROG_INSTALL],
# Check for install script
AC_PROG_INSTALL
# Deterimine if native build and set prefix appropriately
AS_IF([ test ${enable_stow} = "yes" ],
[
AC_CHECK_PROGS([stow],[stow],[no])
AS_IF([ test ${stow} = "no" ],
[
AC_MSG_ERROR([Cannot use --enable-stow since stow is not available])
])
# Check if native or non-native build
AS_IF([ test "${build}" = "${host}" ],
[
# build == host so this is a native build. Make sure --prefix not
# set and $STOW_PREFIX is set, then set prefix=$STOW_PREFIX.
AS_IF([ test "${prefix}" = "NONE" && test -n "${STOW_PREFIX}" ],
[
prefix="${STOW_PREFIX}"
AC_MSG_NOTICE([Using \$STOW_PREFIX from environment])
AC_MSG_NOTICE([prefix=${prefix}])
])
],[
# build != host so this is a non-native build. Make sure --prefix
# not set and $STOW_ROOT is set, then set
# prefix=$STOW_ROOT/${host_alias}.
AS_IF([ test "${prefix}" = "NONE" && test -n "${STOW_ROOT}" ],
[
prefix="${STOW_ROOT}/${host_alias}"
AC_MSG_NOTICE([Using \$STOW_ROOT from environment])
AC_MSG_NOTICE([prefix=${prefix}])
])
])
])
])

#-------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit f49618c

Please sign in to comment.