#  $Id: Makefile.in 0.16 1995/12/20 00:01:06 tom Exp $
###############################################################################
#
#  UN*X `Makefile.in' to create the extended  `gcal'  program by autoconf.
#
#  Copyright (C) 1994, 1995     Thomas Esken            <esken@uni-muenster.de>
#                               Im Hagenfeld 84
#                               D-48147 M"unster
#                               GERMANY
#
#                               and the FREE SOFTWARE FOUNDATION
#
###############################################################################
#
#
#
DEF = -D#
#
#  BEGIN: General program modification symbols,
#           which may be changed by the user !!
#



#  Write the line `DEBUG = $(DEF)DEBUG=1'
#    for including some debugging code in program.
#
#  Write the line `DEBUG = $(DEF)DEBUG=0'
#    if you don't need it...
#
#DEBUG = $(DEF)DEBUG=0#



#  Write the line `USE_CATH = $(DEF)USE_CATH=1'
#    for showing some specific Catholic holidays in eternal holiday list, too.
#
#  Write the line `USE_CATH = $(DEF)USE_CATH=0'
#    if you don't need them...
#
#USE_CATH = $(DEF)USE_CATH=1#



#  Write the line `USE_EASC = $(DEF)USE_EASC=1'
#    in case you want to use the 8-bit extended IBM-ASCII character set.
#
#  Write the line `USE_EASC = $(DEF)USE_EASC=0'
#    in case you want to use the 7-bit ISO-ASCII/EBCDIC character set.
#
#USE_EASC = $(DEF)USE_EASC=0#



#  Write the line `USE_GER = $(DEF)USE_GER=1'
#    in case you want to use German message texts, holidays
#    and calendar layout.
#
#  Write the line `USE_GER = $(DEF)USE_GER=0'
#    in case you want to use English message texts, holidays
#    and calendar layout.
#
#USE_GER = $(DEF)USE_GER=0#



#  Write the line `USE_HLS = $(DEF)USE_HLS=1'
#    to run this program using control sequences for highlighting the current
#    day/holidays/text (MS/PC-DOS will use the [n]ansi.sys driver for emitting
#    ANSI escape highlighting sequences; OS2/Linux/UN*X-like systems will use
#    Termcap for emitting the terminal specific highlighting sequences.
#    If this fails, default (generic) ANSI highlighting sequences will be used).
#
#  Write the line `USE_HLS = $(DEF)USE_HLS=0'
#    to run this program without highlighting...
#
#USE_HLS = $(DEF)USE_HLS=1#



#  Write the line `USE_PAGER = $(DEF)USE_PAGER=1'
#    in case you want to use an external pager or if it fails
#    a simple, built-in pager.
#
#  Write the line `USE_PAGER = $(DEF)USE_PAGER=0'
#    in case you don't like this feature...
#
#USE_PAGER = $(DEF)USE_PAGER=1#



#  Write the line `USE_RC = $(DEF)USE_RC=1'
#    for using the special month dates functions (print daily / weekly
#    monthly / yearly / eternal / special fixed dates as stated in
#    resource files).
#
#  Write the line `USE_RC = $(DEF)USE_RC=0'
#    if you don't like this feature...
#
#USE_RC = $(DEF)USE_RC=1#



#  Write the line `USE_USHDY = $(DEF)USE_USHDY=1'
#    for showing additional specific U.S. holidays in eternal holiday
#    list, too (active only if symbol USE_GER is set to 0).
#
#  Write the line `USE_USHDY = $(DEF)USE_USHDY=0'
#    if you don't need them...
#
#USE_USHDY = $(DEF)USE_USHDY=0#



#  Specify, which directories shall be used for the resource files:
#
#  (Define the empty string \"\" if you don't need library directories,
#  so library files are searched in the actual and $HOME directory only)
#
#
#  Name of user (private access) specific library directory
#    (relative to $HOME directory)
#
GCAL_USR_LIBDIR = \"lib/gcal-lib\"
#
#  Name of system (common access) specific library directory
#    (static to $(prefix) directory)
#
GCAL_SYS_LIBDIR = \"$(prefix)/lib/gcal-lib\"



#  Write the line `EXIT_STAT_HLP = $(DEF)EXIT_STAT_HLP=127'
#    if you want the exit status 127 on a given --help, --long-help[=ARG],
#    --license and --version argument.
#
#  Comment the line `EXIT_STAT_HLP = $(DEF)EXIT_STAT_HLP=127' or write
#    `EXIT_STAT_HLP = $(DEF)EXIT_STAT_HLP=0' if you want the exit status 0
#     on a given --help, --long-help[=ARG], --license and --version argument.
#
#EXIT_STAT_HLP = $(DEF)EXIT_STAT_HLP=127#



#  Either write the line `GREG_1582 = $(DEF)GREG_1582=1'
#    if you want the Gregorian reformation have occured in 1582
#  or write the line `GREG_1752 = $(DEF)GREG_1752=1'
#    if you want the Gregorian reformation have occured in 1752.
#
#  Using this is not necessary in most cases, because this year is
#    set correctly depending on selected language to use (see USE_GER);
#    this means to the year 1582 for German users and to the year 1752
#    for English/American users by default.  But if you want to change
#    this, feel free to do.
#
#GREG_1582 = $(DEF)GREG_1582=0#
#GREG_1752 = $(DEF)GREG_1752=0#



#
#
#
DEFINES = $(DEBUG) $(USE_CATH) $(USE_EASC) $(USE_GER) \
  $(USE_HLS) $(USE_PAGER) $(USE_RC) $(USE_USHDY)
DEFINES2 = $(DEF)GCAL_USR_LIBDIR=$(GCAL_USR_LIBDIR) \
  $(DEF)GCAL_SYS_LIBDIR=$(GCAL_SYS_LIBDIR)
DEFINES3 = $(EXIT_STAT_HLP) $(GREG_1582) $(GREG_1752)


#
#  END: general program modification symbols,
#         which may be changed by the user !!
#






#### Start of system configuration section. ####

srcdir = @srcdir@
VPATH = @srcdir@

lang = @lang@

MAKEINFO = @MAKEINFO@
MAKEINFOVERSION = @MAKEINFOVERSION@
TEXI2DVI = @TEXI2DVI@

SHAR = @SHAR@
ZIP = @ZIP@
ZOO = @ZOO@
LHA = @LHA@
TAR = @TAR@
GZIP = @GZIP@
COMPRESS = @COMPRESS@

FIND = @FIND@

AWK = @AWK@
PERL = @PERL@

CC = @CC@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

# Things you might add to DEFS (configure usually figures out what to do):
#
# HAVE_LIBTERMCAP      - Link -ltermcap to executable.
# HAVE_LIBTERMLIB      - Link -ltermlib instead of -ltermcap to executable.
# STDC_HEADERS         - ANSI-C header files, use <stdio.h>, <stdlib.h>
#                          and <string.h> implicitly.
# HAVE_STDIO_H         - Use <stdio.h>.
# HAVE_STDLIB_H        - Use <stdlib.h>. Not needed if STDC_HEADERS are defined.
# HAVE_STRING_H        - If not defined, use <strings.h>, not <string.h>.
#                          Not needed if STDC_HEADERS are defined.
# HAVE_UNISTD_H        - Use <unistd.h>.
# HAVE_CTYPE_H         - Use <ctype.h>.
# HAVE_ASSERT_H        - Use <assert.h>.
# HAVE_FCNTL_H         - Use <fcntl.h>.
# HAVE_SIGNAL_H        - Use <signal.h>.
# HAVE_TERMIO_H        - Use <termio.h>.
# HAVE_TERMIOS_H       - Use <termios.h>.
# HAVE_SGTTY_H         - Use <sgtty.h>.
# HAVE_TERMCAP_H       - Use <termcap.h>.
# HAVE_SYS_IOCTL_H     - Use <sys/ioctl.h>.
# HAVE_SYS_STREAM_H    - Use <sys/stream.h>.
# HAVE_SYS_PTEM_H      - Use <sys/ptem.h>.
# HAVE_SYS_TYPES_H     - Use <sys/types.h>.
# HAVE_SYS_TIME_H      - Use <sys/time.h> instead of <time.h>.
# HAVE_SYS_WAIT_H      - Use <sys/wait.h>.
# HAVE_TIME_T          - Type time_t is predefined.
# TIME_WITH_SYS_TIME   - Use both <time.h> and <sys/time.h>.
# HAVE_VOID            - Identifier void exists.
# HAVE_DUP             - Function dup() is found.
# HAVE_DUP2            - Function dup2() is found.
# HAVE_STRTOL          - Function strtol() is found.
# HAVE_STRSTR          - Function strstr() is found.
# HAVE_STRCHR          - Function strchr() is found.
# HAVE_STRRCHR         - Function strrchr() is found.
# HAVE_ISDIGIT         - Function/macro isdigit() is found.
# HAVE_ISALNUM         - Function/macro isalnum() is found.
# HAVE_UPPER_LOWER     - Functions/macros toupper(), tolower(),
#                          isupper() and islower() are found.
# HAVE_TERMIOS_FUNCS   - All termios functions are available.
# HAVE_OSPEED          - The ospeed variable is defined in
#                          -ltermcap or -ltermlib.
# MUST_DCL_OSPEED      - We must declare the ospeed variable.
# HAVE_SYS_INTERPRETER - Shell can interpret `#!' in the first
#                          line of a shell script
#
# Further internal symbols you might want to set:
#
# CUT_LONGNAMES        - Cuts respectively replaces some long variable or
#                          function names to 6 significant places so ANY
#                          linker should be able to bind an executable file.

DEFS = @DEFS@
LIBS = @LIBS@

CFLAGS = @CFLAGS@
CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@
LDFLAGS = @LDFLAGS@

X=
# For OS/2 or MSDOS, use: X=.exe

O=.o
# For OS/2 or MSDOS, use: O=.obj

prefix = @prefix@
exec_prefix = @exec_prefix@

# Where to install the executables.
bindir = $(exec_prefix)/bin
# In this case datadir is that directory, where .gcalrc is installed.
datadir = $(HOME)
# Where to install the converted reminder/appointment files.
datesdir = $(prefix)/`echo $(GCAL_USR_LIBDIR) | sed -e 's/\"//g'`
# Where to install the info files.
infodir = $(prefix)/info
# Extension (not including `.') for the installed manual page file names.
manext = 1
# Where to install the manual pages.
mandir = $(prefix)/man/man$(manext)

#### End of system configuration section. ####



#### Start of package specific make variable definition section. ####

SHELL = /bin/sh

#
# Compressor/archiver flags.
#
SHARFLAGS = -MF
ZIPFLAGS = -ur9
ZOOFLAGS = ahI
LHAFLAGS = u
TARFLAGS = -cvf
GZIPFLAGS = -c9
COMPRESSFLAGS = -c

#
# Other utility program flags.
#
FINDFLAGS = -type f -print
MAKEINFOFLAGS = --output
#
# For text documentation files, makeinfo MUST be called exactly in this way!
#
MAKEINFOFLAGS2 = --no-split --no-headers $(MAKEINFOFLAGS)

#
# File owner permissions used for all distribution targets.
#
DISTBINPERMS = 0777
DISTSRCPERMS = 0666
#
# File owner permissions used for installdates targets and
# for resetting the permissions after running a distribution target.
#
BINPERMS = `echo $(INSTALL_PROGRAM) | sed -e 's/[^0-9]//g'`
SRCPERMS = `echo $(INSTALL_DATA) | sed -e 's/[^0-9]//g'`
#
# File owner permissions used for installdates targets and
# for resetting the permissions after running a distribution target
# if the configure script doesn't set $(BINPERMS) or $(SRCPERMS).
#
BINPERMS2 = 0755
SRCPERMS2 = 0644

#
# Standard names.
#

SRCS = gcal.c gcal_fil.c gcal_hdy.c gcal_prt.c \
  gcal_rc.c gcal_rcc.c gcal_rcu.c gcal_tty.c gcal_utl.c

OBJS = gcal$O gcal_fil$O gcal_hdy$O gcal_prt$O \
  gcal_rc$O gcal_rcc$O gcal_rcu$O gcal_tty$O gcal_utl$O

HDRS = gcal.h gcal_def.h gcal_tai.h

genFILES = BUGS COPYING README README2 INSTALL \
  SYMBOLS NEWS HISTORY TODO THANKS MANIFEST \
  Makefile.in configure.in gcal_cfg.h.in \
  gcalrc $(SRCS) $(HDRS)

toolscriptDIR = scripts#
toolscriptFILES = $(toolscriptDIR)/cal2gcal.awk $(toolscriptDIR)/cal2gcal.pl \
  $(toolscriptDIR)/ct2gcal.awk $(toolscriptDIR)/ct2gcal.pl

calendarsDIR = calendars#
calendarsFILES = $(calendarsDIR)/calendar.birth $(calendarsDIR)/calendar.chris \
  $(calendarsDIR)/calendar.compu $(calendarsDIR)/calendar.histo \
  $(calendarsDIR)/calendar.holid $(calendarsDIR)/calendar.judai \
  $(calendarsDIR)/calendar.music $(calendarsDIR)/calendar.ushol

datesDIR = dates#
datesFILES = $(datesDIR)/ancient $(datesDIR)/can_holiday $(datesDIR)/celtic \
  $(datesDIR)/computing $(datesDIR)/events $(datesDIR)/events1 \
  $(datesDIR)/events2 $(datesDIR)/events3 $(datesDIR)/events4 \
  $(datesDIR)/events5 $(datesDIR)/events6 $(datesDIR)/gdead \
  $(datesDIR)/hawaii $(datesDIR)/literature $(datesDIR)/lives \
  $(datesDIR)/lives1 $(datesDIR)/lives2 $(datesDIR)/lives3 \
  $(datesDIR)/lives4 $(datesDIR)/lives5 $(datesDIR)/lives6 $(datesDIR)/lotr \
  $(datesDIR)/movies $(datesDIR)/music $(datesDIR)/radio $(datesDIR)/sfo \
  $(datesDIR)/space $(datesDIR)/sports $(datesDIR)/television \
  $(datesDIR)/usa_holiday $(datesDIR)/usa_other $(datesDIR)/usa_states \
  $(datesDIR)/witchcraft $(datesDIR)/world

datesmiscFILES = $(datesDIR)/CREDITS $(datesDIR)/README

shellscriptFILES = configure install-sh mkinstalldirs tcal

docDIR = doc#
manDIR = $(docDIR)/man#
manFILES = $(manDIR)/gcal-de.1 $(manDIR)/gcal-us.1

txtDIR = $(docDIR)/txt#
txtFILES = $(txtDIR)/gcal-de.doc $(txtDIR)/gcal-us.doc

de-infoFILES = gcal-de.info gcal-de.info-1 gcal-de.info-2 \
  gcal-de.info-3 gcal-de.info-4

us-infoFILES = gcal-us.info gcal-us.info-1 gcal-us.info-2 \
  gcal-us.info-3 gcal-us.info-4

texDIR = $(docDIR)/tex#
texFILES = $(texDIR)/2umlaut.awk $(texDIR)/2umlaut.pl \
  $(texDIR)/texinfo.tex $(texDIR)/texinfog.tex \
  $(texDIR)/isolatin1.tex \
  $(texDIR)/gcal-de.texi $(texDIR)/gcal-us.texi

#
#  Machine specific names.
#

acornDIR = acorn#
acornFILES = $(acornDIR)/readme.arm $(acornDIR)/makefile.gcc

amigaDIR = amiga#
amigaFILES = $(amigaDIR)/makefile.sas $(amigaDIR)/makefile.gcc

atariDIR = atari#
atariFILES = $(atariDIR)/makefile.st

linuxDIR = linux#
linuxFILES = $(linuxDIR)/gcal-039.lsm

ntDIR = nt#
ntFILES = $(ntDIR)/makefile.nt

msdosDIR = msdos#
msdosFILES = $(msdosDIR)/gcal_tc2.prj $(msdosDIR)/makefile.bcc \
  $(msdosDIR)/makefile.djg $(msdosDIR)/makefile.msc $(msdosDIR)/makefile.tc2 \
  $(msdosDIR)/makefile.tcc $(msdosDIR)/makefile.wcc $(msdosDIR)/makefile.ztc

os2DIR = os2#
os2FILES = $(os2DIR)/readme.os2 $(os2DIR)/makefile.emx $(os2DIR)/makefile.msc \
  $(os2DIR)/gcal.def $(os2DIR)/gcal16.def

primosDIR = primos#
primosINCDIR = $(primosDIR)/include#
primosFILES = $(primosDIR)/readme.pri $(primosDIR)/ci.opts \
  $(primosDIR)/build.cpl $(primosDIR)/getenv.c $(primosINCDIR)/stdlib.h

vmsDIR = vms#
vmsFILES = $(vmsDIR)/readme.vms $(vmsDIR)/makegcal.com $(vmsDIR)/makefile.gcc \
  $(vmsDIR)/makefile.mms $(vmsDIR)/makefile.vms

#
# Combined names.
#

DISTDIRS = $(acornDIR) $(atariDIR) $(amigaDIR) $(calendarsDIR) $(datesDIR) \
  $(docDIR) $(manDIR) $(txtDIR) $(texDIR) $(linuxDIR) $(msdosDIR) $(ntDIR) \
  $(os2DIR) $(primosDIR) $(primosINCDIR) $(toolscriptDIR) $(vmsDIR)

DISTFILES = $(genFILES) $(shellscriptFILES) $(manFILES) $(texFILES) \
  $(toolscriptFILES) $(calendarsFILES) $(datesmiscFILES) $(datesFILES) \
  $(acornFILES) $(amigaFILES) $(atariFILES) $(linuxFILES) $(msdosFILES) \
  $(ntFILES) $(os2FILES) $(primosFILES) $(vmsFILES)

CREATFILES = $(txtFILES) $(INFOFILES)

INFOFILES = $(de-infoFILES) $(us-infoFILES)

ALLDIRS = $(bindir) $(datadir) $(infodir) $(mandir)

ALLDIRS2 = $(ALLDIRS) $(datesdir)

#### End of package specific make variable definition section. ####



#### Start of default targets section. ####

#.PHONY: check

default: gcal$X

all: gcal$X

force:

#
# My private maintainer target.
#
overall: check install dist distzip
	@echo "All targets created"

check: gcal$X
	./gcal$X > ./_gcal.test 2>&1
	if test "$(lang)" = German; \
	then \
	  if test "`wc -l < ./_gcal.test`" -eq "10"; \
	  then \
	    echo "OK ./gcal$X test"; \
	  else \
	    echo "FAILED ./gcal$X test: program buggy - report to author"; \
	    exit 1; \
	  fi; \
	else \
	  if test "`wc -l < ./_gcal.test`" -eq "9"; \
	  then \
	    echo "OK ./gcal$X test"; \
	  else \
	    echo "FAILED ./gcal$X test: program buggy - report to author"; \
	    exit 1; \
	  fi; \
	fi
	rm -f ./_gcal.test

TAGS: $(SRCS) $(HDRS)
	cd $(srcdir); \
	etags $(SRCS) $(HDRS)

help:
	@echo
	@echo "Most important Makefile targets:"
	@echo
	@echo "Standard:       default  all  force  overall  check  TAGS  help"
	@echo
	@echo "Machine:        next  next-fat  os2_gcc  xenix_286  coherent"
	@echo
	@echo "Configuration:  Makefile  config.status  $(srcdir)/configure"
	@echo
	@echo "Binary:         gcal$X  gcal$O  gcal_fil$O  gcal_hdy$O  gcal_prt$O"
	@echo "                gcal_rc$O  gcal_rcc$O  gcal_rcu$O  gcal_tty$O  gcal_utl$O"
	@echo
	@echo "Documentation:  gcal.txt  txt  gcal.info  info  gcal.dvi  dvi"
	@echo
	@echo "Installation:   install      installdirs  installbin   installscript"
	@echo "                installdata  installman   installinfo  installdates"
	@echo
	@echo "Cleaning up:    clean        texclean   distclean  archiveclean"
	@echo "                mostlyclean  realclean  uninstall  maintainer-clean"
	@echo
	@echo "Distribution:   dist  distzip  distzoo  distlha  distshar"
	@echo
	@exit 0

