File: Makefile.in

package info (click to toggle)
antlr 2.7.7%2Bdfsg-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,020 kB
  • sloc: java: 54,649; cs: 12,537; makefile: 8,852; cpp: 7,359; pascal: 5,273; sh: 4,333; python: 4,299; lisp: 1,969; xml: 220; lex: 192; ansic: 127
file content (180 lines) | stat: -rw-r--r-- 6,003 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
## do not change this value
subdir=.

## get  standard variables from autoconf - autoconf will replace
## this variable with content of "scripts/config.vars".
@stdvars@

## By default, make will jump into any sub directory  containing
## a file named "Makefile". This is done in the order implied by
## /bin/ls. You can override this by using variable SUBDIRS. For
## example, if not set, then make behaves as if
##   SUBDIRS     = antlr doc examples lib
## has been set.

SUBDIRS = antlr lib doc 

## When using stdmake  before  any other rule, then the default
## rule is "all"  and  behaviour  of  make is first to make all
## subdirectories  and then all "local"  targets with name all,
## clean, install, test etc.
## Sometimes it's usefull to make the local target first and then
## subdirs. To  enforce  this, just listen target in question be-
## fore "stdmake". By doing so, your target will become the
## default. This is usually not what you want. Therefore introduce
## a pseude rule (like this) to tell make about the default target.
this : all


## get standard make rules from autoconf
@stdmake@

test clean distclean install ::
	@ if test -f examples/Makefile ; then \
		@MAKE@ -C examples $@ ; \
	fi

# Rule  to  remove  all objects, cores, ANTLR generated,
# configure generated, etc. This is not a recursive rule
# because distclean removes files unconditionally
# included by subdirectory Makefiles.
#
maintainer-clean: distclean
	-@RMF@ -f configure

#
# Rule to make a tarball exclusive all kinds of fluff
#

# Set TIMESTAMP from SOURCE_DATE_EPOCH
# https://reproducible-builds.org/docs/source-date-epoch/
DATE_FMT = +%Y%m%d
ifdef SOURCE_DATE_EPOCH
    TIMESTAMP ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)")
else
    TIMESTAMP ?= $(shell date "$(DATE_FMT)")
endif
TAR_DIR         = $(versioneddir)
TAR_FILE	      = $(versioneddir).tar

_tar:
	-@RMF@ $(TAR_DIR)
	ln -s $(srcdir) $(TAR_DIR)
	$(TAR) cfh $(TAR_FILE) \
				--exclude CVS \
				--exclude *.pyc \
				--exclude *.o \
				--exclude *.d \
				--exclude *.lo \
				--exclude *.a \
				--exclude *.la \
				--exclude *.lai \
				--exclude *.so \
				--exclude *.class \
				--exclude .deps \
				--exclude .depend \
				--exclude config.cache \
				--exclude config.status \
				--exclude Config.make \
				--exclude antlr-config \
				--exclude run-antlr \
				--exclude *~ \
				--exclude core \
				--exclude dmalloc.log \
				--exclude .gdb_history \
				--exclude ".nfs*" \
				--exclude "$(TAR_DIR)/gen_doc/html" \
				--exclude "$(TAR_DIR)/gen_doc/html/*" \
				--exclude Makefile \
				$(TAR_DIR)
	@CHMOD@ 660 $(TAR_FILE)
	@RMF@ $(TAR_DIR)

tar backup : _tar
	gzip -f --best $(TAR_FILE)

## When building a release, it's crucial that time stamps are up-to-date and that
## files have proper permission bit set. Since $(srcdir) might be under the 
## control of Perforce (or an other versioning system), I'm going to unpack the
## tar file again in a local directory and update time stamps as well as 
## permission.
release : @ANTLR_JAR@ _tar
	@TAR@ xpf $(TAR_FILE)
	@CP@ @ANTLR_JAR@ $(TAR_DIR)
	find $(TAR_DIR) -type f | xargs @CHMOD@ 644
	find $(TAR_DIR) -type d | xargs @CHMOD@ 755
	@CHMOD@ 777 $(TAR_DIR)/configure
	find $(TAR_DIR) | xargs @TOUCH@
	find $(TAR_DIR)/antlr -name \*.java | xargs @TOUCH@
	@TAR@ cf $(TAR_FILE) $(TAR_DIR)
	gzip -f --best $(TAR_FILE)
	gzip -t -v $(TAR_FILE).gz
	@RMF@ $(TAR_DIR)

## This one for RK:
new_version antlr/Version.java:
	@@ECHO@ "Rebuilding Version.java"
	@@ECHO@ "package antlr;"  > antlr/Version.java
	@@ECHO@ "public class Version {"  >> antlr/Version.java
	@@ECHO@ " public static final String version    = \"$(VERSION)\";"  >> antlr/Version.java
	@@ECHO@ " public static final String subversion = \"$(SUBVERSION)\";"  >> antlr/Version.java
	@@ECHO@ " public static final String patchlevel = \"$(PATCHLEVEL)\";"  >> antlr/Version.java
	@@ECHO@ " public static final String datestamp  = \"$(TIMESTAMP)\";"  >> antlr/Version.java
	@@ECHO@ " public static final String project_version = \"$(VERSION).$(SUBVERSION).$(PATCHLEVEL) ($(TIMESTAMP))\";"  >> antlr/Version.java
	@@ECHO@ "}"  >> antlr/Version.java

## Installation is delegated to sub directories - as configured.
## Here we  just  create  a  bin  directory that should contain
## scripts to mess up with ANTLR. Other things to do?

docdir   = $(datadir)/doc/$(versioneddir)
extradir = $(datadir)/$(versioneddir)

install ::
	$(MKDIR) -p "$(bindir)"
	$(MKDIR) -p "$(extradir)"
	$(MKDIR) -p "$(docdir)"
	$(INSTALL) -m 755 scripts/run-antlr                          "$(bindir)/antlr"
	$(INSTALL) -m 755 scripts/antlr-config                       "$(bindir)/antlr-config"
	$(INSTALL) -m 444 @abs_top_srcdir@/extras/antlr-mode.el      "$(extradir)"
	$(INSTALL) -m 444 @abs_top_srcdir@/extras/antlr-jedit.xml    "$(extradir)"
	$(INSTALL) -m 444 @abs_top_srcdir@/LICENSE.txt               "$(docdir)"
	$(INSTALL) -m 444 @abs_top_srcdir@/README.txt                "$(docdir)"
	$(INSTALL) -m 444 @abs_top_srcdir@/INSTALL.txt               "$(docdir)"

install ::
	@ECHO@ "installation done"

# Make sure that all generated files are removed
distclean_obj = \
 config.* \
 Makefile \
 scripts/antlr-config \
 scripts/antlr.sh \
 scripts/antlr.spec \
 scripts/config.deps \
 scripts/config.make \
 scripts/config.vars \
 scripts/cpp.sh \
 scripts/csc.sh \
 scripts/c.sh \
 scripts/cxx.sh \
 scripts/jar.sh \
 scripts/javac.sh \
 scripts/java.sh \
 scripts/lib.sh \
 scripts/link.sh \
 scripts/pyantlr.sh \
 scripts/python.sh \
 scripts/run-antlr \
 $(eof)

distclean :: clean
	@RMF@ $(distclean_obj)
	Q=`find . -name Makefile` && test -n "$$Q" && @RMF@ $${Q}

### phony targets - make this targets even if file with same name exists.
.PHONY: bootstrap backup maintainer-clean
##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@stddeps@
##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx