File: Makefile.am

package info (click to toggle)
a2ps 1%3A4.15.7-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,716 kB
  • sloc: ansic: 44,830; sh: 11,625; lex: 1,851; perl: 708; yacc: 698; makefile: 494; lisp: 396; ada: 263; objc: 189; f90: 109; ml: 85; sql: 74; pascal: 57; modula3: 33; haskell: 32; sed: 30; java: 29; python: 24
file content (115 lines) | stat: -rw-r--r-- 4,281 bytes parent folder | download | duplicates (2)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Process this file with automake to create Makefile.in
#
# Copyright 1995-2023 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
#

AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib \
	-DLOCALEDIR=\"$(localedir)\" -DSYSCONFFILE=\"$(sysconfdir)/a2ps.cfg\" -DHAVE_CONFIG_H
AM_CFLAGS = $(WARN_CFLAGS) $(BDW_GC_FLAGS)

#
# Definition of the local target
#
noinst_LTLIBRARIES = liba2ps.la
noinst_LIBRARIES = libnowarnings.a

# --debug, --defines, --verbose
AM_YFLAGS = -dtv
# Use a struct, handle duplicates, produce ANSI-C
GPERFFLAGS = -t -D -L ANSI-C
BUILT_SOURCES = lexppd.h parseppd.h parseppd.c liba2ps.h confg.c

liba2psheaders = encoding.h media.h jobs.h output.h		\
routines.h psgen.h prolog.h faces.h useropt.h			\
gen.h printers.h psstat.h caret.h metaseq.h options.h		\
dsc.h fonts.h ppd.h prange.h stream.h document.h		\
fjobs.h	common.h madir.h filalign.h lexppd.h			\
system.h a2ps.h liba2ps.h yy2ppd.h gc-stubs.h

liba2pssources = encoding.c media.c jobs.c output.c		\
routines.c psgen.c prolog.c faces.c useropt.c			\
gen.c printers.c psstat.c caret.c metaseq.c options.c		\
dsc.c ppd.c prange.c stream.c document.c			\
fjobs.c common.c madir.c filalign.c gc-stubs.c

mylibitheaders = msg.h msg.c message.h xstrrpl.h getshline.h pathwalk.h	\
darray.h dstring.h printlen.h pair_ht.h filtdir.h str_ht.h		\
title.h xbackupfile.h getnum.h tterm.h lister.h userdata.h xobstack.h

mylibitsources = message.c xstrrpl.c gc_calloc.c getshline.c pathwalk.c	\
darray.c dstring.c printlen.c pair_ht.c filtdir.c str_ht.c		\
title.c xbackupfile.c getnum.c tterm.c lister.c userdata.c

libitheaders = argv.h hashtab.h

libitsources = argv.c hashtab.c

noinst_HEADERS = $(liba2psheaders) $(libitheaders) $(mylibitheaders)

libnowarnings_a_CFLAGS = $(BDW_GC_FLAGS)
libnowarnings_a_SOURCES = fonts.l lexppd.l parseppd.y regex.c regex.h confg.c confg.h

liba2ps_la_LDFLAGS = $(BDW_GC_LIBS)
liba2ps_la_SOURCES = $(liba2pssources) $(libitsources) $(mylibitsources)
liba2ps_la_LIBADD = ../lib/libgnu.la $(LIBINTL) $(LIBSOCKET) $(GETHOSTNAME_LIB)

#
# Handling the Gperf code
#
GPERF = gperf
confg.c: confg.gperf
	$(GPERF) $(GPERFFLAGS) $< >$@

#
# Building the header for using liba2ps
#
noinst_HEADERS += liba2ps.h
liba2ps_h_sources = liba2ps.h.in liba2ps.h.extract

liba2ps_h_extract_sources = faces.h gen.h jobs.h confg.h

liba2ps.h.extract: $(liba2ps_h_extract_sources) Makefile.am
	@echo "Extracting liba2ps.h info"
	@rm -rf liba2ps.h.extract 2> /dev/null
	@for f in $(liba2ps_h_extract_sources);			\
	do							\
	  $(AWK) '/liba2ps.h:begin/, /liba2ps.h:end/' $(srcdir)/$$f	\
	     | sed -e "s|/\* liba2ps.h:begin.*$$|/* From $$f */|g"	\
	     | sed -e "s|/\* liba2ps.h:end.*$$||g"		\
	     >> liba2ps.h.extract;				\
	done

liba2ps.h: $(liba2ps_h_sources)
	@echo "Building liba2ps.h";					\
	files=`grep liba2ps.h:include: $(srcdir)/liba2ps.h.in	\
	       | sed -e 's/^.*liba2ps.h:include:\([^ ]*\).*$$/\1/'`;	\
	cp $(srcdir)/liba2ps.h.in liba2ps.h.tmp1;			\
	for f in $$files;						\
	do								\
	  echo "Inlining file $$f";					\
	  ff=`echo $$f | sed -e 's#/#\\\\/#g'`;				\
	  cat liba2ps.h.tmp1						\
	    | sed -e "/liba2ps.h:include:$$ff/r $(srcdir)/$$f"		\
	    | sed -e "s|^.*liba2ps.h:include:$$f.*$$|\/* File $$ff *\/|g"\
		> liba2ps.h.tmp2;					\
	  mv liba2ps.h.tmp2 liba2ps.h.tmp1;				\
	done;								\
	mv liba2ps.h.tmp1 liba2ps.h

loc-local:
	cd $(srcdir) && $(CLOC) $(CLOC_OPTS) $(liba2pssources) $(liba2psheaders) $(libitsources) $(libitheaders) $(mylibitsources) $(mylibitheaders) $(libnowarnings_a_SOURCES) $(liba2ps_h_sources)

EXTRA_DIST = liba2ps.h $(liba2ps_h_sources) liba2ps.h $(BUILT_SOURCES) parseppd.h confg.gperf