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# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. 26 27SHELL= /usr/bin/ksh93 28 29include ../../Makefile.cmd 30 31.KEEP_STATE: 32 33# Set common AST build flags (e.g., needed to support the math stuff). 34include ../Makefile.ast 35 36ASTSRC= $(C_AST)/src/cmd/msgcc 37 38# build rules 39CPPFLAGS= \ 40 $(DTEXTDOM) $(DTS_ERRNO) \ 41 -I$(ROOT)/usr/include/ast \ 42 -I$(ROOT)/usr/include \ 43 -D_PACKAGE_ast \ 44 '-DUSAGE_LICENSE=\ 45 "[-author?Glenn Fowler <gsf@research.att.com>]"\ 46 "[-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property]"\ 47 "[-license?http://www.eclipse.org/org/documents/epl-v10.html]" \ 48 "[--catalog?msgcc]"' 49 50CFLAGS += $(ASTCFLAGS) 51 52CERRWARN += -_gcc=-Wno-parentheses 53CERRWARN += -_gcc=-Wno-empty-body 54CERRWARN += -_gcc=-Wno-uninitialized 55 56LDLIBS += -last 57msgcpp := LDLIBS += -lpp 58 59CPROG= msgcvt msggen msgget msgcpp 60PROG= msgcc $(CPROG) 61 62all: $(PROG) 63 64# This target should use "shcomp" in the future 65msgcc: $(ASTSRC)/msgcc.sh 66 rm -f msgcc ; \ 67 { \ 68 print "#!/usr/bin/ksh93" ; \ 69 print "export PATH=/usr/ast/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:\$${PATH}" ; \ 70 print "builtin date" ; \ 71 cat "$(ASTSRC)/msgcc.sh" ; \ 72 } >msgcc ; \ 73 chmod a+rx msgcc 74 75ROOTCMDDIR=$(ROOT)/usr/ast/bin 76 77install: all $(ROOTCMD) 78check clean install_h _feature: 79 80include ../../Makefile.targ 81POFILE= msgcpp.po 82 83# Create dummy file since AST/ksh/msgcc doesn't use *.po files 84msgcpp.po: 85 $(RM) $@ 86 $(TOUCH) $(@) 87 88$(CPROG): 89 $(LINK.c) -o $@ $(ASTSRC)/$@.c $(LDLIBS) 90 $(POST_PROCESS) 91 92FRC: 93.PARALLEL: $(PROG) 94