#### End of default targets section. ####



#### Start of specific targets section. ####

#
# 'configure' works only on Unix systems. For other systems able to make
# sense of this makefile, you can define target specific entries here.
# For other systems such as MSDOS, separate Makefiles are
# provided in subdirectories.
#

#
# NeXT 2.x, 3.0, 3.1 thin. For gcc, replace -bsd with -D__STRICT_BSD__.
#
next:
	$(MAKE) all CFLAGS="-O -bsd" \
	DEFS="-UHAVE_STDLIB_H -UHAVE_STRING_H"
 
#
# NeXT 3.1 fat (68k + 386). For gcc, replace -bsd with -D__STRICT_BSD__.
#
next-fat:
	$(MAKE) all \
	CFLAGS="-O2 -bsd -fno-builtin" \
	DEFS="-UHAVE_STDLIB_H -UHAVE_STRING_H"

#
# gcc with emx 0.8f kit (use by preference os2/makefile.emx)
#
os2_gcc:
	$(MAKE) all CC=gcc CFLAGS="-O -DOS2" X=".exe"

#
# Xenix 2.3.2 for 286:
#
xenix_286:
	$(MAKE) all CFLAGS="-HUGE -M2h"

#
# Coherent (with broken /bin/sh):
#
coherent:
	$(MAKE) all \
	DEFS="-DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1"

#### End of specific targets section. ####



#### Start of (auto)configure specific section. ####

$(srcdir)/configure: configure.in
	@echo "Warning: $(srcdir)/configure is out of date"
#	cd $(srcdir); \
#	autoconf

gcal_cfg.h: stamp-h

stamp-h: gcal_cfg.h.in config.status
	CONFIG_FILES= CONFIG_HEADERS=gcal_cfg.h $(SHELL) ./config.status
	echo timestamp > stamp-h

Makefile: Makefile.in config.status
	CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status

config.status: configure
	$(SHELL) ./config.status --recheck

#### End of (auto)configure specific section. ####



#### Start of message section. ####

msg4:
	@echo
	@echo "This command is intended for maintainers to use;"
	@echo "rebuilding the deleted files requires makeinfo."

msg3:
	@echo
	@echo "Ok, lets erase some files..."

msg2:
	@echo
	@echo "Checking..."

msg: msg2
	@echo
	@echo "Building for *** $(lang) *** users   =8^)"
	@echo

#### End of message section. ####



#### Start of implicit rules section. ####

.c$O:
	@echo "Compiling \`$<' ..."
	$(CC) -c $(CPPFLAGS) $(DEFINES) $(DEFINES2) $(DEFINES3) $(DEFS) $(CFLAGS) $<

#### End of implicit rules section. ####



#### Start of actual build-related targets section. ####

#
# Try to create the object files and the resulting executable file.
#

gcal$X: msg Makefile $(OBJS)
	@echo "Linking object files"
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
	@echo "Executable file ./gcal$X created"

gcal$O: gcal.h gcal_cfg.h gcal_def.h gcal_tai.h

gcal_fil$O: gcal.h gcal_cfg.h gcal_def.h gcal_tai.h

gcal_hdy$O: gcal.h gcal_cfg.h gcal_def.h gcal_tai.h

gcal_prt$O: gcal.h gcal_cfg.h gcal_def.h gcal_tai.h

gcal_rc$O: gcal.h gcal_cfg.h gcal_def.h gcal_tai.h

gcal_rcc$O: gcal.h gcal_cfg.h gcal_def.h gcal_tai.h

gcal_rcu$O: gcal.h gcal_cfg.h gcal_def.h gcal_tai.h

gcal_tty$O: gcal.h gcal_cfg.h gcal_def.h gcal_tai.h

gcal_utl$O: gcal.h gcal_cfg.h gcal_def.h gcal_tai.h

#
# If not exists, try to create both German and English text documentation
# files for distribution (dist, distzip, distzoo, distlha and distshar)
# from *.texi files and strip all index entries.
#

gcal.txt: msg2 $(srcdir)/$(texDIR)/gcal-de.texi $(srcdir)/$(texDIR)/gcal-us.texi
	if test ! -f "$(srcdir)/$(txtDIR)/gcal-de.doc" || test ! -f "$(srcdir)/$(txtDIR)/gcal-us.doc"; \
	then \
	  if test -n "$(ZIP)" || test -n "$(ZOO)" || test -n "$(LHA)" || test -n "$(SHAR)" \
	  || (test -n "$(TAR)" && (test -n "$(GZIP)" || test -n "$(COMPRESS)")); \
	  then \
	    if test -n "$(MAKEINFO)" && test -n "$(MAKEINFOVERSION)"; \
	    then \
	      echo "Creating text documentation files"; \
	      echo "Please wait..."; \
	      if test ! -f "$(srcdir)/$(txtDIR)/gcal-de.doc"; \
	      then \
	        $(MAKEINFO) $(MAKEINFOFLAGS2) gcal-de.doc $(srcdir)/$(texDIR)/gcal-de.texi; \
	        cat gcal-de.doc | \
	        sed -e 's/* Menu:/(entfernt)/g' \
	            -e 's/*note/*siehe/g' \
	            -e 's/*Note/*Siehe/g' \
	            -e 's/Footnotes/Fu\"snoten/g' \
	            -e '/^* /d' > $(srcdir)/$(txtDIR)/gcal-de.doc; \
 	        rm -f gcal*.doc; \
	        echo "$(srcdir)/$(txtDIR)/gcal-de.doc created"; \
	      fi; \
	      if test ! -f "$(srcdir)/$(txtDIR)/gcal-us.doc"; \
	      then \
	        $(MAKEINFO) $(MAKEINFOFLAGS2) gcal-us.doc $(srcdir)/$(texDIR)/gcal-us.texi; \
	        cat gcal-us.doc | \
	        sed -e 's/* Menu:/(removed)/g' \
	            -e '/^* /d' > $(srcdir)/$(txtDIR)/gcal-us.doc; \
 	        rm -f gcal*.doc; \
	        echo "$(srcdir)/$(txtDIR)/gcal-us.doc created"; \
	      fi; \
	    else \
	      if test -z "$(MAKEINFO)"; \
	      then \
	        echo "Unable to create text documentation files, missing \`makeinfo'"; \
	      else \
	        echo "Unable to create text documentation files, \`makeinfo' out of date"; \
	      fi; \
	    fi; \
	  else \
	    echo "Text documentation files not created because"; \
	    echo "archiver respectively compressor programs are missing"; \
	  fi; \
	else \
	  echo "Creation of text documentation files unnecessary"; \
	fi

