Print this page
XXX Remove nawk(1)

Split Close
Expand all
Collapse all
          --- old/usr/src/Makefile.msg.targ
          +++ new/usr/src/Makefile.msg.targ
↓ open down ↓ 45 lines elided ↑ open up ↑
  46   46          $(RM) messages.po $(TEXT_DOMAIN).po; \
  47   47          $(TOUCH) $(TEXT_DOMAIN).po; \
  48   48          $(XGETTEXT) $(XGETFLAGS) $(MSGFILES); \
  49   49          $(SED) -e '/^\# msgid/,/^\# msgstr/d' -e '/^domain/d' \
  50   50                  -e '/^\#$$/d' -e '/^\#, /d' \
  51   51                  messages.po $(TEXT_DOMAIN).po > $(POFILE); \
  52   52          $(RM) messages.po $(TEXT_DOMAIN).po
  53   53  
  54   54  BUILDPO.pofiles = \
  55   55          $(RM) $(POFILE); \
  56      -        $(NAWK) '\
       56 +        $(AWK) '\
  57   57              FNR == 1            { print "\# Messages from " FILENAME; } \
  58   58              /^domain/           { next; } \
  59   59              /^msgid/, /^msgstr/ { msg = msg "\n" $$0; \
  60   60                                    if ( $$0 !~ /^msgstr/ ) next; \
  61   61                                    if (msg in messages) { \
  62   62                                          gsub(/\n/, "\n\# ", msg); \
  63   63                                    } else { \
  64   64                                          messages[msg] = 1; \
  65   65                                    } \
  66   66                                    sub(/^\n/, "", msg); \
↓ open down ↓ 12 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX