Skip to content

Commit

Permalink
Rename config subdirectory -> m4
Browse files Browse the repository at this point in the history
"config" is ambiguous (what are we configuring?).  "m4" is a very
standard directory name in autotools projects
  • Loading branch information
d-torrance committed Oct 15, 2024
1 parent f131714 commit 49e4901
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 17 deletions.
8 changes: 4 additions & 4 deletions M2/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ clean:
if [ -f Makefile ] ; then $(MAKE) -f Makefile clean-tools ; fi

install: configured; $(MAKE) -C distributions $@
@srcdir@/configure : @srcdir@/configure.ac @srcdir@/config/files; $(MAKE) -C @srcdir@ -f Makefile
@srcdir@/configure : @srcdir@/configure.ac @srcdir@/m4/files; $(MAKE) -C @srcdir@ -f Makefile
recheck config.status: @srcdir@/configure @srcdir@/Macaulay2/packages/=distributed-packages
$(WHY)
./config.status --recheck
Expand Down Expand Up @@ -105,13 +105,13 @@ srcdir:
subst: config.status ; ./config.status
show: config.status
<$< sed -e 's/\\\n//' |egrep '^[SD]\["' | sed -e 's/^S."\(.*\)"\]="\(.*\)"$$/\1=\2/' -e 's/^D."\(.*\)"\]="\(.*\)"$$/#define \1 \2/' -e 's/\\"/"/g'
CONFIG_FILES = @srcdir@/configure @srcdir@/install-sh @srcdir@/config.sub @srcdir@/config.guess @srcdir@/config/files
CONFIG_FILES = @srcdir@/configure @srcdir@/install-sh @srcdir@/config.sub @srcdir@/config.guess @srcdir@/m4/files
reconfigure-top-only: recheck check-for-undefined-configure-variables protect-configs
protect-configs:
@ chmod a-w $(shell cat @srcdir@/config/files)
@ chmod a-w $(shell cat @srcdir@/m4/files)
check-for-undefined-configure-variables:
: "checking for strings that look like undefined configure variables in all *.in files..."
@ if egrep -nH '@[A-Za-z_]+@' $(shell cat @srcdir@/config/files) | sed -e 's=^\([^:]*\):=@srcdir@/\1.in:=' | egrep . ; \
@ if egrep -nH '@[A-Za-z_]+@' $(shell cat @srcdir@/m4/files) | sed -e 's=^\([^:]*\):=@srcdir@/\1.in:=' | egrep . ; \
then exit 1; \
fi
configure-help: $(CONFIG_FILES) ; @ @srcdir@/configure --help
Expand Down
21 changes: 10 additions & 11 deletions M2/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@ AC_INIT([Macaulay2],[m4_esyscmd_s([cat VERSION])],[https://github.com/Macaulay2/
AC_MSG_NOTICE([configuring Macaulay2 version $PACKAGE_VERSION])
AC_CONFIG_SRCDIR([VERSION])
AC_CONFIG_HEADERS(include/M2/config.h)
AC_CONFIG_FILES(m4_include(config/files))
AC_CONFIG_FILES(m4_include(m4/files))
AC_SUBST(CONFIGURED_FILES,"$ac_config_files")
AC_SUBST(CONFIG_ARGS,"$ac_configure_args")
echo "'$0' $ac_configure_args" > config.args
C_CONFIG_ARGS=` echo "$ac_configure_args" | sed -e 's=\\\\=\\\\\\\\=g' -e 's=\\"=\\\\"=g' `
AC_DEFINE_UNQUOTED(CONFIG_ARGS,"$C_CONFIG_ARGS",arguments used for configure)
AC_SUBST(CONFIG_CMD,"'$0' $ac_configure_args")

AC_CONFIG_MACRO_DIR([config]) dnl can't get this to work
m4_include(config/ax_compare_version.m4)
m4_include(config/ax_prog_cc_for_build.m4)
m4_include(config/ax_func_accept_argtypes.m4)
m4_include(config/relpaths.m4)
m4_include(config/gtest.m4)
m4_include(config/openmp.m4)
m4_include(config/search-libraries.m4)
m4_include(config/ax_boost_base.m4)
m4_include(config/ax_boost_regex.m4)
m4_include(m4/ax_compare_version.m4)
m4_include(m4/ax_prog_cc_for_build.m4)
m4_include(m4/ax_func_accept_argtypes.m4)
m4_include(m4/relpaths.m4)
m4_include(m4/gtest.m4)
m4_include(m4/openmp.m4)
m4_include(m4/search-libraries.m4)
m4_include(m4/ax_boost_base.m4)
m4_include(m4/ax_boost_regex.m4)

dnl define(TO_UPPER,[translit($1, [a-z], [A-Z])])

Expand Down
2 changes: 1 addition & 1 deletion M2/libraries/Makefile.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# replace FOO by the name of the library or package
# install this file as FOO/Makefile.in
# add libraries/FOO/Makefile to ../config/files
# add libraries/FOO/Makefile to ../m4/files
# run make -C ../..
# reconfigure in the build directory
HOMEPAGE =
Expand Down
2 changes: 1 addition & 1 deletion M2/libraries/lrslib/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# replace lrslib by the name of the library or package
# install this file as lrslib/Makefile.in
# add libraries/lrslib/Makefile to ../config/files
# add libraries/lrslib/Makefile to ../m4/files
# run make -C ../..
# reconfigure in the build directory
HOMEPAGE = http://www-cgrl.cs.mcgill.ca/~avis/C/lrs.html
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 49e4901

Please sign in to comment.