Makefile revision 9663:ace9a2ac3683
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
26include		../Makefile.lib
27
28SUBDIRS =	$(MACH)
29
30all :=          TARGET= all
31clean :=        TARGET= clean
32clobber :=      TARGET= clobber
33delete :=       TARGET= delete
34install :=      TARGET= install
35_msg :=		TARGET= _msg
36package :=      TARGET= package
37
38LIBRARY= 	libparted.a
39TEXT_DOMAIN=	SUNW_OST_OSLIB
40XGETFLAGS=	-a
41POFILE=		$(LIBRARY:.a=.po)
42POFILES=	generic.po
43
44SED=	sed
45GREP=	grep
46
47.KEEP_STATE:
48
49all clean clobber delete install package: $(SUBDIRS)
50
51# definitions for install_h target
52HDRS=		../common/include/parted/constraint.h \
53		../common/include/parted/crc32.h \
54		../common/include/parted/debug.h \
55		../common/include/parted/device.h \
56		../common/include/parted/disk.h \
57		../common/include/parted/endian.h \
58		../common/include/parted/exception.h \
59		../common/include/parted/fdasd.h \
60		../common/include/parted/filesys.h \
61		../common/include/parted/geom.h \
62		../common/include/parted/gnu.h \
63		../common/include/parted/linux.h \
64		../common/include/parted/natmath.h \
65		../common/include/parted/parted.h \
66		../common/include/parted/solaris.h \
67		../common/include/parted/timer.h \
68		../common/include/parted/unit.h \
69		../common/include/parted/vtoc.h
70ROOTHDRDIR=     $(ROOT)/usr/include
71ROOTHDRS=       $(HDRS:%=$(ROOTHDRDIR)/%)
72CHECKHDRS=      $(HDRS:%.h=%.check)
73
74# install rule for install_h target
75$(ROOTHDRDIR)/%: %
76	$(INS.file)
77
78install_h: $(ROOTHDRS)
79
80check: $(CHECKHDRS)
81
82$(SUBDIRS):      FRC
83	@cd $@; pwd; $(MAKE) $(TARGET)
84
85_msg:	$(MSGDOMAIN) $(POFILE)
86	$(RM) $(MSGDOMAIN)/$(POFILE)
87	$(CP) $(POFILE) $(MSGDOMAIN)
88
89$(POFILE):	$(POFILES)
90	$(RM) $@
91	$(CAT) $(POFILES) > $@
92
93$(POFILES):
94	$(RM) messages.po
95	$(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]*
96	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
97	$(RM) messages.po
98
99$(MSGDOMAIN):
100	$(INS.dir)
101
102FRC:
103