# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License # for the specific language governing rights and limitations under the # License. # # The Original Code is libical code. # # The Initial Developer of the Original Code is # Eric Busboom # Portions created by the Initial Developer are Copyright (C) 2000 # the Initial Developer. All Rights Reserved. # # Contributor(s): # Michiel van Leeuwen # # Alternatively, the contents of this file may be used under the terms of # either the GNU General Public License Version 2 or later (the "GPL"), or # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), # in which case the provisions of the GPL or the LGPL are applicable instead # of those above. If you wish to allow use of your version of this file only # under the terms of either the GPL or the LGPL, and not to allow others to # use your version of this file under the terms of the MPL, indicate your # decision by deleting the provisions above and replace them with the notice # and other provisions required by the GPL or the LGPL. If you do not delete # the provisions above, a recipient may use your version of this file under # the terms of any one of the MPL, the GPL or the LGPL. # # ***** END LICENSE BLOCK ***** include $(moztopsrcdir)/config/rules.mk ###################################################################### # # Generate files that are automatically generated (*.h.in and *.c.in) # and ical.h # DESIGNDATA = $(srcdir)/../../design-data ICALSCRIPTS = $(srcdir)/../../scripts # ORDERING OF HEADERS IS SIGNIFICANT. Don't change this ordering. It # is required to make the combined header ical.h properly COMBINEDHEADERS = \ $(srcdir)/../../config.h \ $(srcdir)/icalversion.h \ $(srcdir)/icaltime.h \ $(srcdir)/icalduration.h \ $(srcdir)/icalperiod.h \ $(srcdir)/icalenums.h \ $(srcdir)/icaltypes.h \ $(srcdir)/icalrecur.h \ $(srcdir)/icalattach.h \ icalderivedvalue.h \ icalderivedparameter.h \ $(srcdir)/icalvalue.h \ $(srcdir)/icalparameter.h \ icalderivedproperty.h \ $(srcdir)/icalproperty.h \ $(srcdir)/pvl.h \ $(srcdir)/icalarray.h \ $(srcdir)/icalcomponent.h \ $(srcdir)/icaltimezone.h \ $(srcdir)/icalparser.h \ $(srcdir)/icalmemory.h \ $(srcdir)/icalerror.h \ $(srcdir)/icalrestriction.h \ $(srcdir)/sspm.h \ $(srcdir)/icalmime.h \ $(srcdir)/icallangbind.h \ $(NULL) BUILT_COMBINEDHEADERS = \ icalderivedparameter.h \ icalderivedproperty.h \ icalderivedvalue.h BUILT_SOURCES = \ $(BUILT_COMBINEDHEADERS)\ icalderivedparameter.c \ icalderivedproperty.c \ icalrestriction.c \ icalderivedvalue.c GARBAGE += $(BUILT_SOURCES) ical.h: $(COMBINEDHEADERS) echo '#ifndef LIBICAL_ICAL_H' > ical.h echo '#define LIBICAL_ICAL_H' >> ical.h echo '#ifdef __cplusplus' >> ical.h echo 'extern "C" {' >> ical.h echo '#endif' >> ical.h echo '/*' >> ical.h echo ' $$''Id''$$' >> ical.h echo '*/' >> ical.h cat $(COMBINEDHEADERS) \ | egrep -v "#include.*\"ical" \ | egrep -v "#include.*\"config" \ | egrep -v "#include.*\"pvl\.h\"" \ | egrep -v '\$$(Id|Locker): .+\$$'>> ical.h echo '#ifdef __cplusplus' >> ical.h echo '}' >> ical.h echo '#endif' >> ical.h echo '#endif' >> ical.h GARBAGE += ical.h # parameters PARAMETERDEPS = \ $(ICALSCRIPTS)/mkderivedparameters.pl \ $(DESIGNDATA)/parameters.csv \ $(srcdir)/icalderivedparameter.c.in \ $(srcdir)/icalderivedparameter.h.in icalderivedparameter.h: $(PARAMETERDEPS) $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.h.in -h $(DESIGNDATA)/parameters.csv > icalderivedparameter.h icalderivedparameter.c: $(PARAMETERDEPS) $(BUILT_COMBINEDHEADERS) $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.c.in -c $(DESIGNDATA)/parameters.csv > icalderivedparameter.c # properties PROPERTYDEPS = \ $(ICALSCRIPTS)/mkderivedproperties.pl \ $(DESIGNDATA)/properties.csv \ $(DESIGNDATA)/value-types.csv \ $(srcdir)/icalderivedproperty.c.in \ $(srcdir)/icalderivedproperty.h.in icalderivedproperty.h: $(PROPERTYDEPS) $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \ -i $(srcdir)/icalderivedproperty.h.in -h $(DESIGNDATA)/properties.csv\ ${DESIGNDATA}/value-types.csv > icalderivedproperty.h icalderivedproperty.c: $(PROPERTYDEPS) $(BUILT_COMBINEDHEADERS) $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \ -i $(srcdir)/icalderivedproperty.c.in -c $(DESIGNDATA)/properties.csv \ ${DESIGNDATA}/value-types.csv > icalderivedproperty.c # restrictions RESTRICTIONDEPS = \ $(ICALSCRIPTS)/mkrestrictiontable.pl \ $(DESIGNDATA)/restrictions.csv \ $(srcdir)/icalrestriction.c.in icalrestriction.c: $(RESTRICTIONDEPS) $(PERL) $(ICALSCRIPTS)/mkrestrictiontable.pl -i $(srcdir)/icalrestriction.c.in \ $(DESIGNDATA)/restrictions.csv > icalrestriction.c # values VALUEDEPS = \ $(ICALSCRIPTS)/mkderivedvalues.pl \ $(DESIGNDATA)/value-types.csv \ $(srcdir)/icalderivedvalue.c.in \ $(srcdir)/icalderivedvalue.h.in icalderivedvalue.h: $(VALUEDEPS) $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \ -i $(srcdir)/icalderivedvalue.h.in -h $(DESIGNDATA)/value-types.csv > icalderivedvalue.h icalderivedvalue.c: $(VALUEDEPS) $(BUILT_COMBINEDHEADERS) $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \ -i $(srcdir)/icalderivedvalue.c.in -c $(DESIGNDATA)/value-types.csv > icalderivedvalue.c