Skip to content

Commit

Permalink
Improve the configure process
Browse files Browse the repository at this point in the history
Use the macro "AC_CONFIG_AUX_DIR" to isolate the auxiliary build tools
in a dedicated directory.
  • Loading branch information
p-gen committed Dec 19, 2016
1 parent 31da404 commit 2ca4c32
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
@@ -1,4 +1,4 @@
bin_PROGRAMS = smenu
smenu_SOURCES = smenu.c
dist_man_MANS = smenu.1
EXTRA_DIST = smenu.spec.in ChangeLog smenu.spec build.sh version COPYRIGHT INTERNALS.rst LICENSE.rst README.rst examples
EXTRA_DIST = smenu.spec.in ChangeLog smenu.spec build.sh version COPYRIGHT INTERNALS.rst LICENSE.rst README.rst examples build-aux
15 changes: 10 additions & 5 deletions Makefile.in
Expand Up @@ -82,9 +82,14 @@ bin_PROGRAMS = smenu$(EXEEXT)
subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(srcdir)/smenu.spec.in depcomp \
$(dist_man_MANS) ChangeLog TODO config.guess config.sub \
install-sh missing
$(srcdir)/config.h.in $(srcdir)/smenu.spec.in \
$(top_srcdir)/build-aux/depcomp $(dist_man_MANS) ChangeLog \
TODO build-aux/config.guess build-aux/config.sub \
build-aux/depcomp build-aux/install-sh build-aux/missing \
$(top_srcdir)/build-aux/config.guess \

This comment has been minimized.

Copy link
@elfring

elfring Dec 20, 2016

  • Do you really need to store such auxiliary build files in your source code repository?
  • Can you refer to the introduced subdirectory by a corresponding variable?
$(top_srcdir)/build-aux/config.sub \
$(top_srcdir)/build-aux/install-sh \
$(top_srcdir)/build-aux/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 Down Expand Up @@ -113,7 +118,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
Expand Down Expand Up @@ -302,7 +307,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
smenu_SOURCES = smenu.c
dist_man_MANS = smenu.1
EXTRA_DIST = smenu.spec.in ChangeLog smenu.spec build.sh version COPYRIGHT INTERNALS.rst LICENSE.rst README.rst examples
EXTRA_DIST = smenu.spec.in ChangeLog smenu.spec build.sh version COPYRIGHT INTERNALS.rst LICENSE.rst README.rst examples build-aux
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions configure
Expand Up @@ -2210,10 +2210,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers config.h"
am__api_version='1.13'
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
for ac_dir in build-aux "$srcdir"/build-aux; do
if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
Expand All @@ -2229,7 +2227,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
fi
done
if test -z "$ac_aux_dir"; then
as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
Expand All @@ -2241,6 +2239,8 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
am__api_version='1.13'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -7,6 +7,7 @@ AC_PREREQ([2.69])
AC_INIT([smenu], [my_version], [p.gen.progs@gmail.com])
AC_CONFIG_SRCDIR([smenu.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([no-dist-gzip dist-bzip2 foreign -Wall])
AM_SILENT_RULES([yes])

Expand Down

0 comments on commit 2ca4c32

Please sign in to comment.