home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8709 / 3 / Makefile < prev    next >
Encoding:
Makefile  |  1987-09-08  |  1.7 KB  |  71 lines

  1. ##
  2. ##  Makefile for the install program.
  3. ##  This Makefile wants getopt(3) to be in your C library!
  4. ##  $Header:$
  5. ##
  6.  
  7. ##
  8. ##  CONFIGURATION SECTION
  9. ##
  10. ##  Do you have the snazzy/stupid <sys/wait.h>?
  11. D1    = -DSYS_WAIT=1
  12. ##  If you have vfork(2), use it.
  13. D2    = -DFORK=vfork
  14. #D2    = -DFORK=fork
  15. ##  If you #define this, we use our own exit() to avoid stdio crufties.
  16. D3    = -DEXIT=1
  17. #D3    = -UEXIT
  18. ##  Have "chown -f"?
  19. D4    = -DCHOWN_F_FLAG=1
  20. #D4    = -UCHOWN_F_FLAG
  21. ##  Have "chgrp -f" ?
  22. D5    = -DCHGRP_F_FLAG=1
  23. #D5    = -UCHGRP_F_FLAG
  24. ##  If you have to change this, something's really wrong.
  25. D6    = -DSTDERR=2
  26. ##  Differences in dialect, dialectical differences.
  27. D7    = -DIDX=index
  28. #D7    = -DIDX=strchr
  29. ##  Default owner of installed files.
  30. OWNER    = root
  31. ##  Default group installed files should be placed in.
  32. GROUP    = system
  33. ##  Change this to, e.g., -g, for debugging.
  34. OPT    = -O
  35. ##  Where manpages get installed
  36. MANDIR    = /usr/man/man1
  37. #MANDIR    = /usr/man/u_man/man1
  38. MANEXT    = .1
  39. MANPAGE    = $(MANDIR)/install$(MANEXT)
  40. ##
  41. ##  NOITCES NOITARUGIFNOC
  42. ##
  43.  
  44. D    = $(D1) $(D2) $(D3) $(D4) $(D5) $(D6) $(D7)
  45. DEFS    = $(D) -DDEF_OWNER=\"$(OWNER)\" -DDEF_GROUP=\"$(GROUP)\"
  46. CFLAGS    = $(DEFS) $(OPT)
  47.  
  48. all:            ./install install.man
  49.  
  50. install:        all
  51.     @echo This will install the programs...  Do \"make all\" to compile
  52.     @echo You have five seconds to interrupt.
  53.     sleep 5
  54.     ./install -o $(OWNER) -g $(GROUP) -m 555 -s install $(DESTDIR)
  55.     ./install -o $(OWNER) -g $(GROUP) -m 444 -s install.man $(MANPAGE)
  56.  
  57.  
  58. install.man:        install.X Makefile
  59.     @rm -f install.man
  60.     sed -e "s/%OWNER%/$(OWNER)/" -e "s/%GROUP%/$(GROUP)/" \
  61.             <install.X >install.man
  62.  
  63. ./install:        install.c Makefile
  64.     $(CC) $(CFLAGS) -o ./install install.c
  65.  
  66. lint:            install.c
  67.     lint -abhu $(DEFS) install.c >lint
  68.  
  69. clean:
  70.     rm -f lint foo core tags a.out install install.man
  71.