Browse Source

build: Use two space indentation for shell code

Guillem Jover 7 years ago
parent
commit
618fdf4242
6 changed files with 59 additions and 65 deletions
  1. 8 8
      Makefile.am
  2. 4 4
      dselect/Makefile.am
  3. 2 2
      dselect/methods/Makefile.am
  4. 24 28
      man/Makefile.am
  5. 18 20
      scripts/Makefile.am
  6. 3 3
      scripts/mk/Makefile.am

+ 8 - 8
Makefile.am

@@ -179,14 +179,14 @@ update-po:
 dist-hook:
 	echo $(VERSION) >$(distdir)/.dist-version
 	if [ -e .git ]; then \
-		for file in `git ls-files | grep -v .gitignore`; do \
-			if [ ! -e "$(distdir)/$$file" ]; then \
-				echo "$$file is missing in $(distdir)" >&2 ; \
-				exit 1 ; \
-			fi ; \
-		done ; \
-		XDG_CONFIG_HOME= HOME= \
-		git log -C --stat 1.15.0.. >$(distdir)/ChangeLog; \
+	  for file in `git ls-files | grep -v .gitignore`; do \
+	    if [ ! -e "$(distdir)/$$file" ]; then \
+	      echo "$$file is missing in $(distdir)" >&2 ; \
+	      exit 1 ; \
+	    fi ; \
+	  done ; \
+	  XDG_CONFIG_HOME= HOME= \
+	  git log -C --stat 1.15.0.. >$(distdir)/ChangeLog; \
 	fi
 
 clean-local: doc-clean coverage-clean check-clean

+ 4 - 4
dselect/Makefile.am

