Skip to content

Commit

Permalink
capiinit/capiinfo.8: use configured path for capi.conf
Browse files Browse the repository at this point in the history
Generate capiinit.8 at compile time from capiinit.8.in using 'configure'
to use the configured path for capi.conf instead of the hard-coded
/etc/capi.conf.

The necessary changes took place in configure.ac & autoreconf
  • Loading branch information
marschap committed Apr 22, 2012
1 parent 38b2f41 commit 0f8f4e7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
9 changes: 6 additions & 3 deletions capiinit/Makefile.in
Expand Up @@ -36,8 +36,9 @@ POST_UNINSTALL = :
sbin_PROGRAMS = capiinit$(EXEEXT)
subdir = .
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure depcomp install-sh missing
$(srcdir)/Makefile.in $(srcdir)/capiinit.8.in \
$(srcdir)/config.h.in $(top_srcdir)/configure depcomp \
install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
Expand All @@ -46,7 +47,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_FILES = capiinit.8
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" \
"$(DESTDIR)$(sysconfdir)"
Expand Down Expand Up @@ -264,6 +265,8 @@ $(srcdir)/config.h.in: $(am__configure_deps)

distclean-hdr:
-rm -f config.h stamp-h1
capiinit.8: $(top_builddir)/config.status $(srcdir)/capiinit.8.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
Expand Down
6 changes: 3 additions & 3 deletions capiinit/capiinit.8 → capiinit/capiinit.8.in
Expand Up @@ -17,7 +17,7 @@ is called with one of the following actions:
.TP
\fBstart\fR
Load all modules and initialize all cards (loading the firmware), which are
configured in \fI/etc/capi.conf\fR.
configured in \fI@I4LCONFDIR@/capi.conf\fR.
.TP
\fBstop\fR
Reset all cards and unload modules.
Expand Down Expand Up @@ -58,13 +58,13 @@ Firmware files are searched in this order in the following directories:
\fI/usr/lib/isdn\fR,
\fI/lib/isdn\fR.
.PP
There is a sample config in /etc/capi.conf.
There is a sample config in @I4LCONFDIR@/capi.conf.

.SH OPTIONS
.PP
.TP
\fB-c\fR \fIfilename\fR, \fB--config\fR \fIfilename\fR
Use \fIfilename\fP as config file (default is /etc/capi.conf).
Use \fIfilename\fP as config file (default is @I4LCONFDIR@/capi.conf).
.TP
\fB-d\fR, \fB--debug\fR
Save patch values for debugging purposes.
Expand Down
3 changes: 2 additions & 1 deletion capiinit/configure
Expand Up @@ -3923,7 +3923,7 @@ done
ac_config_headers="$ac_config_headers config.h"
ac_config_files="$ac_config_files Makefile"
ac_config_files="$ac_config_files Makefile capiinit.8"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
Expand Down Expand Up @@ -4657,6 +4657,7 @@ do
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"capiinit.8") CONFIG_FILES="$CONFIG_FILES capiinit.8" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
Expand Down
2 changes: 1 addition & 1 deletion capiinit/configure.ac
Expand Up @@ -24,4 +24,4 @@ dnl Define which variables to substitute & which files to generate
AC_SUBST(I4LCONFDIR)
AM_CONFIG_HEADER(config.h)

AC_OUTPUT(Makefile)
AC_OUTPUT(Makefile capiinit.8)

0 comments on commit 0f8f4e7

Please sign in to comment.