blob: 42648674f768b75431339319ee5792481d8b56a7
| 1 | # makefile for Gambit-C builds. |
| 2 | |
| 3 | # Copyright (c) 1994-2009 by Marc Feeley, All Rights Reserved. |
| 4 | |
| 5 | herefromroot = prebuilt |
| 6 | rootfromhere = .. |
| 7 | SUBDIRS = macosx windows |
| 8 | |
| 9 | PACKAGE_SHORTNAME = @PACKAGE_SHORTNAME@ |
| 10 | PACKAGE_NAME = @PACKAGE_NAME@ |
| 11 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
| 12 | PACKAGE_STRING = @PACKAGE_STRING@ |
| 13 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ |
| 14 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ |
| 15 | |
| 16 | @SET_MAKE@ |
| 17 | |
| 18 | srcdir = @srcdir@ |
| 19 | VPATH = @srcdir@ |
| 20 | srcdirpfx = @srcdirpfx@ |
| 21 | |
| 22 | C_COMPILER = @C_COMPILER_MF@ |
| 23 | C_PREPROC = @C_PREPROC_MF@ |
| 24 | FLAGS_OBJ = @FLAGS_OBJ_MF@ |
| 25 | FLAGS_DYN = @FLAGS_DYN_MF@ |
| 26 | FLAGS_LIB = @FLAGS_LIB_MF@ |
| 27 | FLAGS_EXE = @FLAGS_EXE_MF@ |
| 28 | DEFS = @DEFS@ |
| 29 | LIBS = @LIBS@ |
| 30 | |
| 31 | GAMBCLIB_DEFS = @GAMBCLIB_DEFS_MF@ |
| 32 | LIB_PREFIX = @LIB_PREFIX@ |
| 33 | LIB_EXTENSION = @LIB_EXTENSION@ |
| 34 | GAMBCLIB = @GAMBCLIB@ |
| 35 | GAMBCGSCLIB = @GAMBCGSCLIB@ |
| 36 | GAMBCGSILIB = @GAMBCGSILIB@ |
| 37 | INSTALL = @INSTALL@ |
| 38 | INSTALL_DATA = @INSTALL_DATA@ |
| 39 | INSTALL_LIB = @INSTALL_LIB@ |
| 40 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
| 41 | LN_S = @LN_S@ |
| 42 | RANLIB = @RANLIB@ |
| 43 | RC = @RC@ |
| 44 | GIT = @GIT@ |
| 45 | HG = @HG@ |
| 46 | |
| 47 | prefix = @prefix@ |
| 48 | exec_prefix = @exec_prefix@ |
| 49 | includedir = @includedir@ |
| 50 | libdir = @libdir@ |
| 51 | bindir = @bindir@ |
| 52 | docdir = @docdir@ |
| 53 | infodir = @infodir@ |
| 54 | emacsdir = @emacsdir@ |
| 55 | libexecdir = @libexecdir@ |
| 56 | datarootdir = @datarootdir@ |
| 57 | datadir = @datadir@ |
| 58 | htmldir = @htmldir@ |
| 59 | dvidir = @dvidir@ |
| 60 | pdfdir = @pdfdir@ |
| 61 | psdir = @psdir@ |
| 62 | localedir = @localedir@ |
| 63 | mandir = @mandir@ |
| 64 | |
| 65 | .SUFFIXES: |
| 66 | |
| 67 | RCFILES = makefile.in README |
| 68 | |
| 69 | GENDISTFILES = |
| 70 | |
| 71 | DISTFILES = $(RCFILES) $(GENDISTFILES) |
| 72 | |
| 73 | all: |
| 74 | |
| 75 | all-pre: |
| 76 | |
| 77 | all-post: |
| 78 | |
| 79 | prebuilt: |
| 80 | @for subdir in $(SUBDIRS); do \ |
| 81 | echo "************ $$subdir BUILD STARTING"; \ |
| 82 | rm -f remote-script remote-script.out; \ |
| 83 | echo "#! /bin/sh" > remote-script; \ |
| 84 | echo "cd /tmp" >> remote-script; \ |
| 85 | echo "sudo rm -rf $(PACKAGE_TARNAME).tgz $(PACKAGE_TARNAME)" >> remote-script; \ |
| 86 | echo "scp \$$ORIGINATOR:$(PWD)/$(rootfromhere)/$(PACKAGE_TARNAME).tgz ." >> remote-script; \ |
| 87 | echo "tar zxf $(PACKAGE_TARNAME).tgz" >> remote-script; \ |
| 88 | echo "cd $(PACKAGE_TARNAME)" >> remote-script; \ |
| 89 | echo "sudo prebuilt/$$subdir/build" >> remote-script; \ |
| 90 | echo "scp $(PACKAGE_TARNAME)* \$$ORIGINATOR:$(PWD)/$(rootfromhere)" >> remote-script; \ |
| 91 | echo "sudo rm -rf $(PACKAGE_TARNAME).tgz $(PACKAGE_TARNAME)" >> remote-script; \ |
| 92 | if ./$$subdir/remote-shell remote-script > remote-script.out && cat remote-script.out && fgrep "************ $$subdir BUILD SUCCESSFUL" remote-script.out > /dev/null; then \ |
| 93 | rm -f remote-script remote-script.out; \ |
| 94 | else \ |
| 95 | echo "************ $$subdir BUILD FAILED"; \ |
| 96 | rm -f remote-script remote-script.out; \ |
| 97 | exit 1; \ |
| 98 | fi; \ |
| 99 | done |
| 100 | |
| 101 | install-pre: |
| 102 | |
| 103 | install-post: all |
| 104 | |
| 105 | uninstall-pre: |
| 106 | |
| 107 | uninstall-post: |
| 108 | |
| 109 | mostlyclean-pre: |
| 110 | |
| 111 | mostlyclean-post: |
| 112 | rm -f remote-script remote-script.out |
| 113 | |
| 114 | clean-pre: mostlyclean-pre |
| 115 | |
| 116 | clean-post: mostlyclean-post |
| 117 | |
| 118 | distclean-pre: clean-pre |
| 119 | |
| 120 | distclean-post: clean-post |
| 121 | |
| 122 | bootclean-pre: distclean-pre |
| 123 | |
| 124 | bootclean-post: distclean-post |
| 125 | |
| 126 | realclean-pre: bootclean-pre |
| 127 | |
| 128 | realclean-post: bootclean-post |
| 129 | rm -f makefile |
| 130 | |
| 131 | rc-setup-pre: |
| 132 | $(RC) add $(RCFILES) |
| 133 | |
| 134 | rc-setup-post: |
| 135 | |
| 136 | dist-pre dist-devel-pre: |
| 137 | mkdir $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot) |
| 138 | chmod 777 $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot) |
| 139 | @echo " Copying distribution files:" |
| 140 | @for file in $(DISTFILES); do \ |
| 141 | echo " $(herefromroot)/$$file"; \ |
| 142 | ln $(srcdirpfx)$$file $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot) 2> /dev/null \ |
| 143 | || cp -p $(srcdirpfx)$$file $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot); \ |
| 144 | done |
| 145 | |
| 146 | dist-post dist-devel-post: |
| 147 | |
| 148 | all-recursive install-recursive uninstall-recursive mostlyclean-recursive clean-recursive distclean-recursive bootclean-recursive realclean-recursive rc-setup-recursive dist-recursive dist-devel-recursive: |
| 149 | @if test -n "$(SUBDIRS)"; then \ |
| 150 | for subdir in ""$(SUBDIRS); do \ |
| 151 | target=`echo $@ | sed 's/-recursive//'`; \ |
| 152 | echo making $$target in $$subdir; \ |
| 153 | (cd $$subdir && $(MAKE) $$target) || exit 1; \ |
| 154 | done \ |
| 155 | fi |
| 156 | |
| 157 | all: all-post |
| 158 | |
| 159 | all-post: all-recursive |
| 160 | |
| 161 | all-recursive: all-pre |
| 162 | |
| 163 | install: install-post |
| 164 | |
| 165 | install-post: install-recursive |
| 166 | |
| 167 | install-recursive: install-pre |
| 168 | |
| 169 | uninstall: uninstall-post |
| 170 | |
| 171 | uninstall-post: uninstall-recursive |
| 172 | |
| 173 | uninstall-recursive: uninstall-pre |
| 174 | |
| 175 | mostlyclean: mostlyclean-post |
| 176 | |
| 177 | mostlyclean-post: mostlyclean-recursive |
| 178 | |
| 179 | mostlyclean-recursive: mostlyclean-pre |
| 180 | |
| 181 | clean: clean-post |
| 182 | |
| 183 | clean-post: clean-recursive |
| 184 | |
| 185 | clean-recursive: clean-pre |
| 186 | |
| 187 | distclean: distclean-post |
| 188 | |
| 189 | distclean-post: distclean-recursive |
| 190 | |
| 191 | distclean-recursive: distclean-pre |
| 192 | |
| 193 | bootclean: bootclean-post |
| 194 | |
| 195 | bootclean-post: bootclean-recursive |
| 196 | |
| 197 | bootclean-recursive: bootclean-pre |
| 198 | |
| 199 | realclean: realclean-post |
| 200 | |
| 201 | realclean-post: realclean-recursive |
| 202 | |
| 203 | realclean-recursive: realclean-pre |
| 204 | |
| 205 | rc-setup: rc-setup-post |
| 206 | |
| 207 | rc-setup-post: rc-setup-recursive |
| 208 | |
| 209 | rc-setup-recursive: rc-setup-pre |
| 210 | |
| 211 | dist: dist-post |
| 212 | |
| 213 | dist-post: dist-recursive |
| 214 | |
| 215 | dist-recursive: dist-pre |
| 216 | |
| 217 | dist-devel: dist-devel-post |
| 218 | |
| 219 | dist-devel-post: dist-devel-recursive |
| 220 | |
| 221 | dist-devel-recursive: dist-devel-pre |
| 222 | |
| 223 | makefile: makefile.in $(rootfromhere)/config.status |
| 224 | cd $(rootfromhere) && CONFIG_FILES=$(herefromroot)/$@ CONFIG_HEADERS= ./config.status |
| 225 | |
| 226 | # Tell versions [3.59,3.63) of GNU make not to export all variables. |
| 227 | # Otherwise a system limit (for SysV at least) may be exceeded. |
| 228 | .NOEXPORT: |
| 229 |