@@ -56,11 +56,11 @@ CLEANFILES = curkeys.h
 curkeys.$(OBJEXT): curkeys.h
 curkeys.h: $(srcdir)/keyoverride $(srcdir)/mkcurkeys.pl
 	$(AM_V_GEN) cursesfile=`echo '#include "dselect-curses.h"' | \
-		$(CPP) $(CPPFLAGS) -I$(top_builddir) -I $(srcdir) - | \
-		grep '[^-]curses\.h' | head -n 1 | \
-		sed -e 's/^[^"]*"//; s/".*$$//'`; \
+	  $(CPP) $(CPPFLAGS) -I$(top_builddir) -I $(srcdir) - | \
+	  grep '[^-]curses\.h' | head -n 1 | \
+	  sed -e 's/^[^"]*"//; s/".*$$//'`; \
 	if [ "$$cursesfile" = "" ]; then \
-		echo "can't find curses file"; exit 1; \
+	  echo "can't find curses file"; exit 1; \
 	fi; \
 	$(PERL) $(srcdir)/mkcurkeys.pl $< $$cursesfile >$@
 

+ 2 - 2
dselect/methods/Makefile.am

@@ -47,8 +47,8 @@ CLEANFILES = \
 	$(nobase_methods_SCRIPTS) \
 	$(nil)
 
-do_perl_subst = $(AM_V_GEN) \
-	sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):"
+do_perl_subst = $(AM_V_GEN) sed \
+	-e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):"
 
 SUFFIXES = .pl
 

+ 24 - 28
man/Makefile.am

@@ -112,18 +112,16 @@ install-data-local: install-data-local-@USE_PO4A@
 install-data-local-no:
 install-data-local-yes:
 	for lang in $(LINGUAS); do \
-		files=""; \
-		for trans in $(dist_man_MANS); do \
-			if [ -f $(builddir)/$$lang/$$trans ]; then \
-				files="$$files $(builddir)/$$lang/$$trans"; \
-			elif [ -f $(srcdir)/$$lang/$$trans ]; then \
-				files="$$files $(srcdir)/$$lang/$$trans"; \
-			fi; \
-		done; \
-		$(MAKE) install-man \
-			mandir="$(mandir)/$$lang" \
-			man_MANS="" \
-			dist_man_MANS="$$files"; \
+	  files=""; \
+	  for trans in $(dist_man_MANS); do \
+	    if [ -f $(builddir)/$$lang/$$trans ]; then \
+	      files="$$files $(builddir)/$$lang/$$trans"; \
+	    elif [ -f $(srcdir)/$$lang/$$trans ]; then \
+	      files="$$files $(srcdir)/$$lang/$$trans"; \
+	    fi; \
+	  done; \
+	  $(MAKE) install-man mandir="$(mandir)/$$lang" man_MANS="" \
+	          dist_man_MANS="$$files"; \
 	done
 
 uninstall-local: uninstall-local-@USE_PO4A@
@@ -131,25 +129,23 @@ uninstall-local: uninstall-local-@USE_PO4A@
 uninstall-local-no:
 uninstall-local-yes:
 	for lang in $(LINGUAS); do \
-		files=""; \
-		for trans in $(dist_man_MANS); do \
-			if [ -f $(builddir)/$$lang/$$trans ]; then \
-				files="$$files $(builddir)/$$lang/$$trans"; \
-			elif [ -f $(srcdir)/$$lang/$$trans ]; then \
-				files="$$files $(srcdir)/$$lang/$$trans"; \
-			fi; \
-		done; \
-		$(MAKE) uninstall-man \
-			mandir="$(mandir)/$$lang" \
-			man_MANS="" \
-			dist_man_MANS="$$files"; \
+	  files=""; \
+	  for trans in $(dist_man_MANS); do \
+	    if [ -f $(builddir)/$$lang/$$trans ]; then \
+	      files="$$files $(builddir)/$$lang/$$trans"; \
+	    elif [ -f $(srcdir)/$$lang/$$trans ]; then \
+	      files="$$files $(srcdir)/$$lang/$$trans"; \
+	    fi; \
+	  done; \
+	  $(MAKE) uninstall-man mandir="$(mandir)/$$lang" man_MANS="" \
+	          dist_man_MANS="$$files"; \
 	done
 
 dist-hook: man.stamp
 	cp $(srcdir)/man.stamp $(distdir)/
 	for lang in $(LINGUAS_DIST); do \
-		cp $(srcdir)/po/$$lang.po $(distdir)/po; \
-		cp $(srcdir)/po/$$lang.add $(distdir)/po; \
-		$(MKDIR_P) $(distdir)/$$lang; \
-		cp -r $(srcdir)/$$lang $(distdir)/; \
+	  cp $(srcdir)/po/$$lang.po $(distdir)/po; \
+	  cp $(srcdir)/po/$$lang.add $(distdir)/po; \
+	  $(MKDIR_P) $(distdir)/$$lang; \
+	  cp -r $(srcdir)/$$lang $(distdir)/; \
 	done

+ 18 - 20
scripts/Makefile.am

@@ -121,16 +121,16 @@ EXTRA_DIST += \
 # Keep it even if empty to have man3dir correctly set
 man3_MANS =
 
-do_perl_subst = $(AM_V_GEN) \
-		sed -e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \
-		    -e "s:\$$CONFDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$CONFDIR='$(pkgconfdir)':" \
-		    -e "s:\$$ADMINDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$ADMINDIR='$(admindir)':" \
-		    -e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibdir)':" \
-		    -e "s:\$$DATADIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$DATADIR='$(pkgdatadir)':" \
-		    -e "s:\$$PROGVERSION[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$PROGVERSION='$(PACKAGE_VERSION)':"
+do_perl_subst = $(AM_V_GEN) sed \
+	-e "s:^\#![[:space:]]*/usr/bin/perl:\#!$(PERL):" \
+	-e "s:\$$CONFDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$CONFDIR='$(pkgconfdir)':" \
+	-e "s:\$$ADMINDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$ADMINDIR='$(admindir)':" \
+	-e "s:\$$LIBDIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$LIBDIR='$(pkglibdir)':" \
+	-e "s:\$$DATADIR[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$DATADIR='$(pkgdatadir)':" \
+	-e "s:\$$PROGVERSION[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$PROGVERSION='$(PACKAGE_VERSION)':"
 
-do_shell_subst = $(AM_V_GEN) \
-		 sed -e "s:^version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:version=\"$(PACKAGE_VERSION)\":"
+do_shell_subst = $(AM_V_GEN) sed \
+	-e "s:^version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:version=\"$(PACKAGE_VERSION)\":"
 
 SUFFIXES = .pl .sh
 
@@ -151,12 +151,12 @@ if BUILD_POD_DOC
 # Remove empty manual pages (perl modules not documented)
 	$(MKDIR_P) $(DESTDIR)$(man3dir)
 	for module in $(nobase_dist_perllib_DATA); do \
-	    name=`echo $$module | sed -e 's|/|::|g' -e 's/\.pm$$//'`; \
-	    $(POD2MAN) --utf8 --center=libdpkg-perl --release=$(VERSION) \
-		--name="$$name" --section=3 $(srcdir)/$$module \
-		>$(DESTDIR)$(man3dir)/$$name.3; \
-	    test -s $(DESTDIR)$(man3dir)/$$name.3 || \
-		rm -f $(DESTDIR)$(man3dir)/$$name.3; \
+	  name=`echo $$module | sed -e 's|/|::|g' -e 's/\.pm$$//'`; \
+	  $(POD2MAN) --utf8 --center=libdpkg-perl --release=$(VERSION) \
+	    --name="$$name" --section=3 $(srcdir)/$$module \
+	    >$(DESTDIR)$(man3dir)/$$name.3; \
+	  test -s $(DESTDIR)$(man3dir)/$$name.3 || \
+	  rm -f $(DESTDIR)$(man3dir)/$$name.3; \
 	done
 endif
 
@@ -171,7 +171,7 @@ install-data-hook:
 uninstall-local:
 if BUILD_POD_DOC
 	for module in $(nobase_dist_perllib_DATA); do \
-	    rm -f $(DESTDIR)$(man3dir)/`echo $$module | sed -e 's|/|::|g' -e 's/\.pm$$/.3/'`; \
+	  rm -f $(DESTDIR)$(man3dir)/`echo $$module | sed -e 's|/|::|g' -e 's/\.pm$$/.3/'`; \
 	done
 endif
 
@@ -346,8 +346,7 @@ $(srcdir)/t/Dpkg_Shlibs/libobjdump.basictags-i386.so: $(srcdir)/t/Dpkg_Shlibs/ba
 
 $(srcdir)/t/Dpkg_Shlibs/libobjdump.patterns.so: $(srcdir)/t/Dpkg_Shlibs/patterns.cpp $(srcdir)/t/Dpkg_Shlibs/patterns.map
 	$(CXX) $(CXXFLAGS) -shared -fPIC -Wl,-soname -Wl,libpatterns.so.1 \
-	    -Wl,--version-script=$(srcdir)/t/Dpkg_Shlibs/patterns.map $< \
-	    -o $@
+	  -Wl,--version-script=$(srcdir)/t/Dpkg_Shlibs/patterns.map $< -o $@
 
 $(srcdir)/t/Dpkg_Shlibs/spacesyms.c: $(srcdir)/t/Dpkg_Shlibs/spacesyms-c-gen.pl
 	$(srcdir)/t/Dpkg_Shlibs/spacesyms-c-gen.pl > $@
@@ -359,8 +358,7 @@ $(srcdir)/t/Dpkg_Shlibs/spacesyms.o: $(srcdir)/t/Dpkg_Shlibs/spacesyms.c $(srcdi
 
 $(srcdir)/t/Dpkg_Shlibs/libobjdump.spacesyms.so: $(srcdir)/t/Dpkg_Shlibs/spacesyms.o $(srcdir)/t/Dpkg_Shlibs/spacesyms.map
 	$(CC) -shared -Wl,-soname -Wl,libspacesyms.so.1 \
-	    -Wl,--version-script=$(srcdir)/t/Dpkg_Shlibs/spacesyms.map $< \
-	    -o $@
+	  -Wl,--version-script=$(srcdir)/t/Dpkg_Shlibs/spacesyms.map $< -o $@
 
 .PHONY: refresh-test-data
 

+ 3 - 3
scripts/mk/Makefile.am

@@ -7,12 +7,12 @@ dist_pkgdata_DATA = \
 	pkg-info.mk \
 	vendor.mk
 
-do_path_subst = $(AM_V_GEN) \
-                sed -e "s:dpkg_datadir[[:space:]]*=[[:space:]]*[^[:space:]]*:dpkg_datadir = $(pkgdatadir):"
+do_path_subst = $(AM_V_GEN) sed \
+	-e "s:dpkg_datadir[[:space:]]*=[[:space:]]*[^[:space:]]*:dpkg_datadir = $(pkgdatadir):"
 
 install-data-hook:
 	mv $(DESTDIR)$(pkgdatadir)/default.mk \
 	   $(DESTDIR)$(pkgdatadir)/default.mk.tmp
 	$(do_path_subst) <$(DESTDIR)$(pkgdatadir)/default.mk.tmp \
-			 >$(DESTDIR)$(pkgdatadir)/default.mk
+	                 >$(DESTDIR)$(pkgdatadir)/default.mk
 	rm -f $(DESTDIR)$(pkgdatadir)/default.mk.tmp