1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-19 23:22:23 +03:00

Reverse out because the lack of using pgport in timezone/ is causing

problems:

---------------------------------------------------------------------------

Support cross compilation by compiling "zic" with a native compiler.
This relies on the output of zic being platform independent, but that is
currently the case.
This commit is contained in:
Bruce Momjian
2005-07-06 21:04:14 +00:00
parent a923602855
commit 261ffd03f7
5 changed files with 8 additions and 58 deletions

View File

@@ -4,7 +4,7 @@
# Makefile for the timezone library
# IDENTIFICATION
# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.20 2005/07/04 19:54:51 momjian Exp $
# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.21 2005/07/06 21:04:14 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -18,7 +18,7 @@ override CPPFLAGS := $(CPPFLAGS) -I$(srcdir) -DNO_PGPORT
OBJS= localtime.o strftime.o pgtz.o
# files needed to build zic utility program
ZICOBJS= zic.o ialloc.o scheck.o localtime-zic.o
ZICOBJS= zic.o ialloc.o scheck.o localtime.o
# timezone data files
TZDATA := africa antarctica asia australasia europe northamerica southamerica \
@@ -30,17 +30,8 @@ all: SUBSYS.o submake-libpgport zic
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
# In case of cross-compilation, zic needs to be built with a native
# compiler because it is run during the build, not on the final
# system.
localtime-zic.c: localtime.c
$(LN_S) $< $@
$(ZICOBJS): CC=$(CC_FOR_BUILD)
zic: $(ZICOBJS)
$(CC_FOR_BUILD) $(CFLAGS) $(ZICOBJS) -o $@$(X)
$(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
install: all installdirs
./zic -d $(DESTDIR)$(datadir)/timezone $(TZDATAFILES)
@@ -49,4 +40,4 @@ installdirs:
$(mkinstalldirs) $(DESTDIR)$(datadir)
clean distclean maintainer-clean:
rm -f SUBSYS.o zic zic$(X) $(OBJS) $(ZICOBJS) localtime-zic.c
rm -f SUBSYS.o zic$(X) $(OBJS) $(ZICOBJS)