home *** CD-ROM | disk | FTP | other *** search
Makefile | 1987-09-08 | 1.7 KB | 71 lines |
- ##
- ## Makefile for the install program.
- ## This Makefile wants getopt(3) to be in your C library!
- ## $Header:$
- ##
-
- ##
- ## CONFIGURATION SECTION
- ##
- ## Do you have the snazzy/stupid <sys/wait.h>?
- D1 = -DSYS_WAIT=1
- ## If you have vfork(2), use it.
- D2 = -DFORK=vfork
- #D2 = -DFORK=fork
- ## If you #define this, we use our own exit() to avoid stdio crufties.
- D3 = -DEXIT=1
- #D3 = -UEXIT
- ## Have "chown -f"?
- D4 = -DCHOWN_F_FLAG=1
- #D4 = -UCHOWN_F_FLAG
- ## Have "chgrp -f" ?
- D5 = -DCHGRP_F_FLAG=1
- #D5 = -UCHGRP_F_FLAG
- ## If you have to change this, something's really wrong.
- D6 = -DSTDERR=2
- ## Differences in dialect, dialectical differences.
- D7 = -DIDX=index
- #D7 = -DIDX=strchr
- ## Default owner of installed files.
- OWNER = root
- ## Default group installed files should be placed in.
- GROUP = system
- ## Change this to, e.g., -g, for debugging.
- OPT = -O
- ## Where manpages get installed
- MANDIR = /usr/man/man1
- #MANDIR = /usr/man/u_man/man1
- MANEXT = .1
- MANPAGE = $(MANDIR)/install$(MANEXT)
- ##
- ## NOITCES NOITARUGIFNOC
- ##
-
- D = $(D1) $(D2) $(D3) $(D4) $(D5) $(D6) $(D7)
- DEFS = $(D) -DDEF_OWNER=\"$(OWNER)\" -DDEF_GROUP=\"$(GROUP)\"
- CFLAGS = $(DEFS) $(OPT)
-
- all: ./install install.man
-
- install: all
- @echo This will install the programs... Do \"make all\" to compile
- @echo You have five seconds to interrupt.
- sleep 5
- ./install -o $(OWNER) -g $(GROUP) -m 555 -s install $(DESTDIR)
- ./install -o $(OWNER) -g $(GROUP) -m 444 -s install.man $(MANPAGE)
-
-
- install.man: install.X Makefile
- @rm -f install.man
- sed -e "s/%OWNER%/$(OWNER)/" -e "s/%GROUP%/$(GROUP)/" \
- <install.X >install.man
-
- ./install: install.c Makefile
- $(CC) $(CFLAGS) -o ./install install.c
-
- lint: install.c
- lint -abhu $(DEFS) install.c >lint
-
- clean:
- rm -f lint foo core tags a.out install install.man
-