Makefile.in 4.77 KB
Newer Older
jjgarcia's avatar
jjgarcia committed
1 2 3 4
# DIST: This is the distribution Makefile for ECL.  configure can
# DIST: make most of the changes to this file you might want, so try
# DIST: that first.

5
# make all	to compile and build ECL.
jjgarcia's avatar
jjgarcia committed
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
# make install	to install it.
# make TAGS	to update tags tables.
#
# make clean  or  make mostlyclean
#      Delete all files from the current directory that are normally
#      created by building the program.	 Don't delete the files that
#      record the configuration.  Also preserve files that could be made
#      by building, but normally aren't because the distribution comes
#      with them.
#
#      Delete `.dvi' files here if they are not part of the distribution.
# 
# make distclean
#      Delete all files from the current directory that are created by
#      configuring or building the program.  If you have unpacked the
#      source and built the program without creating any other files,
#      `make distclean' should leave only the files that were in the
#      distribution.
# 
# make realclean
#      Delete everything from the current directory that can be
#      reconstructed with this Makefile.  This typically includes
#      everything deleted by distclean.

SHELL = /bin/sh
31
MACHINE = @MACHINE_VERSION@
jjgarcia's avatar
jjgarcia committed
32 33 34

# ========================= Last release ================================

35
VERSION=@PACKAGE_VERSION@
36 37
WWW=https://common-lisp.net/project/ecl/
ADDRESS=https://gitlab.com/embeddable-common-lisp/ecl
jjgarcia's avatar
jjgarcia committed
38 39 40 41 42 43 44

# ==================== Things `configure' Might Edit ====================

#  Where to find the source code.
#  This is set by the configure script's `--srcdir' option.
srcdir=@srcdir@

45 46
prefix=@prefix@
exec_prefix=@exec_prefix@
47 48
datarootdir=@datarootdir@
datadir=@datadir@
jjgarcia's avatar
jjgarcia committed
49 50 51 52 53 54 55 56
bindir=@bindir@
infodir=@infodir@
mandir=@mandir@
libdir=@libdir@

# ==================== Utility Programs for the Build ====================

#  Allow the user to specify the install program.
57
@SET_MAKE@
jjgarcia's avatar
jjgarcia committed
58 59 60 61 62 63
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

# ============================= Build ==============================

64 65
all: build/Makefile
	cd build; $(MAKE)
jjgarcia's avatar
jjgarcia committed
66 67
.PHONY:	all

68 69
Makefile: Makefile.in build/config.status
	(cd build; ./config.status)
jjgarcia's avatar
jjgarcia committed
70

71 72 73
ecl_min: build/Makefile
	cd build; $(MAKE) ecl_min

jjgarcia's avatar
jjgarcia committed
74 75
# ==================== Installation ====================

76 77
INSTALL_TARGET = @INSTALL_TARGET@

78 79
install: build/Makefile
	cd build; $(MAKE) $(INSTALL_TARGET)
jjgarcia's avatar
jjgarcia committed
80
uninstall:
81
	cd build; $(MAKE) uninstall
jjgarcia's avatar
jjgarcia committed
82 83 84 85 86 87 88 89 90

# ==================== Cleaning up and miscellanea ====================

#   `clean'
#        Delete all files from the current directory that are normally
#        created by building the program.  Don't delete the files that
#        record the configuration.  Also preserve files that could be made
#        by building, but normally aren't because the distribution comes
#        with them.
jjgarcia's avatar
jjgarcia committed
91
#
jjgarcia's avatar
jjgarcia committed
92
clean:
93
	cd build; $(MAKE) clean
jjgarcia's avatar
jjgarcia committed
94 95 96 97 98 99 100 101 102

#   `distclean'
#        Delete all files from the current directory that are created by
#        configuring or building the program.  If you have unpacked the
#        source and built the program without creating any other files,
#        `make distclean' should leave only the files that were in the
#        distribution.

distclean: clean
103
	rm -rf build Makefile
jjgarcia's avatar
jjgarcia committed
104 105 106 107 108 109 110 111 112 113 114

#   `realclean'
#        Delete everything from the current directory that can be
#        reconstructed with this Makefile.
#        One exception, however: `make realclean' should not delete
#        `configure' even if `configure' can be remade using a rule in the
#        Makefile.  More generally, `make realclean' should not delete
#        anything that needs to exist in order to run `configure' and then
#        begin to build the program.
realclean: distclean

115
check:
116
	cd build && $(MAKE) check TESTS="$(TESTS)"
117

118
# ==================== Various means of distribution ====================
jjgarcia's avatar
jjgarcia committed
119

120
TAR_DIR=ecl-$(VERSION)
jjgarcia's avatar
jjgarcia committed
121

122 123 124
doc:
	$(MAKE) -C build/doc
.PHONY: doc
jjgarcia's avatar
jjgarcia committed
125

126
source-dist: $(TAR_DIR).tgz
jjgarcia's avatar
jjgarcia committed
127

128 129
$(TAR_DIR).tgz:
	git archive --format=tar.gz --prefix=$(TAR_DIR)/ HEAD > $@
jjgarcia's avatar
jjgarcia committed
130 131 132 133

binary-dist: all
	su -c "rm -rf tmp"
	mkdir tmp
134
	for i in tmp$(bindir) tmp$(infodir) tmp$(mandir) tmp$(libdir); do \
135
	(echo $$i; IFS="/"; \for k in $$i; do echo $$k; (test -d $$k || mkdir $$k); chmod 755 $$k; cd $$k; done); \
jjgarcia's avatar
jjgarcia committed
136
	done
137
	prefix=`pwd`/tmp; cd build; $(MAKE) install prefix=$(prefix)
138
	su -c "chown -R root.root tmp && cd tmp; tar czf ../ecl-$(VERSION)-$(MACHINE).tgz * && cd .. && rm -rf tmp"
jjgarcia's avatar
jjgarcia committed
139

jjgarcia's avatar
jjgarcia committed
140 141
# This creates a ZIP file with a flattened directory structure
windows-dist: all
142
	cd build; rm -rf $(TAR_DIR); mkdir $(TAR_DIR); \
143
	$(MAKE) flatinstall prefix=`pwd`/$(TAR_DIR); \
jjgarcia's avatar
jjgarcia committed
144
	zip -r $(TAR_DIR).zip $(TAR_DIR)
145
windows-nsi: all
146
	cd build; rm -rf $(TAR_DIR); mkdir $(TAR_DIR); \
147
	$(MAKE) flatinstall prefix=`pwd`/$(TAR_DIR)
148 149 150
	`pwd`/src/util/ecl_nsi.sh `pwd`/src/util/ecl.nsi build/$(TAR_DIR)
	makensis.exe build/$(TAR_DIR)/ecl.nsi
	mv build/$(TAR_DIR)/Setup.exe ecl-$(VERSION).exe