Commit 1a16b9e9 authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Add support for Automake-style silent make rules.

Based on a patch by Jeff Smith. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49841Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent bd375702
...@@ -122,7 +122,7 @@ programs/winetest/build.rc: dummy ...@@ -122,7 +122,7 @@ programs/winetest/build.rc: dummy
@build="STRINGTABLE { 1 \"`GIT_DIR=$(srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || (rm -f $@ && exit 1) @build="STRINGTABLE { 1 \"`GIT_DIR=$(srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || (rm -f $@ && exit 1)
programs/winetest/build.nfo: programs/winetest/build.nfo:
-$(CC) -v 2>$@ @-$(CC) -v 2>$@
dlls/wineandroid.drv/wine-debug.apk: dlls/wineandroid.drv/build.gradle $(srcdir)/dlls/wineandroid.drv/AndroidManifest.xml $(srcdir)/dlls/wineandroid.drv/WineActivity.java $(srcdir)/dlls/wineandroid.drv/wine.svg dlls/wineandroid.drv/wine-debug.apk: dlls/wineandroid.drv/build.gradle $(srcdir)/dlls/wineandroid.drv/AndroidManifest.xml $(srcdir)/dlls/wineandroid.drv/WineActivity.java $(srcdir)/dlls/wineandroid.drv/wine.svg
cd dlls/wineandroid.drv && gradle -q -Psrcdir=$(srcdir) assembleDebug cd dlls/wineandroid.drv && gradle -q -Psrcdir=$(srcdir) assembleDebug
......
...@@ -841,6 +841,7 @@ enable_win16 ...@@ -841,6 +841,7 @@ enable_win16
enable_win64 enable_win64
enable_tests enable_tests
enable_maintainer_mode enable_maintainer_mode
enable_silent_rules
enable_werror enable_werror
with_alsa with_alsa
with_capi with_capi
...@@ -2575,6 +2576,7 @@ Optional Features: ...@@ -2575,6 +2576,7 @@ Optional Features:
--disable-tests do not build the regression tests --disable-tests do not build the regression tests
--enable-maintainer-mode --enable-maintainer-mode
enable maintainer-specific build rules enable maintainer-specific build rules
--enable-silent-rules use silent build rules (override: "make V=1")
--enable-werror treat compilation warnings as errors --enable-werror treat compilation warnings as errors
--disable-largefile omit support for large files --disable-largefile omit support for large files
...@@ -3903,6 +3905,11 @@ if test "${enable_maintainer_mode+set}" = set; then : ...@@ -3903,6 +3905,11 @@ if test "${enable_maintainer_mode+set}" = set; then :
enableval=$enable_maintainer_mode; enableval=$enable_maintainer_mode;
fi fi
# Check whether --enable-silent-rules was given.
if test "${enable_silent_rules+set}" = set; then :
enableval=$enable_silent_rules;
fi
# Check whether --enable-werror was given. # Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then : if test "${enable_werror+set}" = set; then :
enableval=$enable_werror; enableval=$enable_werror;
...@@ -19805,6 +19812,9 @@ LDAP_LIBS = $LDAP_LIBS ...@@ -19805,6 +19812,9 @@ LDAP_LIBS = $LDAP_LIBS
" "
makedep_flags=""
test "x$enable_silent_rules" = xyes && makedep_flags="$makedep_flags -S"
wine_fn_append_rule " wine_fn_append_rule "
# Rules automatically generated by configure # Rules automatically generated by configure
...@@ -19815,7 +19825,7 @@ all: Makefile ...@@ -19815,7 +19825,7 @@ all: Makefile
Makefile: $srcdir/Makefile.in config.status \$(MAKEDEP) Makefile: $srcdir/Makefile.in config.status \$(MAKEDEP)
@./config.status Make.tmp Makefile @./config.status Make.tmp Makefile
depend: \$(MAKEDEP) depend: \$(MAKEDEP)
\$(MAKEDEP) \$(MAKEDEP)$makedep_flags
dummy: dummy:
.PHONY: depend dummy" .PHONY: depend dummy"
...@@ -21879,7 +21889,7 @@ wine_fn_output_makedep () ...@@ -21879,7 +21889,7 @@ wine_fn_output_makedep ()
} }
wine_fn_output_makefile () wine_fn_output_makefile ()
{ {
cat Make.tmp - <<\_WINE_EOF >\$tmp/makefile && mv -f \$tmp/makefile \$1 && rm -f Make.tmp && "$wine_makedep" && return cat Make.tmp - <<\_WINE_EOF >\$tmp/makefile && mv -f \$tmp/makefile \$1 && rm -f Make.tmp && "$wine_makedep"$makedep_flags && return
`cat $wine_rules_file` `cat $wine_rules_file`
_WINE_EOF _WINE_EOF
as_fn_error $? "could not create Makefile" "$LINENO" 5 as_fn_error $? "could not create Makefile" "$LINENO" 5
......
...@@ -32,6 +32,7 @@ AC_ARG_ENABLE(win16, AS_HELP_STRING([--disable-win16],[do not include Win16 supp ...@@ -32,6 +32,7 @@ AC_ARG_ENABLE(win16, AS_HELP_STRING([--disable-win16],[do not include Win16 supp
AC_ARG_ENABLE(win64, AS_HELP_STRING([--enable-win64],[build a Win64 emulator on AMD64 (won't run Win32 binaries)])) AC_ARG_ENABLE(win64, AS_HELP_STRING([--enable-win64],[build a Win64 emulator on AMD64 (won't run Win32 binaries)]))
AC_ARG_ENABLE(tests, AS_HELP_STRING([--disable-tests],[do not build the regression tests])) AC_ARG_ENABLE(tests, AS_HELP_STRING([--disable-tests],[do not build the regression tests]))
AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode],[enable maintainer-specific build rules])) AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode],[enable maintainer-specific build rules]))
AC_ARG_ENABLE(silent-rules, AS_HELP_STRING([--enable-silent-rules],[use silent build rules (override: "make V=1")]))
AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror],[treat compilation warnings as errors])) AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror],[treat compilation warnings as errors]))
AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa sound support])) AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa sound support]))
...@@ -2739,6 +2740,9 @@ AC_SUBST([ALL_VARS_RULES], ...@@ -2739,6 +2740,9 @@ AC_SUBST([ALL_VARS_RULES],
"m4_set_foreach([_AC_SUBST_VARS],[var],[m4_if(m4_bregexp(m4_defn([var]),[\(_CFLAGS\|_LIBS\)$]),-1,,[var = $var "m4_set_foreach([_AC_SUBST_VARS],[var],[m4_if(m4_bregexp(m4_defn([var]),[\(_CFLAGS\|_LIBS\)$]),-1,,[var = $var
])])") ])])")
makedep_flags=""
test "x$enable_silent_rules" = xyes && makedep_flags="$makedep_flags -S"
dnl Main makefile dnl Main makefile
WINE_APPEND_RULE([ WINE_APPEND_RULE([
...@@ -2750,7 +2754,7 @@ all: Makefile ...@@ -2750,7 +2754,7 @@ all: Makefile
Makefile: $srcdir/Makefile.in config.status \$(MAKEDEP) Makefile: $srcdir/Makefile.in config.status \$(MAKEDEP)
@./config.status Make.tmp Makefile @./config.status Make.tmp Makefile
depend: \$(MAKEDEP) depend: \$(MAKEDEP)
\$(MAKEDEP) \$(MAKEDEP)$makedep_flags
dummy: dummy:
.PHONY: depend dummy]) .PHONY: depend dummy])
...@@ -4049,7 +4053,7 @@ fi ...@@ -4049,7 +4053,7 @@ fi
AC_CONFIG_COMMANDS([Makefile], [wine_fn_output_makefile Makefile], AC_CONFIG_COMMANDS([Makefile], [wine_fn_output_makefile Makefile],
[wine_fn_output_makefile () [wine_fn_output_makefile ()
{ {
cat Make.tmp - <<\_WINE_EOF >\$tmp/makefile && mv -f \$tmp/makefile \$[]1 && rm -f Make.tmp && "$wine_makedep" && return cat Make.tmp - <<\_WINE_EOF >\$tmp/makefile && mv -f \$tmp/makefile \$[]1 && rm -f Make.tmp && "$wine_makedep"$makedep_flags && return
`cat $wine_rules_file` `cat $wine_rules_file`
_WINE_EOF _WINE_EOF
AS_ERROR([could not create Makefile]) AS_ERROR([could not create Makefile])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment