Skip to content

Commit

Permalink
Use a constant for time64 object files.
Browse files Browse the repository at this point in the history
For a moment there was more than one.  Nicer to have it in a variable anyway.

Also t/mktime64.t wasn't getting run.
  • Loading branch information
schwern committed Feb 5, 2010
1 parent 72edd86 commit 0b8309b
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,53 @@ WARNINGS = -Wall -ansi -pedantic -Wno-long-long -Wextra -Wdeclaration-after-stat
CFLAGS = $(WARNINGS) $(OPTIMIZE) $(INCLUDE)
COMPILE = $(CC) $(CFLAGS)
LINK = $(COMPILE)
TIME64_OBJECTS = time64.o

all : time64.o bin/check_max
all : $(TIME64_OBJECTS) bin/check_max

bin/check_max : time64.o time64_config.h bin/check_max.c
$(LINK) time64.o bin/check_max.c -o $@
bin/check_max : $(TIME64_OBJECTS) time64_config.h bin/check_max.c
$(LINK) $(TIME64_OBJECTS) bin/check_max.c -o $@

time64.o : time64_config.h time64.h time64.c Makefile

t/bench : t/bench.c time64.o
$(LINK) time64.o t/bench.c -o $@
t/bench : t/bench.c $(TIME64_OBJECTS)
$(LINK) $(TIME64_OBJECTS) t/bench.c -o $@

bench : t/bench
time t/bench

t/localtime_test : t/localtime_test.c time64.o
$(LINK) time64.o t/localtime_test.c -o $@
t/localtime_test : t/localtime_test.c $(TIME64_OBJECTS)
$(LINK) $(TIME64_OBJECTS) t/localtime_test.c -o $@

t/gmtime_test : t/gmtime_test.c time64.o
$(LINK) time64.o t/gmtime_test.c -o $@
t/gmtime_test : t/gmtime_test.c $(TIME64_OBJECTS)
$(LINK) $(TIME64_OBJECTS) t/gmtime_test.c -o $@

t/year_limit.t : t/tap.c t/year_limit.t.c time64.o
$(LINK) time64.o t/year_limit.t.c -o $@
t/year_limit.t : t/tap.c t/year_limit.t.c $(TIME64_OBJECTS)
$(LINK) $(TIME64_OBJECTS) t/year_limit.t.c -o $@

t/negative.t : t/tap.c t/negative.t.c time64.o
$(LINK) time64.o t/negative.t.c -o $@
t/negative.t : t/tap.c t/negative.t.c $(TIME64_OBJECTS)
$(LINK) $(TIME64_OBJECTS) t/negative.t.c -o $@

t/overflow.t : t/tap.c t/overflow.t.c time64.o
$(LINK) time64.o t/overflow.t.c -o $@
t/overflow.t : t/tap.c t/overflow.t.c $(TIME64_OBJECTS)
$(LINK) $(TIME64_OBJECTS) t/overflow.t.c -o $@

t/timegm.t : t/tap.c t/timegm.t.c time64.o
$(LINK) time64.o t/timegm.t.c -o $@
t/timegm.t : t/tap.c t/timegm.t.c $(TIME64_OBJECTS)
$(LINK) $(TIME64_OBJECTS) t/timegm.t.c -o $@

t/safe_year.t : t/tap.c t/safe_year.t.c time64.c
$(LINK) t/safe_year.t.c -o $@

t/gmtime64.t : t/tap.c t/gmtime64.t.c time64.o
$(LINK) time64.o t/gmtime64.t.c -o $@
t/gmtime64.t : t/tap.c t/gmtime64.t.c $(TIME64_OBJECTS)
$(LINK) $(TIME64_OBJECTS) t/gmtime64.t.c -o $@

t/mktime64.t : t/tap.c t/mktime64.t.c time64.o
$(LINK) time64.o t/mktime64.t.c -o $@
t/mktime64.t : t/tap.c t/mktime64.t.c $(TIME64_OBJECTS)
$(LINK) $(TIME64_OBJECTS) t/mktime64.t.c -o $@

t/asctime64.t : t/tap.c t/asctime64.t.c time64.o
$(LINK) time64.o t/asctime64.t.c -o $@
t/asctime64.t : t/tap.c t/asctime64.t.c $(TIME64_OBJECTS)
$(LINK) $(TIME64_OBJECTS) t/asctime64.t.c -o $@

t/ctime64.t : t/tap.c t/ctime64.t.c time64.o
$(LINK) time64.o t/ctime64.t.c -o $@
t/ctime64.t : t/tap.c t/ctime64.t.c $(TIME64_OBJECTS)
$(LINK) $(TIME64_OBJECTS) t/ctime64.t.c -o $@

t/seconds_between_years.t : t/tap.c t/seconds_between_years.t.c time64.c
$(LINK) t/seconds_between_years.t.c -o $@
Expand All @@ -70,7 +71,7 @@ localtime_tests: t/localtime_test t/gmtime_test
TZ=Australia/West t/localtime_test | bzip2 -9 > t/oz_test.out.bz2
bzdiff -u t/oz_test.out.bz2 t/oztime.out.bz2 | less -F

tap_tests: t/year_limit.t t/negative.t t/overflow.t t/timegm.t t/safe_year.t t/gmtime64.t t/asctime64.t t/ctime64.t
tap_tests: t/year_limit.t t/negative.t t/overflow.t t/timegm.t t/mktime64.t t/safe_year.t t/gmtime64.t t/asctime64.t t/ctime64.t
@which prove > /dev/null || (echo 'You need prove (from the Test::Harness perl module) to run these tests'; exit 1)
@prove --exec '' t/*.t

Expand Down

0 comments on commit 0b8309b

Please sign in to comment.