Add $SysInclude system variable.

This commit is contained in:
Dianne Skoll
2022-03-20 08:56:01 -04:00
parent 858a7601aa
commit fade38d522
5 changed files with 14 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ test: remind
@sh ../tests/test-rem
.c.o:
@CC@ -c @CPPFLAGS@ @CFLAGS@ @DEFS@ $(CEXTRA) $(LANGDEF) -I. -I$(srcdir) $<
@CC@ -c @CPPFLAGS@ @CFLAGS@ @DEFS@ $(CEXTRA) $(LANGDEF) -DSYSDIR=$(datarootdir)/remind -I. -I$(srcdir) $<
$(REMINDOBJS): $(REMINDHDRS)

View File

@@ -227,6 +227,15 @@ EXTERN int MonthDays[]
#endif
;
#define XSTR(x) #x
#define STRSYSDIR(x) XSTR(x)
EXTERN char *SysDir
#ifdef MK_GLOBALS
= STRSYSDIR(SYSDIR);
#endif
;
/* The first day of each month expressed as number of days after Jan 1.
Second row is for leap years. */

View File

@@ -836,6 +836,7 @@ static SysVar SysVarArr[] = {
{"SortByTime", 0, INT_TYPE, &SortByTime, 0, 0, NULL },
{"SubsIndent", 1, INT_TYPE, &SubsIndent, 0, 132, NULL },
{"Sunday", 1, STR_TYPE, &DynamicDayName[6], 0, 0, NULL },
{"SysInclude", 0, STR_TYPE, &SysDir, 0, 0, NULL },
{"T", 0, SPECIAL_TYPE, trig_date_func, 0, 0, NULL },
{"Td", 0, SPECIAL_TYPE, trig_day_func, 0, 0, NULL },
{"Thursday", 1, STR_TYPE, &DynamicDayName[3], 0, 0, NULL },

View File

@@ -328,6 +328,8 @@ fi
../src/remind -w128 -c ../tests/utf-8.rem 1 Nov 2019 >> ../tests/test.out
../src/remind -c ../tests/test-addomit.rem 1 Sep 2021 >> ../tests/test.out
# Remove references to SysInclude, which is build-specific
fgrep -v '$SysInclude' < ../tests/test.out > ../tests/test.out.1 && mv -f ../tests/test.out.1 ../tests/test.out
cmp -s ../tests/test.out ../tests/test.cmp
if [ "$?" = "0" ]; then
echo "Remind: Acceptance test PASSED"

View File

@@ -7979,4 +7979,4 @@ February 29
| | | | | | | |
| | | | | | | |
+----------+----------+----------+----------+----------+----------+----------+