UltraRogue: build and install documentation in the Makefile.
This commit is contained in:
parent
3a9054acbf
commit
b521be16e8
2 changed files with 33 additions and 7 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
DISTNAME=urogue1.0.7
|
DISTNAME=urogue1.0.7
|
||||||
|
PACKAGE_TARNAME=@PACKAGE_TARNAME@
|
||||||
|
|
||||||
HDRS = dict.h dictutil.h rogue.h
|
HDRS = dict.h dictutil.h rogue.h
|
||||||
OBJS = armor.o \
|
OBJS = armor.o \
|
||||||
|
|
@ -110,6 +111,8 @@ CFILES = armor.c \
|
||||||
xcrypt.c
|
xcrypt.c
|
||||||
|
|
||||||
MISC= Makefile README LICENSE.TXT history.txt TODO
|
MISC= Makefile README LICENSE.TXT history.txt TODO
|
||||||
|
DOCS = $(PROGRAM).cat
|
||||||
|
RAWDOCS = README LICENSE.TXT history.txt TODO
|
||||||
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
CPPFLAGS=@DEFS@
|
CPPFLAGS=@DEFS@
|
||||||
|
|
@ -117,6 +120,9 @@ CFLAGS=
|
||||||
CRLIB = @LIBS@
|
CRLIB = @LIBS@
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
TAR = tar
|
TAR = tar
|
||||||
|
GROFF=@GROFF@
|
||||||
|
NROFF=@NROFF@
|
||||||
|
COLCRT=@COLCRT@
|
||||||
INSTALL=@INSTALL@
|
INSTALL=@INSTALL@
|
||||||
|
|
||||||
SCOREFILE=@SCOREFILE@
|
SCOREFILE=@SCOREFILE@
|
||||||
|
|
@ -128,18 +134,33 @@ GROUPOWNER=@GROUPOWNER@
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
prefix=@prefix@
|
prefix=@prefix@
|
||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
|
datarootdir=@datarootdir@
|
||||||
bindir=@bindir@
|
bindir=@bindir@
|
||||||
|
docdir=@docdir@
|
||||||
|
mandir=@mandir@
|
||||||
|
man6dir=$(mandir)/man6
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $*.o $*.c
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $*.o $*.c
|
||||||
|
|
||||||
|
all: $(PROGRAM) docs
|
||||||
|
|
||||||
$(PROGRAM): $(OBJS) $(MAKEFILE)
|
$(PROGRAM): $(OBJS) $(MAKEFILE)
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(CRLIB) -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJS) urogue a.out core *.map urogue.exe urogue.cat
|
rm -f $(OBJS) urogue a.out core *.map urogue.exe $(PROGRAM).cat
|
||||||
|
|
||||||
install: $(PROGRAM)
|
docs: $(DOCS)
|
||||||
|
|
||||||
|
$(PROGRAM).cat: urogue.6
|
||||||
|
if test "x$(GROFF)" != "x" ; then \
|
||||||
|
$(GROFF) -P-c -P-b -P-u -Tascii -man urogue.6 > $(PROGRAM).cat ;\
|
||||||
|
elif test "x$(NROFF)" != "x" && test "x$(COLCRT)" != "x" ; then \
|
||||||
|
$(NROFF) -man urogue.6 | $(COLCRT) - > $(PROGRAM).cat ;\
|
||||||
|
fi
|
||||||
|
|
||||||
|
install: all
|
||||||
touch test
|
touch test
|
||||||
if test ! -f $(DESTDIR)$(SCOREFILE) ; then \
|
if test ! -f $(DESTDIR)$(SCOREFILE) ; then \
|
||||||
mkdir -p `dirname $(DESTDIR)$(SCOREFILE)` ; \
|
mkdir -p `dirname $(DESTDIR)$(SCOREFILE)` ; \
|
||||||
|
|
@ -165,10 +186,16 @@ install: $(PROGRAM)
|
||||||
chmod 0775 $(DESTDIR)$(SAVEDIR) ; \
|
chmod 0775 $(DESTDIR)$(SAVEDIR) ; \
|
||||||
chmod 0775 $(DESTDIR)$(CHARDIR) ; \
|
chmod 0775 $(DESTDIR)$(CHARDIR) ; \
|
||||||
fi
|
fi
|
||||||
|
mkdir -p $(DESTDIR)$(man6dir)
|
||||||
|
$(INSTALL) -m 0644 urogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6
|
||||||
|
mkdir -p $(DESTDIR)$(docdir)
|
||||||
|
$(INSTALL) -m 0644 $(DOCS) $(RAWDOCS) $(DESTDIR)$(docdir)
|
||||||
$(RM) test
|
$(RM) test
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
$(RM) $(DESTDIR)$(bindir)/$(PROGRAM)
|
$(RM) $(DESTDIR)$(bindir)/$(PROGRAM)
|
||||||
|
$(RM) $(DESTDIR)$(man6dir)/$(PROGRAM).6
|
||||||
|
$(RM) -r $(DESTDIR)$(docdir)
|
||||||
|
|
||||||
reinstall: uninstall install
|
reinstall: uninstall install
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,9 @@ AC_CHECK_FUNCS([erasechar killchar alarm getpass memset setenv strchr nlist _spa
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
# Programs to process the documentation
|
# Programs to process the documentation
|
||||||
#AC_CHECK_PROG([NROFF], [nroff], [nroff],)
|
AC_CHECK_PROG([NROFF], [nroff], [nroff],)
|
||||||
#AC_CHECK_PROG([GROFF], [groff], [groff],)
|
AC_CHECK_PROG([GROFF], [groff], [groff],)
|
||||||
#AC_CHECK_PROG([COLCRT], [colcrt], [colcrt],)
|
AC_CHECK_PROG([COLCRT], [colcrt], [colcrt],)
|
||||||
#AC_CHECK_PROG([TBL], [tbl], [tbl],)
|
|
||||||
|
|
||||||
AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="urogue"] )
|
AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="urogue"] )
|
||||||
PROGRAM=$progname
|
PROGRAM=$progname
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue