File: Makefile.am

package info (click to toggle)
gnu-smalltalk 3.1-6
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 33,300 kB
  • ctags: 13,999
  • sloc: ansic: 88,106; sh: 23,223; asm: 7,889; perl: 4,493; cpp: 3,539; awk: 1,483; yacc: 1,355; xml: 1,272; makefile: 1,192; lex: 843; sed: 258; objc: 124
file content (226 lines) | stat: -rw-r--r-- 7,880 bytes parent folder | download
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# 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 2, 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

# Automake requirements
AUTOMAKE_OPTIONS = gnu 1.8
ACLOCAL_AMFLAGS = -I build-aux

PACKAGE=smalltalk
gstdatadir=$(pkgdatadir)

DIST_SUBDIRS = lib-src snprintfv lightning sigsegv libffi opcode libgst \
	. $(ALL_PACKAGES) tests doc

SUBDIRS = lib-src lightning $(subdirs)
if ENABLE_DISASSEMBLER
SUBDIRS += opcode
endif
SUBDIRS += libgst . $(BUILT_PACKAGES) doc tests

# Running gst inside the build directory...

GST_OPTS = --kernel-dir="@abs_top_srcdir@/kernel" --image="@abs_top_builddir@/gst.im"
GST = ./gst --no-user-files $(GST_OPTS)
GST_PACKAGE = ./gst-tool gst-package $(GST_OPTS)


###########################################################
#
#        Rules for configuration files
#
###########################################################

aclocaldir = $(datadir)/aclocal
dist_aclocal_DATA = build-aux/gst.m4 build-aux/gst-package.m4
dist_noinst_DATA = Doxyfile
dist_noinst_SCRIPTS = build-aux/texi2dvi build-aux/texi2html \
	build-aux/help2man build-aux/config.rpath 

###########################################################
#
#        Rules for scripts and data files
#
###########################################################

pkgconfigdir = $(libdir)/pkgconfig
nodist_pkgconfig_DATA = gnu-smalltalk.pc

pkglib_DATA = libc.la
noinst_DATA = gst.im
dist_noinst_DATA += smalltalk-mode.el.in gst-mode.el.in .gdbinit \
	scripts/Finish.st gsticon.ico packages/xml/ChangeLog \
	packages/seaside/PORTING

if WITH_EMACS
nodist_lisp_LISP = smalltalk-mode.el
if WITH_EMACS_COMINT
nodist_lisp_LISP += gst-mode.el
endif
endif

bin_SCRIPTS = gst-config
DISTCLEANFILES = termbold termnorm smalltalk-mode.el gst-mode.el pkgrules.tmp
CLEANFILES = gst.im $(lisp_LISP)

smalltalk-mode.el: smalltalk-mode.el.in
	$(SED) -e "s,@\(lispdir\)@,$(lispdir)," $(srcdir)/smalltalk-mode.el.in \
	  > smalltalk-mode.el

gst-mode.el: gst-mode.el.in
	$(SED) -e "s,@\(bindir\)@,$(bindir)," $(srcdir)/gst-mode.el.in \
	  > gst-mode.el

###########################################################
#
#        Rules for building the VM
#
###########################################################

AM_CPPFLAGS = -I$(top_srcdir)/libgst		\
	-I$(top_srcdir)/lib-src			\
	-DCMD_ZIP="\"$(ZIP)\""			\
	-DCMD_INSTALL="\"$(INSTALL)\""		\
	-DCMD_LN_S="\"$(LN_S)\""		\
	$(RELOC_CPPFLAGS)

bin_PROGRAMS = gst

gst_SOURCES = main.c
gst_LDADD = libgst/libgst.la lib-src/library.la @ICON@
gst_DEPENDENCIES = libgst/libgst.la lib-src/library.la @ICON@
gst_LDFLAGS = -export-dynamic $(RELOC_LDFLAGS)

if ENABLE_DISASSEMBLER
gst_LDADD += opcode/libdisass.la
gst_DEPENDENCIES += opcode/libdisass.la
AM_CPPFLAGS += -I$(top_srcdir)/opcode
endif

# The single gst-tool executable is installed with multiple names, hence
# we use noinst here.
noinst_PROGRAMS = gst-tool
gst_tool_SOURCES = gst-tool.c
gst_tool_LDADD = libgst/libgst.la lib-src/library.la
gst_tool_DEPENDENCIES = libgst/libgst.la lib-src/library.la
gst_tool_LDFLAGS = -export-dynamic $(RELOC_LDFLAGS)

GST_EXTRA_TOOLS = gst-reload gst-sunit gst-blox gst-package gst-convert \
	gst-doc gst-remote

uninstall-local::
	@for i in gst-load $(GST_EXTRA_TOOLS); do \
	  echo rm -f "$(DESTDIR)$(bindir)/$$i$(EXEEXT)"; \
	  rm -f "$(DESTDIR)$(bindir)/$$i$(EXEEXT)"; \
	done

install-exec-hook::
	$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL) gst-tool$(EXEEXT) "$(DESTDIR)$(bindir)/gst-load$(EXEEXT)"
	@for i in $(GST_EXTRA_TOOLS); do \
	  echo $(LN) -f "$(DESTDIR)$(bindir)/gst-load$(EXEEXT)" "$(DESTDIR)$(bindir)/$$i$(EXEEXT)"; \
	  $(LN) -f "$(DESTDIR)$(bindir)/gst-load$(EXEEXT)" "$(DESTDIR)$(bindir)/$$i$(EXEEXT)"; \
	done

nodist_noinst_HEADERS = config.h
DISTCLEANFILES += config.h

# These two lines add a beatiful icon to the Win32 executable
gsticon.o: gsticon.ico
	echo ProgramIcon ICON `$(CYGPATH_W) gsticon.ico` | $(WINDRES) -o gsticon.o

gst.im: $(bin_PROGRAMS) $(srcdir)/kernel/stamp-classes
	$(GST) -iQ /dev/null


###########################################################
#
#        Rules for distributing the superops program
#
###########################################################

dist_noinst_DATA += \
	superops/ChangeLog superops/Makefile superops/README \
	superops/bool-array.cc superops/bool-array.h superops/bool-array.icc \
	superops/byte_def.cc superops/byte_def.h superops/hash-table.cc \
	superops/hash-table.h superops/hash.cc superops/hash.h \
	superops/keyword-list.cc superops/keyword-list.h superops/keyword-list.icc \
	superops/keyword.cc superops/keyword.h superops/keyword.icc \
	superops/observer-list.cc superops/observer-list.h superops/options.cc \
	superops/options.h superops/options.icc superops/positions.cc \
	superops/positions.h superops/positions.icc superops/search.cc \
	superops/search.h superops/superops.cc superops/table.cc superops/table.h \
	superops/vm_def.cc superops/vm_def.h

###########################################################
#
#        Rules for installing and distributing
#
#	 More rules are created by the GST_PACKAGE macros,
#	 including the stamp files used for building the
#	 documentation.  Here we mimic those rules for the
#	 kernel, whose file list lives in packages.xml
#
###########################################################

-include $(srcdir)/kernel/Makefile.frag
all-local: $(srcdir)/kernel/stamp-classes

# The slow rule for building the stamp-classes files uses gst-package, and
# depends on packages.xml in order to run when the list of files in the
# package might have changed.  The fast rule just touches the file.  We
# could actually do without double-colon rules by using another stamp file
# which depends on packages.xml and rebuilds all the stamp-classes files.

$(srcdir)/kernel/Makefile.frag: $(srcdir)/packages.xml
	(echo '$$(srcdir)/kernel/stamp-classes: \'; \
	  $(GST_PACKAGE) --list-files Kernel --vpath --srcdir="$(srcdir)" $(srcdir)/packages.xml | \
	    tr -d \\r | tr \\n ' '; \
	echo; \
	echo '	touch $$(srcdir)/kernel/stamp-classes') \
	  > $(srcdir)/kernel/Makefile.frag

all-local:
clean-local::

dist-hook::
	$(GST_PACKAGE) --dist \
	  --distdir="$(distdir)" --srcdir="$(srcdir)" \
	  $(srcdir)/packages.xml
	cp -p $(srcdir)/kernel/stamp-classes $(distdir)/kernel/stamp-classes
	cp -p $(srcdir)/kernel/Makefile.frag $(distdir)/kernel/Makefile.frag

# Build an image after installing the data; install-data runs after
# install-exec, so the gst executable is already in bindir.
# To install the kernel files, we use gst-package in --dist mode.
install-data-hook::
	$(GST_PACKAGE) --dist --copy --all-files \
	  --destdir="$(DESTDIR)" --target-dir="$(pkgdatadir)" \
	  --srcdir="$(srcdir)" $(srcdir)/packages.xml
	$(mkdir_p) $(DESTDIR)$(imagedir)
	cd $(DESTDIR)$(imagedir) && \
	  "@abs_top_builddir@/gst" --no-user-files -iS \
	    --kernel-dir="$(DESTDIR)$(pkgdatadir)/kernel" \
	    --image="$(DESTDIR)$(imagedir)/gst.im" \
	    -f "@abs_top_srcdir@/scripts/Finish.st" \
	    "$(imagedir)" $(MODULES)

uninstall-local:: gst-tool
	$(GST_PACKAGE) \
	  --uninstall --destdir="$(DESTDIR)" --target-dir="$(pkgdatadir)" \
	  --srcdir=$(srcdir) $(DESTDIR)$(pkgdatadir)/packages.xml
	-rm -f $(DESTDIR)$(imagedir)/gst.im

@PACKAGE_RULES@