|
| 1 | + |
| 2 | +# |
| 3 | +# You will need to set this to the directory that the Olson timezone data |
| 4 | +# files are in. |
| 5 | +# |
| 6 | +OLSON_DIR ?= tzdata2021a |
| 7 | + |
| 8 | + |
| 9 | +# This is used as the PRODID property on the iCalendar files output. |
| 10 | +# It identifies the product which created the iCalendar objects. |
| 11 | +# So you need to substitute your own organization name and product. |
| 12 | +PRODUCT_ID ?= -//citadel.org//NONSGML Citadel calendar//EN |
| 13 | + |
| 14 | +# This is what libical-evolution uses. |
| 15 | +#PRODUCT_ID = -//Ximian//NONSGML Evolution Olson-VTIMEZONE Converter//EN |
| 16 | + |
| 17 | + |
| 18 | +# This is used to create unique IDs for each VTIMEZONE component. |
| 19 | +# The prefix is put before each timezone city name. It should start and end |
| 20 | +# with a '/'. The first part, i.e. 'myorganization.org' below, should be |
| 21 | +# a unique vendor ID, e.g. use a hostname. The part after that can be |
| 22 | +# anything you want. We use a date and version number for libical. The %D |
| 23 | +# gets expanded to today's date. There is also a vzic-merge.pl which can be |
| 24 | +# used to merge changes into a master set of VTIMEZONEs. If a VTIMEZONE has |
| 25 | +# changed, it bumps the version number on the end of this prefix. */ |
| 26 | +TZID_PREFIX ?= /citadel.org/%D_1/ |
| 27 | + |
| 28 | +# This is what libical-evolution uses. |
| 29 | +#TZID_PREFIX = /softwarestudio.org/Olson_%D_1/ |
| 30 | + |
| 31 | +# This is used to indicate how timezone aliases (indicated by a Link line |
| 32 | +# in Olson files) should be generated: The default is to symbolically link |
| 33 | +# the Link zone file to its authorative zone. Alternatively, if set to 0, |
| 34 | +# a VTIMEZONE file is generated for each Link. |
| 35 | +CREATE_SYMLINK ?= 1 |
| 36 | + |
| 37 | +# This indicates if top-level timezone aliases (a timezone name without |
| 38 | +# any '/' such as "EST5EDT") should be ignored. If 0, a VTIMEZONE is |
| 39 | +# generated also for top-level aliases. This option only has |
| 40 | +# an effect if CREATE_SYMLINK is 0, and mainly is useful for backward |
| 41 | +# compatibility with previous vzic versions. |
| 42 | +IGNORE_TOP_LEVEL_LINK ?= 1 |
| 43 | + |
| 44 | +# Set any -I include directories to find the libical header files, and the |
| 45 | +# libical library to link with. You only need these if you want to run the |
| 46 | +# tests. You may need to change the '#include <ical.h>' line at the top of |
| 47 | +# test-vzic.c as well. |
| 48 | +LIBICAL_CFLAGS = -I/usr/local/include/libical -L/usr/local/lib64 |
| 49 | +#LIBICAL_LDADD = -lical-evolution |
| 50 | +LIBICAL_LDADD = -lical -lpthread |
| 51 | + |
| 52 | + |
| 53 | +# |
| 54 | +# You shouldn't need to change the rest of the file. |
| 55 | +# |
| 56 | + |
| 57 | +GLIB_CFLAGS = `pkg-config --cflags glib-2.0` |
| 58 | +GLIB_LDADD = `pkg-config --libs glib-2.0` |
| 59 | + |
| 60 | +CFLAGS = -g -DOLSON_DIR=\"$(OLSON_DIR)\" -DPRODUCT_ID='"$(PRODUCT_ID)"' |
| 61 | +CFLAGS += -DTZID_PREFIX='"$(TZID_PREFIX)"' |
| 62 | +CFLAGS += -DCREATE_SYMLINK=$(CREATE_SYMLINK) |
| 63 | +CFLAGS += -DIGNORE_TOP_LEVEL_LINK=$(IGNORE_TOP_LEVEL_LINK) |
| 64 | +CFLAGS += $(GLIB_CFLAGS) $(LIBICAL_CFLAGS) |
| 65 | + |
| 66 | +OBJECTS = vzic.o vzic-parse.o vzic-dump.o vzic-output.o |
| 67 | + |
| 68 | +all: vzic |
| 69 | + |
| 70 | +vzic: $(OBJECTS) |
| 71 | + $(CC) $(OBJECTS) $(GLIB_LDADD) -o vzic |
| 72 | + |
| 73 | +test-vzic: test-vzic.o |
| 74 | + $(CC) test-vzic.o $(LIBICAL_LDADD) -o test-vzic |
| 75 | + |
| 76 | +# Dependencies. |
| 77 | +$(OBJECTS): vzic.h |
| 78 | +vzic.o vzic-parse.o: vzic-parse.h |
| 79 | +vzic.o vzic-dump.o: vzic-dump.h |
| 80 | +vzic.o vzic-output.o: vzic-output.h |
| 81 | + |
| 82 | +test-parse: vzic |
| 83 | + ./vzic-dump.pl $(OLSON_DIR) |
| 84 | + ./vzic --dump --pure |
| 85 | + @echo |
| 86 | + @echo "#" |
| 87 | + @echo "# If either of these diff commands outputs anything there may be a problem." |
| 88 | + @echo "#" |
| 89 | + diff -ru zoneinfo/ZonesPerl zoneinfo/ZonesVzic |
| 90 | + diff -ru zoneinfo/RulesPerl zoneinfo/RulesVzic |
| 91 | + |
| 92 | +test-changes: vzic test-vzic |
| 93 | + ./test-vzic --dump-changes |
| 94 | + ./vzic --dump-changes --pure |
| 95 | + @echo |
| 96 | + @echo "#" |
| 97 | + @echo "# If this diff command outputs anything there may be a problem." |
| 98 | + @echo "#" |
| 99 | + diff -ru zoneinfo/ChangesVzic test-output |
| 100 | + |
| 101 | +clean: |
| 102 | + -rm -rf vzic $(OBJECTS) *~ ChangesVzic RulesVzic ZonesVzic RulesPerl ZonesPerl test-vzic test-vzic.o |
| 103 | + |
| 104 | +.PHONY: clean perl-dump test-parse |
| 105 | + |
| 106 | + |
0 commit comments