txt: gcal.txt

#
# If not exists, try to create both German and English info documentation
# files for distribution (dist, distzip, distzoo, distlha and distshar).
#

gcal.info: msg2 $(srcdir)/$(texDIR)/gcal-de.texi $(srcdir)/$(texDIR)/gcal-us.texi
	if test ! -f "$(srcdir)/gcal-de.info" || test ! -f "$(srcdir)/gcal-us.info"; \
	then \
	  if test -n "$(MAKEINFO)"; \
	  then \
	    echo "Creating info files"; \
	    echo "Please wait..."; \
	    if test ! -f "$(srcdir)/gcal-de.info"; \
	    then \
	      $(MAKEINFO) $(MAKEINFOFLAGS) $(srcdir)/gcal-de.info $(srcdir)/$(texDIR)/gcal-de.texi; \
	      echo "$(srcdir)/gcal-de.info* created"; \
	    fi; \
	    if test ! -f "$(srcdir)/gcal-us.info"; \
	    then \
	      $(MAKEINFO) $(MAKEINFOFLAGS) $(srcdir)/gcal-us.info $(srcdir)/$(texDIR)/gcal-us.texi; \
	      echo "$(srcdir)/gcal-us.info* created"; \
	    fi; \
	  else \
	    echo "Unable to create info files, missing \`makeinfo'"; \
	  fi; \
	else \
	  echo "Creation of info files unnecessary"; \
	fi

info: gcal.info

#
# Try to create dvi documentation file according to selected language.
#
# If German language is selected, convert the German Texinfo file by
# perl (prefered) or awk to get the German "Umlaute" characters.
#

gcal.dvi: msg $(srcdir)/$(texDIR)/gcal-de.texi $(srcdir)/$(texDIR)/gcal-us.texi
	if test ! -f "gcal.dvi"; \
	then \
	  if test -n "$(TEXI2DVI)"; \
	  then \
	    echo "Creating dvi file"; \
	    echo "Please wait..."; \
	    if test "$(lang)" = German; \
	    then \
	      if test -n "$(PERL)"; \
	      then \
	        echo "$(PERL) converts German Umlaute in \`$(srcdir)/$(texDIR)/gcal-de.texi' ..."; \
	        $(PERL) $(srcdir)/$(texDIR)/2umlaut.pl $(srcdir)/$(texDIR)/gcal-de.texi > \
	        $(srcdir)/$(texDIR)/gcal.texi; \
	      else \
	        if test -n "$(AWK)"; \
	        then \
	          echo "$(AWK) converts German Umlaute in \`$(srcdir)/$(texDIR)/gcal-de.texi' ..."; \
	          $(AWK) -f $(srcdir)/$(texDIR)/2umlaut.awk $(srcdir)/$(texDIR)/gcal-de.texi > \
	          $(srcdir)/$(texDIR)/gcal.texi; \
	        else \
	          echo "German Umlaute not converted, missing \`perl' / \`awk'"; \
	          cp $(srcdir)/$(texDIR)/gcal-de.texi $(srcdir)/$(texDIR)/gcal.texi; \
	        fi; \
	      fi; \
	    else \
	      cp $(srcdir)/$(texDIR)/gcal-us.texi $(srcdir)/$(texDIR)/gcal.texi; \
	    fi; \
	    $(TEXI2DVI) $(srcdir)/$(texDIR)/gcal.texi; \
	    rm -f $(srcdir)/$(texDIR)/gcal.texi; \
	    echo "gcal.dvi file created"; \
	  else \
	    echo "Unable to create dvi file, missing \`texi2dvi'"; \
	  fi; \
	else \
	  echo "Creation of dvi file unnecessary"; \
	fi

dvi: gcal.dvi

#### End of actual build-related targets section. ####



#### Start of install section. ####

install: msg installdirs installbin installscript installdata installman installdates installinfo
	@echo "All installs done"

installdirs: $(srcdir)/mkinstalldirs
	if test -n "$(AWK)" || test -n "$(PERL)"; \
	then \
	  $(SHELL) $(srcdir)/mkinstalldirs $(ALLDIRS2); \
	else \
	  $(SHELL) $(srcdir)/mkinstalldirs $(ALLDIRS); \
	fi
	@echo "All necessary directorys found respectively created"

installbin: all installdirs
	@echo "Installing \`./gcal$X' to \`$(bindir)/gcal$X'"
	$(INSTALL_PROGRAM) ./gcal$X $(bindir)/gcal$X
	@echo "Binary file installed"

installscript: msg2 installdirs
	@echo "Installing \`$(srcdir)/tcal' to \`$(bindir)/tcal'"
	$(INSTALL_PROGRAM) $(srcdir)/tcal $(bindir)/tcal
	@echo "Shell script file installed"

installdata: msg2 $(srcdir)/gcalrc installbin
	@echo "Installing \`$(srcdir)/gcalrc' to \`$(datadir)/.gcalrc'"
	$(INSTALL_DATA) $(srcdir)/gcalrc $(datadir)/.gcalrc
	@echo "Data file installed"

installman: msg installdirs $(srcdir)/$(manDIR)/gcal-de.1 $(srcdir)/$(manDIR)/gcal-us.1
	rm -f $(mandir)/gcal.$(manext)
	if test "$(lang)" = German; \
	then \
	  file=$(srcdir)/$(manDIR)/gcal-de.1; \
	else \
	  file=$(srcdir)/$(manDIR)/gcal-us.1; \
	fi; \
	echo "Installing \`$$file' to \`$(mandir)/gcal.$(manext)'"; \
	$(INSTALL_DATA) $$file $(mandir)/gcal.$(manext)
	@echo "Manual page installed"

#
# If `makeinfo' program exists, either install all `gcal-de.info' or `gcal-us.info'
# files renamed to `gcal.info' into infodir running `makeinfo' again, else install
# them with their original name into infodir.
#
installinfo: msg2 gcal.info installdirs $(srcdir)/$(texDIR)/gcal-de.texi $(srcdir)/$(texDIR)/gcal-us.texi
	rm -f $(infodir)/gcal*.info*
	if test -n "$(MAKEINFO)"; \
	then \
	  if test "$(lang)" = German; \
	  then \
	    $(MAKEINFO) $(srcdir)/$(texDIR)/gcal-de.texi; \
	  else \
	    $(MAKEINFO) $(srcdir)/$(texDIR)/gcal-us.texi; \
	  fi; \
	  for file in `echo gcal.info*`; \
	  do \
	    echo "Installing \`$$file' to \`$(infodir)/$$file'"; \
	    $(INSTALL_DATA) $$file $(infodir)/$$file; \
	    rm -f $$file; \
	  done; \
	else \
	  if test "$(lang)" = German; \
	  then \
	    for file in `echo $(srcdir)/gcal-de.info*`; \
	    do \
	      echo "Installing \`$$file' to \`$(infodir)/$$file'"; \
	      $(INSTALL_DATA) $$file $(infodir)/$$file; \
	    done; \
	  else \
	    for file in `echo $(srcdir)/gcal-us.info*`; \
	    do \
	      echo "Installing \`$$file' to \`$(infodir)/$$file'"; \
	      $(INSTALL_DATA) $$file $(infodir)/$$file; \
	    done; \
	  fi; \
	fi
	@echo "Info files installed"

