aboutsummaryrefslogtreecommitdiffhomepage
path: root/bootstrap.am
blob: 61fc0d31aff647b6d58a371ba53fed23332c0320 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# All SciTECO invocations should try to use the in-tree
# standard library library
export SCITECOPATH=@top_srcdir@/lib

# This provides two implementations of SciTECO running
# on the host as build-time tools.
# $(SCITECO_MINIMAL) can be used during the build-process
# of the target SciTECO, but may have only limited support for
# the ES command (no symbolic identifiers).
# $(SCITECO_FULL) is a final version of SciTECO, but is only
# available after the binary has been built in src/
# (ie. in SUBDIRS after src/).
if BOOTSTRAP
SCITECO_MINIMAL = @top_builddir@/src/sciteco-minimal$(EXEEXT)
SCITECO_FULL    = @top_builddir@/src/sciteco$(EXEEXT)
else
SCITECO_MINIMAL = @SCITECO@
SCITECO_FULL    = @SCITECO@
endif

# Path of installed `sciteco` binary,
# taking --program-prefix into account.
# This variables MUST NOT be put in single-quotes.
SCITECO_INSTALLED = \
	$(bindir)/`echo sciteco | @SED@ '$(transform)'`$(EXEEXT)

SUBST_MACRO = <FS@PACKAGE^Q@\e@PACKAGE@\e;>J \
              <FS@PACKAGE_NAME^Q@\e@PACKAGE_NAME@\e;>J \
              <FS@PACKAGE_VERSION^Q@\e@PACKAGE_VERSION@\e;>J \
              <FS@PACKAGE_URL^Q@\e@PACKAGE_URL@\e;>J \
              <FS@bindir^Q@\e$(bindir)\e;>J \
              <FS@libexecdir^Q@\e$(libexecdir)\e;>J \
              <FS@scitecodatadir^Q@\e$(scitecodatadir)\e;>J \
              <FS@scitecolibdir^Q@\e$(scitecolibdir)\e;>J \
              <FS@TECO_INTEGER^Q@\e@TECO_INTEGER@\e;>J \
              <FS@DATE^Q@\e$(shell LC_ALL=C @DATE@ "+%d %b %Y")\e;>J

# The SciTECO-based substitutor must not process config.h.in.
@top_srcdir@/config.h: ;

SUFFIXES = .in
.in:
	$(SCITECO_MINIMAL) -qioe $$'$(SUBST_MACRO)' <$< >$@