7

Makefile.distrib

  1. #
  2.  
  3.       COMPONENT = @COMPONENT@
  4.         VERSION = @VERSION@
  5.        REVISION = @REVISION@
  6.  
  7.       INC_FILES = @INC_FILES@
  8.       LIB_FILES = @LIB_FILES@
  9.       ETC_FILES = @ETC_FILES@
  10.  
  11.           OWNER = root
  12.           GROUP = sys
  13.            MODE = 444
  14.           XMODE = 755
  15.  
  16.     INSTALL_DIR = /usr/local
  17.         INC_DIR = $(INSTALL_DIR)/include
  18.         LIB_DIR = $(INSTALL_DIR)/lib
  19.         ETC_DIR = $(INSTALL_DIR)/etc
  20.        ALL_DIRS = $(INSTALL_DIR) $(INC_DIR) $(LIB_DIR) $(ETC_DIR)
  21.  
  22.        TAR_FILE = $(COMPONENT)-$(VERSION)-$(REVISION).tar
  23.  
  24.         INSTALL = @INSTALL@
  25.  
  26. install:    install.dir install.inc install.lib install.etc
  27.  
  28. install.dir:
  29.     echo [Installing MagicBus $(VERSION) in $(INSTALL_DIR)]
  30.     for n in $(ALL_DIRS); do if [ ! -d $$n ]; then mkdir $$n; chown $(OWNER) $$n; chgrp $(GROUP) $$n; chmod $(XMODE) $$n; fi; done
  31.  
  32. install.inc:
  33.     for n in $(INC_FILES); do echo $$n; done
  34.     $(INSTALL) -c -m $(MODE) -o $(OWNER) -g $(GROUP) $(INC_FILES) $(INC_DIR)
  35.  
  36. install.lib:
  37.     for n in $(LIB_FILES); do echo $$n; done
  38.     $(INSTALL) -c -m $(MODE) -o $(OWNER) -g $(GROUP) $(LIB_FILES) $(LIB_DIR)
  39.  
  40. install.etc:
  41.     for n in $(ETC_FILES); do echo $$n; done
  42.     $(INSTALL) -c -m $(XMODE) -o $(OWNER) -g $(GROUP) $(ETC_FILES) $(ETC_DIR)
  43.  
  44. clean:
  45.  
  46. distrib:
  47.     echo [Building $(TAR_FILE).gz]
  48.     (wd=`pwd`; dir=`basename $$wd`; cd ..; tar -chf - $$dir|gzip >$(TAR_FILE).gz)

Comments

Your comment:
[p] [b] [i] [u] [s] [quote] [pre] [br] [code] [url] [email] strip help 2000

Enter a maximum of 2000 characters.
Improve the presentation of your text with the following formatting tags:
[p]paragraph[/p], [b]bold[/b], [i]italics[/i], [u]underline[/u], [s]strike[/s], [quote]citation[/quote], [pre]as is[/pre], [br]line break,
[url]http://www.izend.org[/url], [url=http://www.izend.org]site[/url], [email]izend@izend.org[/email], [email=izend@izend.org]izend[/email],
[code]command[/code], [code=language]source code in c, java, php, html, javascript, xml, css, sql, bash, dos, make, etc.[/code].