1 bin_PROGRAMS
= src
/cppi
6 # Tell the linker to omit references to unused shared libraries.
7 AM_LDFLAGS
= $(IGNORE_UNUSED_LIBRARIES_CFLAGS
)
15 MAINTAINERCLEANFILES
+= src
/cpp-cond.c
16 CLEANFILES
+= lex.backup
17 DISTCLEANFILES
+= src
/cpp.h
21 AM_CPPFLAGS
+= -I
$(top_srcdir
)/lib
-Isrc
-I
$(top_srcdir
)/src
23 LDADD
= $(top_builddir
)/lib
/libcppi.a
$(LIBINTL
) $(top_builddir
)/lib
/libcppi.a
26 -C
-N cpp_cond_lookup
-n
-t
-s
6 -k
'*' --language
=ANSI-C
28 src
/cpp-cond.c
: src
/cpp.gp
29 $(AM_V_GEN
)rm -f
$@
$@
-t
30 $(AM_V_at
)$(GPERF
) $(GPERF_OPTIONS
) $< \
32 -e
's/const struct KW \*\ncpp_cond_lookup/static\n$$&/' \
34 $(AM_V_at
)chmod a-w
$@
-t
37 localedir
= $(datadir)/locale
38 BUILT_SOURCES
+= src
/localedir.h
39 DISTCLEANFILES
+= src
/localedir.h
40 src
/localedir.h
: src
/local.mk
42 $(AM_V_at
)echo
'#define LOCALEDIR "$(localedir)"' >$@
-t
43 $(AM_V_at
)chmod a-w
$@
-t
44 $(AM_V_at
)cmp
$@
-t
$@
> /dev
/null
2>&1 && rm -f
$@
-t \
45 ||
{ rm -f
$@
; mv
$@
-t
$@
; }
48 flex_debug
= # -L # suppress #line directives
50 # This is required to avoid an infloop on certain 8-bit inputs.
51 # Without this option, the generated scanner would infloop on e.g.,
52 # perl -e 'print "\300"' |./cppi
55 flex_optimize
= -Cfr
-p
-b
56 AM_LFLAGS
= $(flex_debug
) $(flex_optimize
) $(flex_8_bit
)
58 # Don't use automake's default .l.c rule.
59 # I prefer to make generated .c files unwritable.
60 src
/cppi.c
: src
/cppi.l
62 $(AM_V_at
)$(LEXCOMPILE
) $(top_srcdir
)/src
/cppi.l
63 $(AM_V_at
)chmod a-w
$(LEX_OUTPUT_ROOT
).c
64 $(AM_V_at
)mv
$(LEX_OUTPUT_ROOT
).c
$@
66 src
/cpp.h
: src
/cpp.gp src
/local.mk
67 $(AM_V_GEN
)rm -f
$@
-t
$@
69 echo
'/* This file is generated automatically from cpp.gp. */'; \
71 echo
'enum Eic_type'; \
73 sed
-n
'/.*, /{s///;s/.*/ &,/;p;};' $(srcdir)/src
/cpp.gp
; \
77 echo
'static char const *const directive[] ='; \
79 sed
-n
'/,.*/{s///;s/.*/ "&",/;p;};' $(srcdir)/src
/cpp.gp
; \
84 $(AM_V_at
)chmod
-w
$@
-t
87 BUILT_SOURCES
+= src
/cpp-cond.c src
/cpp.h