kopia lustrzana https://github.com/jamescoxon/dl-fldigi
				
				
				
			Add silent build rules
* Enable less verbose build output by default by calling the AM_SILENT_RULES macro if available (automake >= 1.11). Verbose output can be enabled by passing --disable-silent-rules to configure, or V=1 to make. * Add silent function for some custom Makefile rulespull/2/head
							rodzic
							
								
									8ae5b22256
								
							
						
					
					
						commit
						5626e1c901
					
				| 
						 | 
				
			
			@ -5,23 +5,23 @@ SUBDIRS = po doc src
 | 
			
		|||
 | 
			
		||||
if HAVE_FLUID
 | 
			
		||||
flgen:
 | 
			
		||||
	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
 | 
			
		||||
	@(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if DARWIN
 | 
			
		||||
appbundle:
 | 
			
		||||
	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
 | 
			
		||||
	@(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if HAVE_NSIS
 | 
			
		||||
nsisinst:
 | 
			
		||||
	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
 | 
			
		||||
	@(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if WANT_FLDIGI
 | 
			
		||||
if ENABLE_HAMLIB
 | 
			
		||||
hamlib-static:
 | 
			
		||||
	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
 | 
			
		||||
	@(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
 | 
			
		||||
endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,6 +47,7 @@ AC_CANONICAL_HOST
 | 
			
		|||
AC_CANONICAL_TARGET
 | 
			
		||||
 | 
			
		||||
AM_INIT_AUTOMAKE([-Wall foreign std-options 1.9.6])
 | 
			
		||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 | 
			
		||||
AM_MAINTAINER_MODE
 | 
			
		||||
AC_CONFIG_SRCDIR([src/main.cxx])
 | 
			
		||||
AC_CONFIG_HEADER([src/config.h])
 | 
			
		||||
| 
						 | 
				
			
			@ -271,6 +272,8 @@ AC_FLDIGI_DOCS
 | 
			
		|||
# Define various build variables in config.h
 | 
			
		||||
AC_FLDIGI_BUILD_INFO
 | 
			
		||||
 | 
			
		||||
### silent build rules
 | 
			
		||||
m4_ifdef([AM_SILENT_RULES], [AC_FLDIGI_BUILD_RULES])
 | 
			
		||||
 | 
			
		||||
### output
 | 
			
		||||
AH_TOP([
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,11 +33,14 @@ endif
 | 
			
		|||
 | 
			
		||||
.SECONDEXPANSION:
 | 
			
		||||
 | 
			
		||||
# Define the custom silent rule function
 | 
			
		||||
@SILENT_CMDS@
 | 
			
		||||
 | 
			
		||||
%.1: $$@.txt $(ASCIIDOC_CONF)
 | 
			
		||||
if HAVE_ASCIIDOC
 | 
			
		||||
	$(A2X) $(A2X_ARGS) $<
 | 
			
		||||
	$(call silent,ADOC  ,$@)$(A2X) $(A2X_ARGS) $<
 | 
			
		||||
else
 | 
			
		||||
	echo '.TH "NOT-BUILT" "1" "" "" ""' > $@
 | 
			
		||||
	$(call silent,ADOC  ,$@)echo '.TH "NOT-BUILT" "1" "" "" ""' > $@
 | 
			
		||||
endif
 | 
			
		||||
# Without .SECONDEXPANSION we would use something like this:
 | 
			
		||||
#$(ASCIIDOC_MAN_INST): asciidoc.conf
 | 
			
		||||
| 
						 | 
				
			
			@ -59,7 +62,7 @@ ASCIIDOC_ARGS = --unsafe -a toc -a data-uri -a badges -a icons -a iconsdir=$(ASC
 | 
			
		|||
	    echo "  ***   make ASCIIDOC_ICONS_DIR=/path/to/icons" >&2; \
 | 
			
		||||
	    false; \
 | 
			
		||||
	fi
 | 
			
		||||
	$(ASCIIDOC) $(ASCIIDOC_ARGS) --out-file $@ $<
 | 
			
		||||
	$(call silent,ADOC  ,$@)$(ASCIIDOC) $(ASCIIDOC_ARGS) --out-file $@ $<
 | 
			
		||||
 | 
			
		||||
all-local: $(ASCIIDOC_MAN_DIST) $(ASCIIDOC_HTML)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										19
									
								
								m4/build.m4
								
								
								
								
							
							
						
						
									
										19
									
								
								m4/build.m4
								
								
								
								
							| 
						 | 
				
			
			@ -87,3 +87,22 @@ $PULSEAUDIO_LIBS $HAMLIB_LIBS $PNG_LIBS $XMLRPC_LIBS $INTL_LIBS $PTW32_LIBS $BFD
 | 
			
		|||
      export LC_ALL
 | 
			
		||||
  fi
 | 
			
		||||
])
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# This macro defines SILENT_CMDS, which is @expanded@ in
 | 
			
		||||
# {src,doc}/Makefile.am to define a function that generates custom build
 | 
			
		||||
# command output depending on the values of the variables
 | 
			
		||||
# $(AM_DEFAULT_VERBOSITY) and $(V).  These variables affect the custom
 | 
			
		||||
# command output in the same way as they do for automake's build rules.
 | 
			
		||||
AC_DEFUN([AC_FLDIGI_BUILD_RULES], [
 | 
			
		||||
  m4_ifdef([AM_SUBST_NOTMAKE], [AM_SUBST_NOTMAKE([SILENT_CMDS])])
 | 
			
		||||
  AC_SUBST([SILENT_CMDS],
 | 
			
		||||
           ['silent_cmd = @echo "  $(1)" $(2);
 | 
			
		||||
            ifeq ($(AM_DEFAULT_VERBOSITY),0)
 | 
			
		||||
                silent = $(if $(subst 0,,$(V)),,$(silent_cmd))
 | 
			
		||||
            else
 | 
			
		||||
                ifeq ($(V),0)
 | 
			
		||||
                    silent = $(silent_cmd)
 | 
			
		||||
                endif
 | 
			
		||||
            endif'])
 | 
			
		||||
])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -89,6 +89,8 @@ FLARQ_VERSION_MINOR = @FLARQ_VERSION_MINOR@
 | 
			
		|||
FLARQ_VERSION_PATCH = @FLARQ_VERSION_PATCH@
 | 
			
		||||
FLARQ_VERSION = @FLARQ_VERSION@
 | 
			
		||||
 | 
			
		||||
# Define the custom silent rule function
 | 
			
		||||
@SILENT_CMDS@
 | 
			
		||||
 | 
			
		||||
.EXPORT_ALL_VARIABLES: appbundle nsisinst hamlib-static
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -103,7 +105,7 @@ CLEAN_LOCAL =
 | 
			
		|||
if WIN32
 | 
			
		||||
if HAVE_WINDRES
 | 
			
		||||
.rc.o:
 | 
			
		||||
	$(WINDRES) -I$(srcdir)/include -I$(srcdir)/../data/win32 $< -O coff $@
 | 
			
		||||
	$(call silent,WRES  ,$@)$(WINDRES) -I$(srcdir)/include -I$(srcdir)/../data/win32 $< -O coff $@
 | 
			
		||||
fldigi_SOURCES += $(FLDIGI_WIN32_RES_SRC)
 | 
			
		||||
flarq_SOURCES += $(FLARQ_WIN32_RES_SRC)
 | 
			
		||||
endif
 | 
			
		||||
| 
						 | 
				
			
			@ -159,14 +161,14 @@ FLARQ_FL_SRC = flarq-src/arqdialogs.fl
 | 
			
		|||
if HAVE_FLUID
 | 
			
		||||
flgen: $(FLDIGI_FL_SRC) $(FLARQ_FL_SRC)
 | 
			
		||||
if WANT_FLDIGI
 | 
			
		||||
	(cd $(srcdir)/include; \
 | 
			
		||||
	$(call silent,FLUID ,$(FLDIGI_FL_SRC))(cd $(srcdir)/include; \
 | 
			
		||||
	for f in $(FLDIGI_FL_SRC); do \
 | 
			
		||||
	    c=$${f%.fl}.cxx; h=$${f%.fl}.h; h=$${h##*/}; \
 | 
			
		||||
	    $(FLUID) -c -o ../$$c -h $$h ../$$f; \
 | 
			
		||||
	done)
 | 
			
		||||
endif
 | 
			
		||||
if WANT_FLARQ
 | 
			
		||||
	(cd $(srcdir)/flarq-src/include; \
 | 
			
		||||
	$(call silent,FLUID ,$(FLARQ_FL_SRC))(cd $(srcdir)/flarq-src/include; \
 | 
			
		||||
	for f in $(FLARQ_FL_SRC); do \
 | 
			
		||||
	    c=$${f%.fl}.cxx; h=$${f%.fl}.h; h=$${h##*/}; \
 | 
			
		||||
	    $(FLUID) -c -o ../../$$c -h $$h ../../$$f; \
 | 
			
		||||
| 
						 | 
				
			
			@ -192,20 +194,20 @@ endif
 | 
			
		|||
 | 
			
		||||
if DARWIN
 | 
			
		||||
appbundle: $(bin_PROGRAMS)
 | 
			
		||||
	sh $(srcdir)/../scripts/mkappbundle.sh "$(srcdir)/../data" .
 | 
			
		||||
	$(call silent,APPB  ,$(APPBUNDLE_NOLIBS) $(APPBUNDLE))sh $(srcdir)/../scripts/mkappbundle.sh "$(srcdir)/../data" .
 | 
			
		||||
    CLEAN_LOCAL += $(APPBUNDLE_NOLIBS) $(APPBUNDLE) $(APPBUNDLE)*.dmg
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if HAVE_NSIS
 | 
			
		||||
nsisinst: $(bin_PROGRAMS)
 | 
			
		||||
	sh $(srcdir)/../scripts/mknsisinst.sh "$(srcdir)/../data" .
 | 
			
		||||
	$(call silent,NSIS  ,$(INSTALLER_FILE))sh $(srcdir)/../scripts/mknsisinst.sh "$(srcdir)/../data" .
 | 
			
		||||
    CLEANFILES += $(INSTALLER_FILE)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if WANT_FLDIGI
 | 
			
		||||
if ENABLE_HAMLIB
 | 
			
		||||
hamlib-static: $(fldigi_OBJECTS)
 | 
			
		||||
	sh $(srcdir)/../scripts/mkhamlibstatic.sh fldigi
 | 
			
		||||
	$(call silent,HLS   ,fldigi$(EXEEXT))sh $(srcdir)/../scripts/mkhamlibstatic.sh fldigi
 | 
			
		||||
endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -213,11 +215,11 @@ TESTS = $(srcdir)/../scripts/tests/config-h.sh $(srcdir)/../scripts/tests/cr.sh
 | 
			
		|||
 | 
			
		||||
if HAVE_ASCIIDOC
 | 
			
		||||
$(builddir)/../doc/guide.html: $(builddir)/../doc/guide.txt
 | 
			
		||||
	$(MAKE) -C $(builddir)/../doc $(AM_MAKEFLAGS) guide.html
 | 
			
		||||
	@$(MAKE) -C $(builddir)/../doc $(AM_MAKEFLAGS) guide.html
 | 
			
		||||
 | 
			
		||||
$(builddir)/dialogs/guide.cxx: $(builddir)/../doc/guide.html
 | 
			
		||||
	mkdir -p $(builddir)/dialogs
 | 
			
		||||
	sed 's/"/\\"/g; s/$$/\\n\\/g; 1 s/.*/const char* szBeginner = "&/; $$ s/.*/&n";/' $< > $@
 | 
			
		||||
	@mkdir -p $(builddir)/dialogs
 | 
			
		||||
	$(call silent,GUIDE ,$@)sed 's/"/\\"/g; s/$$/\\n\\/g; 1 s/.*/const char* szBeginner = "&/; $$ s/.*/&n";/' $< > $@
 | 
			
		||||
dialogs/htmlstrings.cxx: $(builddir)/dialogs/guide.cxx
 | 
			
		||||
 | 
			
		||||
distclean-local:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue