home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / examples / INTERNET / Makefile < prev    next >
Encoding:
Makefile  |  1991-11-18  |  2.2 KB  |  115 lines

  1. # Installation file for the INTERNET basic setup
  2. #
  3. ############################################################
  4. #
  5. # @(#) $Header$
  6. #
  7. # $Log$
  8. #
  9. ############################################################
  10. #
  11. # Definitions
  12. #
  13. ############################################################
  14.  
  15. TABLES    = \
  16.     aliases    \
  17.     auth.channel \
  18.     auth.mta \
  19.     auth.qmgr \
  20.     auth.user \
  21.     ch.list \
  22.     ch.local \
  23.     ch.shell \
  24.     ch.uucp \
  25.     ch.x400in84 \
  26.     ch.x400in88 \
  27.     ch.x400out84 \
  28.     ch.x400out88 \
  29.     channel \
  30.     domain \
  31.     foo \
  32.     or \
  33.     or2rfc \
  34.     rfc1148gate \
  35.     rfc2or \
  36.     users
  37.  
  38. WARNINGS = \
  39.     warning.1 \
  40.     warning.2
  41.  
  42. BUILD    = $(TABLES) $(WARNINGS) README isoentities.add tailor x500.sample
  43. EXT    = I
  44. WARNDIR    = $(TBLDIR)/warnings
  45.  
  46. ############################################################
  47. #
  48. # Building Rules
  49. #
  50. ############################################################
  51.  
  52. default: build
  53.  
  54. install: build inst-tailor inst-tables inst-warnings
  55.  
  56.  
  57. inst-tailor: tailor
  58.     @sh -c "if [ -f $(TAILOR) ];\
  59.     then echo $(TAILOR) already exists - installation aborted; exit 1;\
  60.     else exit 0; \
  61.     fi"
  62.     cp tailor $(TAILOR)
  63.  
  64. inst-tables: $(TABLES)
  65.     @for i in $(TABLES);\
  66.     do \
  67.         if [ -f $(TBLDIR)/$$i ]; \
  68.         then \
  69.             echo mv $(TBLDIR)/$$i $(TBLDIR)/$$i.bak; \
  70.             mv $(TBLDIR)/$$i $(TBLDIR)/$$i.bak || exit 1; \
  71.         fi; \
  72.         echo cp $$i $(TBLDIR); \
  73.         cp $$i $(TBLDIR) || exit 1; \
  74.     done
  75.  
  76. inst-warnings: $(WARNINGS)
  77.     sh -c "if [ -d $(WARNDIR) ];\
  78.     then echo "$(WARNDIR) does not exit - creating it"; \
  79.          mkdir $(WARNDIR);\
  80.          $(CHOWN) pp $(WARNDIR);\
  81.          $(CHMOD) 755 $(WARNDIR);\
  82.     fi
  83.     @for i in $(WARNINGS); \
  84.     do \
  85.         if [ -f $(WARNDIR)/$$i ]; \
  86.         then \
  87.             echo mv $(WARNDIR)/$$i $(WARNDIR)/$$i.bak; \
  88.             mv $(WARNDIR)/$$i $(WARNDIR)/$$i.bak || exit 1; \
  89.         fi; \
  90.                 echo cp $$i $(WARNDIR); \
  91.                 cp $$i $(WARNDIR) || exit 1; \
  92.         done
  93.  
  94.  
  95. rebuild: clean build
  96.  
  97. clean: ; rm -f $(BUILD)
  98.  
  99. build: $(BUILD)
  100. $(BUILD):
  101.     -@rm -f $@
  102.     @sh -c "if [ -f ../master/$@-$(EXT) ]; then \
  103.         echo ln ../master/$@-$(EXT) $@; \
  104.         ln ../master/$@-$(EXT) $@ || exit 1; \
  105.     else \
  106.         echo ln ../master/$@ $@; \
  107.         ln ../master/$@ $@ || exit 1; \
  108.     fi"
  109.  
  110. ############################################################
  111. #
  112. # End of Building Rules
  113. #
  114. ############################################################
  115.