Skip to content

Commit af59d2b

Browse files
author
drscholl
committed
added AM_MAINTAINER_MODE macro to configure.in
1 parent 77a92f8 commit af59d2b

File tree

5 files changed

+121
-54
lines changed

5 files changed

+121
-54
lines changed

ChangeLog

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ added support for the sharing limit messages (619/620)
3434
modified level() to update the db for registered accounts so that level
3535
changes are persistent across logins
3636

37+
added AM_MAINTAINER_MODE macro to configure.in to disable the maintener
38+
rules in the genereate Makefile
39+
3740
Changes from 0.10
3841
=================
3942
added max_connections config variable

Makefile.in

+4-3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ NORMAL_UNINSTALL = :
5858
PRE_UNINSTALL = :
5959
POST_UNINSTALL = :
6060
CC = @CC@
61+
MAINT = @MAINT@
6162
MAKEINFO = @MAKEINFO@
6263
MYSQLINCDIR = @MYSQLINCDIR@
6364
MYSQLLIBDIR = @MYSQLLIBDIR@
@@ -126,19 +127,19 @@ OBJECTS = $(opennap_OBJECTS) $(metaserver_OBJECTS)
126127
all: all-redirect
127128
.SUFFIXES:
128129
.SUFFIXES: .S .c .o .s
129-
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
130+
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
130131
cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
131132

132133
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
133134
cd $(top_builddir) \
134135
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
135136

136-
$(ACLOCAL_M4): configure.in
137+
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
137138
cd $(srcdir) && $(ACLOCAL)
138139

139140
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
140141
$(SHELL) ./config.status --recheck
141-
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
142+
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
142143
cd $(srcdir) && $(AUTOCONF)
143144

144145
mostlyclean-binPROGRAMS:

aclocal.m4

+33
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,39 @@ else
102102
fi
103103
AC_SUBST($1)])
104104

105+
# Add --enable-maintainer-mode option to configure.
106+
# From Jim Meyering
107+
108+
# serial 1
109+
110+
AC_DEFUN(AM_MAINTAINER_MODE,
111+
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
112+
dnl maintainer-mode is disabled by default
113+
AC_ARG_ENABLE(maintainer-mode,
114+
[ --enable-maintainer-mode enable make rules and dependencies not useful
115+
(and sometimes confusing) to the casual installer],
116+
USE_MAINTAINER_MODE=$enableval,
117+
USE_MAINTAINER_MODE=no)
118+
AC_MSG_RESULT($USE_MAINTAINER_MODE)
119+
AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
120+
MAINT=$MAINTAINER_MODE_TRUE
121+
AC_SUBST(MAINT)dnl
122+
]
123+
)
124+
125+
# Define a conditional.
126+
127+
AC_DEFUN(AM_CONDITIONAL,
128+
[AC_SUBST($1_TRUE)
129+
AC_SUBST($1_FALSE)
130+
if $2; then
131+
$1_TRUE=
132+
$1_FALSE='#'
133+
else
134+
$1_TRUE='#'
135+
$1_FALSE=
136+
fi])
137+
105138

106139
# serial 1
107140

0 commit comments

Comments
 (0)