Follow upstream changes -- rest
[git-darcs-import.git] / autoconf.mk.in
blobcf4efab4b5e4ff4ed852c49247d66d8e1793f2d8
2 # System properties as determined by Autoconf.
4 # @configure_input@
6 prefix := @prefix@
7 exec_prefix := @exec_prefix@
8 bindir := @bindir@
9 sbindir := @sbindir@
10 datarootdir := @datarootdir@
11 mandir := @mandir@
12 datadir := @datadir@
13 sysconfdir := @sysconfdir@
14 libexecdir := @libexecdir@
15 PACKAGE_TARNAME := @PACKAGE_TARNAME@
16 docdir := @docdir@
18 DARCS_VERSION := @DARCS_VERSION@
19 DEFS := @DEFS@
20 CPPFLAGS := @CPPFLAGS@ @DEFS@
21 CFLAGS := @CFLAGS@
22 OPTCCFLAGS := $(addprefix -optc,$(CFLAGS) $(CPPFLAGS))
23 LDFLAGS := @LDFLAGS@
24 OPTLLDFLAGS := $(addprefix -optl,$(LDFLAGS))
25 LIBS := @LIBS@
26 OPTLLIBS := $(filter-out -%,$(LIBS)) $(addprefix -optl,$(filter -%,$(LIBS)))
27 GHCFLAGS := @GHCFLAGS@ @CPPFLAGS@ @DEFS@
28 USE_GNULIBSHA1 := @USE_GNULIBSHA1@
29 HAVE_HTTP := @HAVE_HTTP@
30 HAVE_CURSES := @HAVE_CURSES@
31 HAVE_LIBCURL := @HAVE_LIBCURL@
32 HAVE_LIBWWW := @HAVE_LIBWWW@
33 HAVE_MAPI := @HAVE_MAPI@
34 HAVE_TERMIO_H := @HAVE_TERMIO_H@
35 SYS := @SYS@
36 WXFLAGS := @WXFLAGS@
38 GHC := @GHC@
39 INSTALL := @INSTALL@
40 INSTALL_DATA := @INSTALL_DATA@
41 LATEX := @LATEX@
42 PDFLATEX := @PDFLATEX@
43 DVIPS := @DVIPS@
44 MAKEMANUAL := @MAKEMANUAL@
45 PREPROCHTML := @PREPROCHTML@
46 MAKENSIS := @MAKENSIS@
47 HADDOCK_VERSION := @HADDOCK_VERSION@
49 all : config @TARGETS@ microbench
51 install: all @INSTALLWHAT@
53 ifeq ('@I_AM_IN_REPO@', 'yes')
54 release/STATE src/ThisVersion.lhs doc/index.html: _darcs/hashed_inventory src/ThisVersion.lhs.in \
55 release/determine_release_state.pl \
56 doc/index.html.in config.status
57 perl release/determine_release_state.pl $(DARCS_VERSION) > release/STATE
58 src/Context.hs: _darcs/hashed_inventory stringify config.command
59 PATH=".:$$PATH" darcs changes --context | cat config.command - \
60 | ./stringify Context context > $@
61 else
62 src/ThisVersion.lhs doc/index.html: release/STATE src/ThisVersion.lhs.in \
63 release/determine_release_state.pl \
64 doc/index.html.in config.status
65 perl release/determine_release_state.pl $(DARCS_VERSION)
66 release/STATE:
67 echo -n $(DARCS_VERSION) '(unknown)' > $@
68 src/Context.hs: stringify
69 test -f $@ || echo unknown | ./stringify Context context > $@
70 endif
72 darcs-stable.tar.gz: dist
73 ln -sf "darcs-$(DARCS_VERSION).tar.gz" $@
74 .PHONY: darcs-stable.tar.gz
76 .SUFFIXES:
78 # This is a hack to allow a normal GHCFLAGS to be overridden for a few
79 # source files, see the GHCFLAGS_src__*.o settings in GNUmakefile.
80 ghcflags_deslash=$(GHCFLAGS_$(subst /,__,$(1)))
81 ghcflags_fancy=$(if $(call ghcflags_deslash,$(1)),$(call ghcflags_deslash,$(1)),$(GHCFLAGS))
83 ifdef VERBOSE
84 ANNOUNCE_GHC=$(GHC)
85 else
86 ANNOUNCE_GHC=@echo [ghc] $@; $(GHC)
87 endif
89 %.o : %.lhs
90 $(ANNOUNCE_GHC) $(call ghcflags_fancy,$@) -c $<
92 # stupid rule to do nothing to make a .hi file from a .o file.
93 %.hi : %.o
95 %.o : %.hs
96 $(ANNOUNCE_GHC) $(call ghcflags_fancy,$@) -c $<
97 @touch $*.hi
99 %.o : %.c
100 $(ANNOUNCE_GHC) $(CPPFLAGS) $(OPTCCFLAGS) -c $<
102 % : src/%.lhs
103 rm -f Main.hi Main.o
104 $(ANNOUNCE_GHC) $(GHCFLAGS) $(OPTLLDFLAGS) -o $@ $^ $(OPTLLIBS)
106 % : src/%.hs
107 rm -f Main.hi Main.o
108 $(ANNOUNCE_GHC) $(GHCFLAGS) $(OPTLLDFLAGS) -o $@ $^ $(OPTLLIBS)
110 %.hs : %.hsc
111 hsc2hs $<
113 %.hi : %.o
116 %.dvi : %.tex
117 (cd $(dir $*) && $(LATEX) $(notdir $*))
118 while grep >/dev/null "Rerun to get cross-references right" $*.log; do \
119 (cd $(dir $*) && $(LATEX) $(notdir $*)); \
120 done
123 %.pdf : %.tex
124 (cd $(dir $*) && $(PDFLATEX) $(notdir $*))
125 while grep >/dev/null "Rerun to get cross-references right" $*.log; do \
126 (cd $(dir $*) && $(PDFLATEX) $(notdir $*)); \
127 done
129 %.ps : %.dvi
130 $(DVIPS) -t letter -o $@ $<