Permalink
Browse files

Add install targets

  • Loading branch information...
1 parent 0a4cd75 commit 1ab9c0bbfc77c845c58b3aa1566f9fb4f1a292ac Mikael Magnusson committed Apr 15, 2010
Showing with 34 additions and 2 deletions.
  1. +3 −1 Makefile
  2. +9 −0 c_src/Makefile
  3. +2 −0 config/Makefile
  4. +3 −1 config/configure.in
  5. +7 −0 src/Makefile
  6. +10 −0 support/include.mk.in
View
@@ -8,7 +8,8 @@ DISTCLEAN_SUBDIRS = \
src \
config
-RECURSIVE_TARGETS = all-recursive clean-recursive distclean-recursive
+RECURSIVE_TARGETS = all-recursive clean-recursive distclean-recursive \
+ install-recursive
all: all-recursive
@@ -33,3 +34,4 @@ distclean: clean distclean-recursive
config/configure: config/configure.in
(cd config && autoconf)
+install: install-recursive
View
@@ -27,5 +27,14 @@ clean:
distclean:
+install: $(UNIXDOM_DRV_SO)
+ $(INSTALL) -d $(DESTDIR)$(beamdir)
+ $(INSTALL) -d $(DESTDIR)$(privdir)
+ for p in $(UNIXDOM_DRV_SO); do \
+ $(install_DATA) $$p $(DESTDIR)$(privdir) ; \
+ $(LN_S) $(UNIXDOM_DRV_SO) $(DESTDIR)$(beamdir) ; \
+ done
+
+
.INTERMEDIATE: $(SHLIB_OBJS)
View
@@ -22,3 +22,5 @@ distclean:
$(MK_INCLUDE) $(JERL)
#extra-clean rm config.h.in configure
+
+install:
View
@@ -1,4 +1,4 @@
-AC_INIT([unixdom-drv], [0.1-git])
+AC_INIT([unixdom_drv], [0.1-git])
dnl work out who the cpu, vendor and OS are
AC_CANONICAL_SYSTEM
@@ -10,6 +10,8 @@ AC_SUBST(JUNGERL_DIR)
dnl Programs
AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_LN_S
AC_PATH_PROG(ERL, erl, erl)
AC_PATH_PROG(ERLC, erlc, erlc)
View
@@ -14,3 +14,10 @@ clean:
distclean:
+
+install: $(OBJECTS)
+ $(INSTALL) -d $(DESTDIR)$(beamdir)
+ $(INSTALL) -d $(DESTDIR)$(includedir)
+ for p in $(OBJECTS); do \
+ $(install_DATA) $$p $(DESTDIR)$(beamdir) ; \
+ done
View
@@ -71,3 +71,13 @@ $(DOC_DIR)/%.html: %.erl
SOCKET_LIBS = @SOCKET_LIBS@
# Miscellaneous
+
+PACKAGE_NAME := @PACKAGE_NAME@
+PACKAGE_VERSION := @PACKAGE_VERSION@
+INSTALL := @INSTALL@
+install_DATA := @INSTALL_DATA@
+LN_S := @LN_S@
+appdir = $(ERLDIR)/lib/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+beamdir = $(appdir)/ebin
+includedir = $(appdir)/include
+privdir = $(appdir)/priv

0 comments on commit 1ab9c0b

Please sign in to comment.