1 #
   2 # CDDL HEADER START
   3 #
   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 #
  26 
  27 
  28 include         ../../Makefile.master
  29 include         ../Makefile.lib
  30 
  31 MANIFEST=       client.xml
  32 MANIFESTDIR=    $(ROOT)/var/svc/manifest/network/dns
  33 ROOTMANIFEST=   $(MANIFEST:%=$(MANIFESTDIR)/%)
  34 
  35 $(ROOTMANIFEST) :=      FILEMODE = 444
  36 $(ROOTMANIFEST) :=      OWNER = root
  37 $(ROOTMANIFEST) :=      GROUP = bin
  38 
  39 CHKMANIFEST=    $(MANIFEST:%.xml=%.xmlchk)
  40 
  41 SUBDIRS=        include $(MACH)
  42 $(BUILD64)SUBDIRS +=    $(MACH64)
  43 
  44 all :=          TARGET= all
  45 clean :=        TARGET= clean
  46 clobber :=      TARGET= clobber
  47 install :=      TARGET= install
  48 lint :=         TARGET= lint
  49 _msg :=         TARGET= _msg
  50 
  51 LIBRARY=        libresolv.a
  52 TEXT_DOMAIN=    SUNW_OST_OSLIB
  53 XGETFLAGS=      -a
  54 POFILE=         $(LIBRARY:.a=.po)
  55 POFILES=        generic.po
  56 
  57 SED=    sed
  58 GREP=   grep
  59 
  60 .KEEP_STATE:
  61 
  62 all clean clobber lint: $(SUBDIRS)
  63 
  64 install: $(SUBDIRS) $(ROOTMANIFEST)
  65 
  66 $(ROOTMANIFEST): $(MANIFESTDIR)
  67 
  68 $(MANIFESTDIR):
  69         $(INS.dir)
  70 
  71 $(MANIFESTDIR)/%: %
  72         $(INS.file)                                                             
  73 
  74 # install rule for install_h target
  75 $(ROOTHDRDIR)/%: %
  76         $(INS.file)
  77 
  78 install_h: $(ROOTHDRS)
  79 
  80 check: $(CHECKHDRS) $(CHKMANIFEST)
  81 
  82 _msg:   $(MSGDOMAIN) $(POFILE)
  83         $(RM) $(MSGDOMAIN)/$(POFILE)
  84         $(CP) $(POFILE) $(MSGDOMAIN)
  85 
  86 $(POFILE):      $(POFILES)
  87         $(RM) $@
  88         $(CAT) $(POFILES) > $@
  89 
  90 $(POFILES):
  91         $(RM) messages.po
  92         $(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]*
  93         $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
  94         $(RM) messages.po
  95 
  96 $(SUBDIRS): FRC
  97         @cd $@; pwd; $(MAKE) $(TARGET); echo
  98 
  99 FRC:
 100