#
# Only if a reminder/appointment file which we have to install,
# is NOT in the library directory, then we will install it.
# This is because the complete installation process is rather slow.
# Prefering perl!
#
installdates: msg $(calendarsFILES) $(datesmiscFILES) $(datesFILES) installdirs
	if test -n "$(AWK)" || test -n "$(PERL)"; \
	then \
	  we_installed=no; \
	  if test -n "$(PERL)"; \
	  then \
	    cp $(srcdir)/$(toolscriptDIR)/cal2gcal.pl cal2gcal; \
	  else \
	    cp $(srcdir)/$(toolscriptDIR)/cal2gcal.awk cal2gcal; \
	  fi; \
	  for file in $(calendarsFILES); \
	  do \
	    install_target=$(datesdir)/`echo $$file | sed -e 's/$(calendarsDIR)\///'`; \
	    if test ! -f "$$install_target"; \
	    then \
	      if test -n "$(PERL)"; \
	      then \
	        echo "$(PERL) installs \`$(srcdir)/$$file' to \`$$install_target'"; \
	        $(PERL) cal2gcal $(srcdir)/$$file > $$install_target; \
	      else \
	        echo "$(AWK) installs \`$(srcdir)/$$file' to \`$$install_target'"; \
	        $(AWK) -f cal2gcal $(srcdir)/$$file > $$install_target; \
	      fi; \
	      if test -n "$(SRCPERMS)"; \
	      then \
	        chmod $(SRCPERMS) $$install_target; \
	      else \
	        chmod $(SRCPERMS2) $$install_target; \
	      fi; \
	      we_installed=yes; \
	    fi; \
	  done; \
	  rm -f cal2gcal; \
	  if test -n "$(PERL)"; \
	  then \
	    echo "\$$lang = '$(lang)';" > ct2gcal; \
	    cat $(srcdir)/$(toolscriptDIR)/ct2gcal.pl >> ct2gcal; \
	  else \
	    echo "lang = \"$(lang)\"" > ct2gcal; \
	    cat $(srcdir)/$(toolscriptDIR)/ct2gcal.awk >> ct2gcal; \
	  fi; \
	  for file in $(datesFILES); \
	  do \
	    install_target=$(datesdir)/`echo $$file | sed -e 's/$(datesDIR)\///'`; \
	    if test ! -f "$$install_target"; \
	    then \
	      if test -n "$(PERL)"; \
	      then \
	        echo "$(PERL) installs \`$(srcdir)/$$file' to \`$$install_target'"; \
	        $(PERL) ct2gcal $(srcdir)/$$file > $$install_target; \
	      else \
	        echo "$(AWK) installs \`$(srcdir)/$$file' to \`$$install_target'"; \
	        $(AWK) -f ct2gcal $(srcdir)/$$file > $$install_target; \
	      fi; \
	      if test -n "$(SRCPERMS)"; \
	      then \
	        chmod $(SRCPERMS) $$install_target; \
	      else \
	        chmod $(SRCPERMS2) $$install_target; \
	      fi; \
	      we_installed=yes; \
	    fi; \
	  done; \
	  rm -f ct2gcal; \
	  for file in $(datesmiscFILES); \
	  do \
	    install_target=$(datesdir)/`echo $$file | sed -e 's/$(datesDIR)\///'`; \
	    if test ! -f "$$install_target"; \
	    then \
	      echo "Installing \`$(srcdir)/$$file' to \`$$install_target'"; \
	      $(INSTALL_DATA) $(srcdir)/$$file $$install_target; \
	      we_installed=yes; \
	    fi; \
	  done; \
	  if test "$$we_installed" = yes; \
	  then \
	    if test -n "$(BINPERMS)"; \
	    then \
	      chmod $(BINPERMS) $(datesdir); \
	    else \
	      chmod $(BINPERMS2) $(datesdir); \
	    fi; \
	    echo "Dates files installed"; \
	  else \
	    echo "Installation of dates files unnecessary"; \
	  fi; \
	else \
	  echo "Unable to install dates files, missing \`awk' and \`perl'"; \
	fi

uninstall: msg3
	@echo "Please wait..."
	rm -f $(bindir)/gcal$X $(bindir)/tcal$X $(datadir)/.gcalrc
	rm -f $(mandir)/gcal*.$(manext) $(infodir)/gcal*.info*
	if test -n "$(AWK)" || test -n "$(PERL)"; \
	then \
	  for file in $(calendarsFILES); \
	  do \
	    uninstall_target=$(datesdir)/`echo $$file | sed -e 's/$(calendarsDIR)\///'`; \
	    rm -f $$uninstall_target; \
	  done; \
	  for file in $(datesFILES) $(datesmiscFILES); \
	  do \
	    uninstall_target=$(datesdir)/`echo $$file | sed -e 's/$(datesDIR)\///'`; \
	    rm -f $$uninstall_target; \
	  done; \
	fi
	@echo "Distribution uninstalled"

#### End of install section. ####



#### Start of clean section. ####

clean: msg3
	rm -f *$O gcal$X a.out core cal2gcal ct2gcal *~ *.tmp _gcal.test \
	$(srcdir)/$(texDIR)/gcal.texi gcal*.doc gcal.info* gcal.dvi

texclean: msg3
	rm -f *.ar *.ars *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys
	rm -f *.log *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs

archiveclean: msg3
	rm -f *.gz *.z *.Z *.zip *.zoo *.lzh *.shar*

distclean: clean texclean archiveclean
	rm -f Makefile config.status config.cache config.log gcal_cfg.h stamp-h

mostlyclean: distclean

realclean: distclean
	rm -f TAGS
	rm -f tags

maintainer-clean: msg4 realclean
	if test -n "$(MAKEINFO)"; \
	then \
	  rm -f $(srcdir)/gcal*.info*; \
	  if test -n "$(MAKEINFOVERSION)"; \
	  then \
	    rm -f $(srcdir)/$(txtDIR)/gcal*.doc; \
	  fi; \
	fi

#### End of clean section. ####



#### Start of distribution section. ####

#
# Prefering gzip!
#
dist: msg2 $(DISTFILES) Makefile gcal.txt $(txtFILES) gcal.info $(INFOFILES)
	distname=gcal-`sed -e '/VERSION_NO/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' $(srcdir)/gcal_def.h`; \
	if (test -n "$(GZIP)" && test ! -f "$$distname.tar.gz") || \
	(test -n "$(COMPRESS)" && test ! -f "$$distname.tar.Z"); \
	then \
	  if test -n "$(TAR)" && (test -n "$(GZIP)" || test -n "$(COMPRESS)"); \
	  then \
	    if test -n "$(GZIP)"; \
	    then \
	      echo "Creating $$distname.tar.gz"; \
	    else \
	      echo "Creating $$distname.tar.Z"; \
	    fi; \
	    echo "Please wait..."; \
	    rm -rf $$distname; \
	    mkdir $$distname; \
	    chmod $(DISTBINPERMS) $$distname; \
	    for dir in $(DISTDIRS); \
	    do \
	      mkdir $$distname/$$dir; \
	      chmod $(DISTBINPERMS) $$distname/$$dir; \
	    done; \
	    for file in $(DISTFILES) $(CREATFILES); \
	    do \
	      ln $(srcdir)/$$file $$distname/$$file 2>/dev/null || \
	      { \
	        echo "Cannot link, copying \`$(srcdir)/$$file'"; \
	        cp -p $(srcdir)/$$file $$distname/$$file; \
	      }; \
	      chmod $(DISTSRCPERMS) $$distname/$$file; \
	    done; \
	    for file in $(shellscriptFILES); \
	    do \
	      chmod $(DISTBINPERMS) $$distname/$$file; \
	    done; \
	    if test -n "$(GZIP)"; \
	    then \
	      $(TAR) $(TARFLAGS) - $$distname | $(GZIP) $(GZIPFLAGS) > $$distname.tar.gz; \
	      echo "$$distname.tar.gz created"; \
	    else \
	      $(TAR) $(TARFLAGS) - $$distname | $(COMPRESS) $(COMPRESSFLAGS) > $$distname.tar.Z; \
	      echo "$$distname.tar.Z created"; \
	    fi; \
	    rm -rf $$distname; \
	    if test -n "$(SRCPERMS)"; \
	    then \
	      for file in $(DISTFILES) $(CREATFILES); \
	      do \
	        chmod $(SRCPERMS) $$file; \
	      done; \
	    else \
	      for file in $(DISTFILES) $(CREATFILES); \
	      do \
	        chmod $(SRCPERMS2) $$file; \
	      done; \
	    fi; \
	    if test -n "$(BINPERMS)"; \
	    then \
	      for file in $(shellscriptFILES); \
	      do \
	        chmod $(BINPERMS) $$file; \
	      done; \
	    else \
	      for file in $(shellscriptFILES); \
	      do \
	        chmod $(BINPERMS2) $$file; \
	      done; \
	    fi; \
	  else \
	    if test -z "$(TAR)"; \
	    then \
	      echo "Unable to create $$distname.tar, missing \`tar'"; \
	    else \
	      if test -z "$(GZIP)"; \
	      then \
	        echo "Unable to create $$distname.tar.gz, missing \`gzip'"; \
	      else \
	        echo "Unable to create $$distname.tar.Z, missing \`compress'"; \
	      fi; \
	    fi; \
	  fi; \
	else \
	  if test -f "$$distname.tar.gz"; \
	  then \
	    echo "Creation of $$distname.tar.gz unnecessary"; \
	  else \
	    echo "Creation of $$distname.tar.Z unnecessary"; \
	  fi; \
	fi

distzip: msg2 $(DISTFILES) Makefile gcal.txt $(txtFILES) gcal.info $(INFOFILES)
	distname=gcal-`sed -e '/VERSION_NO/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e s/[.]//g $(srcdir)/gcal_def.h`; \
	if test ! -f "$$distname.zip"; \
	then \
	  if test -n "$(ZIP)"; \
	  then \
	    echo "Creating $$distname.zip"; \
	    echo "Please wait..."; \
	    rm -rf $$distname; \
	    mkdir $$distname; \
	    chmod $(DISTBINPERMS) $$distname; \
	    for dir in $(DISTDIRS); \
	    do \
	      mkdir $$distname/$$dir; \
	      chmod $(DISTBINPERMS) $$distname/$$dir; \
	    done; \
	    for file in $(DISTFILES) $(CREATFILES); \
	    do \
	      ln $(srcdir)/$$file $$distname/$$file 2>/dev/null || \
	      { \
	        echo "Cannot link, copying \`$(srcdir)/$$file'"; \
	        cp -p $(srcdir)/$$file $$distname/$$file; \
	      }; \
	      chmod $(DISTSRCPERMS) $$distname/$$file; \
	    done; \
	    for file in $(shellscriptFILES); \
	    do \
	      chmod $(DISTBINPERMS) $$distname/$$file; \
	    done; \
	    $(ZIP) $(ZIPFLAGS) $$distname $$distname; \
	    echo "$$distname.zip created"; \
	    rm -rf $$distname; \
	    if test -n "$(SRCPERMS)"; \
	    then \
	      for file in $(DISTFILES) $(CREATFILES); \
	      do \
	        chmod $(SRCPERMS) $$file; \
	      done; \
	    else \
	      for file in $(DISTFILES) $(CREATFILES); \
	      do \
	        chmod $(SRCPERMS2) $$file; \
	      done; \
	    fi; \
	    if test -n "$(BINPERMS)"; \
	    then \
	      for file in $(shellscriptFILES); \
	      do \
	        chmod $(BINPERMS) $$file; \
	      done; \
	    else \
	      for file in $(shellscriptFILES); \
	      do \
	        chmod $(BINPERMS2) $$file; \
	      done; \
	    fi; \
	  else \
	    echo "Unable to create $$distname.zip, missing \`zip'"; \
	  fi; \
	else \
	  echo "Creation of $$distname.zip unnecessary"; \
	fi

distzoo: msg2 $(DISTFILES) Makefile gcal.txt $(txtFILES) gcal.info $(INFOFILES)
	distname=gcal-`sed -e '/VERSION_NO/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e s/[.]//g $(srcdir)/gcal_def.h`; \
	if test ! -f "$$distname.zoo"; \
	then \
	  if test -n "$(FIND)"; \
	  then \
	    if test -n "$(ZOO)"; \
	    then \
	      echo "Creating $$distname.zoo"; \
	      echo "Please wait..."; \
	      rm -rf $$distname; \
	      mkdir $$distname; \
	      chmod $(DISTBINPERMS) $$distname; \
	      for dir in $(DISTDIRS); \
	      do \
	        mkdir $$distname/$$dir; \
	        chmod $(DISTBINPERMS) $$distname/$$dir; \
	      done; \
	      for file in $(DISTFILES) $(CREATFILES); \
	      do \
	        ln $(srcdir)/$$file $$distname/$$file 2>/dev/null || \
	        { \
	          echo "Cannot link, copying \`$(srcdir)/$$file'"; \
	          cp -p $(srcdir)/$$file $$distname/$$file; \
	        }; \
	        chmod $(DISTSRCPERMS) $$distname/$$file; \
	      done; \
	      for file in $(shellscriptFILES); \
	      do \
	        chmod $(DISTBINPERMS) $$distname/$$file; \
	      done; \
	      $(FIND) $$distname $(FINDFLAGS) | $(ZOO) $(ZOOFLAGS) $$distname; \
	      echo "$$distname.zoo created"; \
	      rm -rf $$distname; \
	      if test -n "$(SRCPERMS)"; \
	      then \
	        for file in $(DISTFILES) $(CREATFILES); \
	        do \
	          chmod $(SRCPERMS) $$file; \
	        done; \
	      else \
	        for file in $(DISTFILES) $(CREATFILES); \
	        do \
	          chmod $(SRCPERMS2) $$file; \
	        done; \
	      fi; \
	      if test -n "$(BINPERMS)"; \
	      then \
	        for file in $(shellscriptFILES); \
	        do \
	          chmod $(BINPERMS) $$file; \
	        done; \
	      else \
	        for file in $(shellscriptFILES); \
	        do \
	          chmod $(BINPERMS2) $$file; \
	        done; \
	      fi; \
	    else \
	      echo "Unable to create $$distname.zoo, missing \`zoo'"; \
	    fi; \
	  else \
	    echo "Unable to create $$distname.zoo, missing \`find'"; \
	  fi; \
	else \
	  echo "Creation of $$distname.zoo unnecessary"; \
	fi

distlha: msg2 $(DISTFILES) Makefile gcal.txt $(txtFILES) gcal.info $(INFOFILES)
	distname=gcal-`sed -e '/VERSION_NO/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e s/[.]//g $(srcdir)/gcal_def.h`; \
	if test ! -f "$$distname.lzh"; \
	then \
	  if test -n "$(LHA)"; \
	  then \
	    echo "Creating $$distname.lzh"; \
	    echo "Please wait..."; \
	    rm -rf $$distname; \
	    mkdir $$distname; \
	    chmod $(DISTBINPERMS) $$distname; \
	    for dir in $(DISTDIRS); \
	    do \
	      mkdir $$distname/$$dir; \
	      chmod $(DISTBINPERMS) $$distname/$$dir; \
	    done; \
	    for file in $(DISTFILES) $(CREATFILES); \
	    do \
	      ln $(srcdir)/$$file $$distname/$$file 2>/dev/null || \
	      { \
	        echo "Cannot link, copying \`$(srcdir)/$$file'"; \
	        cp -p $(srcdir)/$$file $$distname/$$file; \
	      }; \
	      chmod $(DISTSRCPERMS) $$distname/$$file; \
	    done; \
	    for file in $(shellscriptFILES); \
	    do \
	      chmod $(DISTBINPERMS) $$distname/$$file; \
	    done; \
	    $(LHA) $(LHAFLAGS) $$distname.lzh $$distname; \
	    echo "$$distname.lzh created"; \
	    rm -rf $$distname; \
	    if test -n "$(SRCPERMS)"; \
	    then \
	      for file in $(DISTFILES) $(CREATFILES); \
	      do \
	        chmod $(SRCPERMS) $$file; \
	      done; \
	    else \
	      for file in $(DISTFILES) $(CREATFILES); \
	      do \
	        chmod $(SRCPERMS2) $$file; \
	      done; \
	    fi; \
	    if test -n "$(BINPERMS)"; \
	    then \
	      for file in $(shellscriptFILES); \
	      do \
	        chmod $(BINPERMS) $$file; \
	      done; \
	    else \
	      for file in $(shellscriptFILES); \
	      do \
	        chmod $(BINPERMS2) $$file; \
	      done; \
	    fi; \
	  else \
	    echo "Unable to create $$distname.lzh, missing \`lha' or \`lharc'"; \
	  fi; \
	else \
	  echo "Creation of $$distname.lzh unnecessary"; \
	fi

distshar: msg2 $(DISTFILES) Makefile gcal.txt $(txtFILES) gcal.info $(INFOFILES)
	distname=gcal-`sed -e '/VERSION_NO/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' $(srcdir)/gcal_def.h`; \
	if test ! -f "$$distname.shar*"; \
	then \
	  if test -n "$(SHAR)"; \
	  then \
	    echo "Creating $$distname.shar"; \
	    echo "Please wait..."; \
	    rm -rf $$distname; \
	    mkdir $$distname; \
	    chmod $(DISTBINPERMS) $$distname; \
	    for dir in $(DISTDIRS); \
	    do \
	      mkdir $$distname/$$dir; \
	      chmod $(DISTBINPERMS) $$distname/$$dir; \
	    done; \
	    for file in $(DISTFILES) $(CREATFILES); \
	    do \
	      ln $(srcdir)/$$file $$distname/$$file 2>/dev/null || \
	      { \
	        echo "Cannot link, copying \`$(srcdir)/$$file'"; \
	        cp -p $(srcdir)/$$file $$distname/$$file; \
	      }; \
	      chmod $(DISTSRCPERMS) $$distname/$$file; \
	    done; \
	    for file in $(shellscriptFILES); \
	    do \
	      chmod $(DISTBINPERMS) $$distname/$$file; \
	    done; \
	    $(SHAR) $(SHARFLAGS) -o$$distname.shar $$distname; \
	    echo "$$distname.shar created"; \
	    rm -rf $$distname; \
	    if test -n "$(SRCPERMS)"; \
	    then \
	      for file in $(DISTFILES) $(CREATFILES); \
	      do \
	        chmod $(SRCPERMS) $$file; \
	      done; \
	    else \
	      for file in $(DISTFILES) $(CREATFILES); \
	      do \
	        chmod $(SRCPERMS2) $$file; \
	      done; \
	    fi; \
	    if test -n "$(BINPERMS)"; \
	    then \
	      for file in $(shellscriptFILES); \
	      do \
	        chmod $(BINPERMS) $$file; \
	      done; \
	    else \
	      for file in $(shellscriptFILES); \
	      do \
	        chmod $(BINPERMS2) $$file; \
	      done; \
	    fi; \
	  else \
	    echo "Unable to create $$distname.shar, missing \`shar'"; \
	  fi; \
	else \
	  echo "Creation of $$distname.shar unnecessary"; \
	fi

#### End of distribution section. ####



# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

# End of file
