Makefile.am 11 KB
Newer Older
hana's avatar
update:  
hana committed
1
SUBDIRS = cheddar aadl_xml python alloy lnt
2 3 4 5 6 7

@DEBUG_FALSE@DEBUG_FLAG = --disable-debug
@DEBUG_TRUE@DEBUG_FLAG = --enable-debug

################################################################################

yoogx's avatar
yoogx committed
8 9 10 11 12 13 14 15
maybe-reconfig-aadlib:
@AADLIB_TRUE@maybe-reconfig-aadlib: reconfig-aadlib
reconfig-aadlib:
	r_dir='aadlib'; \
	test -f $(srcdir)/$${r_dir}/configure && exit 0 || true; \
	test -d $(srcdir)/$${r_dir} || exit 0; \
	cd $(srcdir)/$${r_dir} && ./support/reconfig

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
maybe-reconfig-polyorb-hi-ada:
@PO_HI_ADA_TRUE@maybe-reconfig-polyorb-hi-ada: reconfig-polyorb-hi-ada
reconfig-polyorb-hi-ada:
	r_dir='polyorb-hi-ada'; \
	test -f $(srcdir)/$${r_dir}/configure && exit 0 || true; \
	test -d $(srcdir)/$${r_dir} || exit 0; \
	cd $(srcdir)/$${r_dir} && ./support/reconfig

maybe-reconfig-polyorb-hi-c:
@PO_HI_C_TRUE@maybe-reconfig-polyorb-hi-c: reconfig-polyorb-hi-c
reconfig-polyorb-hi-c:
	r_dir='polyorb-hi-c'; \
	test -f $(srcdir)/$${r_dir}/configure && exit 0 || true; \
	test -d $(srcdir)/$${r_dir} || exit 0; \
	cd $(srcdir)/$${r_dir} && ./support/reconfig

################################################################################

maybe-configure-pok:
@POK_TRUE@maybe-configure-pok: configure-pok
36
configure-pok:
37 38 39 40
	r_dir='pok'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) configure

yoogx's avatar
yoogx committed
41 42 43 44 45 46 47 48 49 50 51
maybe-configure-aadlib:
@AADLIB_TRUE@maybe-configure-aadlib: configure-aadlib
configure-aadlib: reconfig-aadlib
	r_dir='aadlib'; \
	s_dir=`(cd $(srcdir) && pwd)`; \
	test -f $${r_dir}/Makefile && exit 0 || true; \
	test -x $(srcdir)/$${r_dir}/configure || exit 0; \
	$(mkdir_p) $${r_dir} && cd $${r_dir} || exit 1; \
	$${s_dir}/$${r_dir}/configure $(DEBUG_FLAG) $(DOC_FLAG) \
	   --with-ocarina-prefix='$(prefix)' --disable-ocarina-version-check

52 53 54 55 56 57 58 59
maybe-configure-polyorb-hi-ada:
@PO_HI_ADA_TRUE@maybe-configure-polyorb-hi-ada: configure-polyorb-hi-ada
configure-polyorb-hi-ada: reconfig-polyorb-hi-ada
	r_dir='polyorb-hi-ada'; \
	s_dir=`(cd $(srcdir) && pwd)`; \
	test -f $${r_dir}/Makefile && exit 0 || true; \
	test -x $(srcdir)/$${r_dir}/configure || exit 0; \
	$(mkdir_p) $${r_dir} && cd $${r_dir} || exit 1; \
60
	$${s_dir}/$${r_dir}/configure $(DEBUG_FLAG) $(DOC_FLAG) \
61 62 63 64 65 66 67 68 69 70
	   --with-ocarina-prefix='$(prefix)' --disable-ocarina-version-check

maybe-configure-polyorb-hi-c:
@PO_HI_C_TRUE@maybe-configure-polyorb-hi-c: configure-polyorb-hi-c
configure-polyorb-hi-c: reconfig-polyorb-hi-c
	r_dir='polyorb-hi-c'; \
	s_dir=`(cd $(srcdir) && pwd)`; \
	test -f $${r_dir}/Makefile && exit 0 || true; \
	test -x $(srcdir)/$${r_dir}/configure || exit 0; \
	$(mkdir_p) $${r_dir} && cd $${r_dir} || exit 1; \
71
	$${s_dir}/$${r_dir}/configure $(DEBUG_FLAG) $(DOC_FLAG) \
72 73 74 75
	   --with-ocarina-prefix='$(prefix)' --disable-ocarina-version-check

################################################################################

yoogx's avatar
yoogx committed
76 77 78 79 80 81 82
maybe-all-aadlib:
@AADLIB_TRUE@maybe-all-aadlib: all-aadlib
all-aadlib: configure-aadlib
	r_dir='aadlib'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) all

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
maybe-all-polyorb-hi-ada:
@PO_HI_ADA_TRUE@maybe-all-polyorb-hi-ada: all-polyorb-hi-ada
all-polyorb-hi-ada: configure-polyorb-hi-ada
	r_dir='polyorb-hi-ada'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) all

maybe-all-polyorb-hi-c:
@PO_HI_C_TRUE@maybe-all-polyorb-hi-c: all-polyorb-hi-c
all-polyorb-hi-c: configure-polyorb-hi-c
	r_dir='polyorb-hi-c'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) all

################################################################################

maybe-dvi-polyorb-hi-ada:
@PO_HI_ADA_TRUE@maybe-dvi-polyorb-hi-ada: dvi-polyorb-hi-ada
dvi-polyorb-hi-ada: configure-polyorb-hi-ada
	r_dir='polyorb-hi-ada'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) dvi

maybe-dvi-polyorb-hi-c:
@PO_HI_C_TRUE@maybe-dvi-polyorb-hi-c: dvi-polyorb-hi-c
dvi-polyorb-hi-c: configure-polyorb-hi-c
	r_dir='polyorb-hi-c'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) dvi

################################################################################

yoogx's avatar
yoogx committed
115 116 117 118 119 120 121
maybe-install-aadlib:
@AADLIB_TRUE@maybe-install-aadlib: install-aadlib
install-aadlib: all-aadlib
	r_dir='aadlib'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) DESTDIR="$(DESTDIR)" install

122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
maybe-install-polyorb-hi-ada:
@PO_HI_ADA_TRUE@maybe-install-polyorb-hi-ada: install-polyorb-hi-ada
install-polyorb-hi-ada: all-polyorb-hi-ada
	r_dir='polyorb-hi-ada'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) DESTDIR="$(DESTDIR)" install

maybe-install-polyorb-hi-c:
@PO_HI_C_TRUE@maybe-install-polyorb-hi-c: install-polyorb-hi-c
install-polyorb-hi-c: all-polyorb-hi-c
	r_dir='polyorb-hi-c'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) DESTDIR="$(DESTDIR)" install

################################################################################

yoogx's avatar
yoogx committed
138 139 140 141 142 143 144
maybe-installcheck-aadlib:
@AADLIB_TRUE@maybe-installcheck-aadlib: installcheck-aadlib
installcheck-aadlib: all-aadlib
	r_dir='aadlib'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) installcheck

145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
maybe-installcheck-polyorb-hi-ada:
@PO_HI_ADA_TRUE@maybe-installcheck-polyorb-hi-ada: installcheck-polyorb-hi-ada
installcheck-polyorb-hi-ada: all-polyorb-hi-ada
	r_dir='polyorb-hi-ada'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) installcheck

maybe-installcheck-polyorb-hi-c:
@PO_HI_C_TRUE@maybe-installcheck-polyorb-hi-c: installcheck-polyorb-hi-c
installcheck-polyorb-hi-c: all-polyorb-hi-c
	r_dir='polyorb-hi-c'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) installcheck

################################################################################

yoogx's avatar
yoogx committed
161 162 163 164 165 166 167
maybe-uninstall-aadlib:
@AADLIB_TRUE@maybe-uninstall-aadlib: uninstall-aadlib
uninstall-aadlib:
	r_dir='aadlib'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) DESTDIR="$(DESTDIR)" uninstall

168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
maybe-uninstall-polyorb-hi-ada:
@PO_HI_ADA_TRUE@maybe-uninstall-polyorb-hi-ada: uninstall-polyorb-hi-ada
uninstall-polyorb-hi-ada:
	r_dir='polyorb-hi-ada'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) DESTDIR="$(DESTDIR)" uninstall

maybe-uninstall-polyorb-hi-c:
@PO_HI_C_TRUE@maybe-uninstall-polyorb-hi-c: uninstall-polyorb-hi-c
uninstall-polyorb-hi-c:
	r_dir='polyorb-hi-c'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) DESTDIR="$(DESTDIR)" uninstall


################################################################################

yoogx's avatar
yoogx committed
185 186 187 188 189 190 191
maybe-clean-aadlib:
@AADLIB_TRUE@maybe-clean-aadlib: clean-aadlib
clean-aadlib:
	r_dir='aadlib'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) clean

192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
maybe-clean-polyorb-hi-ada:
@PO_HI_ADA_TRUE@maybe-clean-polyorb-hi-ada: clean-polyorb-hi-ada
clean-polyorb-hi-ada:
	r_dir='polyorb-hi-ada'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) clean

maybe-clean-polyorb-hi-c:
@PO_HI_C_TRUE@maybe-clean-polyorb-hi-c: clean-polyorb-hi-c
clean-polyorb-hi-c:
	r_dir='polyorb-hi-c'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) clean

################################################################################

yoogx's avatar
yoogx committed
208 209 210 211 212 213 214
maybe-distclean-aadlib:
@AADLIB_TRUE@maybe-distclean-aadlib: distclean-aadlib
distclean-aadlib:
	r_dir='aadlib'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) distclean

215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
maybe-distclean-polyorb-hi-ada:
@PO_HI_ADA_TRUE@maybe-distclean-polyorb-hi-ada: distclean-polyorb-hi-ada
distclean-polyorb-hi-ada:
	r_dir='polyorb-hi-ada'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) distclean

maybe-distclean-polyorb-hi-c:
@PO_HI_C_TRUE@maybe-distclean-polyorb-hi-c: distclean-polyorb-hi-c
distclean-polyorb-hi-c:
	r_dir='polyorb-hi-c'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) distclean

################################################################################

maybe-check-pok:
@POK_TRUE@maybe-check-pok: check-pok
check-pok: configure-pok
	r_dir='pok'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) tests

yoogx's avatar
yoogx committed
238 239 240 241 242 243 244
maybe-check-aadlib:
@AADLIB_TRUE@maybe-check-aadlib: check-aadlib
check-aadlib:
	r_dir='aadlib'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && PATH="$(DESTDIR)$(bindir):$$PATH" $(MAKE) check

245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
maybe-check-polyorb-hi-ada:
@PO_HI_ADA_TRUE@maybe-check-polyorb-hi-ada: check-polyorb-hi-ada
check-polyorb-hi-ada:
	r_dir='polyorb-hi-ada'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && PATH="$(DESTDIR)$(bindir):$$PATH" $(MAKE) check

maybe-check-polyorb-hi-c:
@PO_HI_C_TRUE@maybe-check-polyorb-hi-c: check-polyorb-hi-c
check-polyorb-hi-c:
	r_dir='polyorb-hi-c'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && PATH="$(DESTDIR)$(bindir):$$PATH" $(MAKE) check

################################################################################

yoogx's avatar
yoogx committed
261 262 263 264 265 266 267 268 269 270 271 272
maybe-dist-aadlib:
@AADLIB_TRUE@maybe-dist-aadlib: dist-aadlib
dist-aadlib: configure-aadlib
	r_dir='aadlib'; \
	d_dir='aadlib-dist'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) distdir "distdir=$${d_dir}" || exit 1; \
	cd .. && chmod -R go=u-w $${r_dir}/$${d_dir} || exit 1; \
	$(mkdir_p) $(distdir)/$${r_dir} || exit 1; \
	cp -pR $${r_dir}/$${d_dir}/* $(distdir)/$${r_dir}  || exit 1; \
	rm -rf $${r_dir}/$${d_dir}

273 274 275 276 277 278 279 280 281 282 283 284 285 286
maybe-dist-polyorb-hi-ada:
@PO_HI_ADA_TRUE@maybe-dist-polyorb-hi-ada: dist-polyorb-hi-ada
dist-polyorb-hi-ada: configure-polyorb-hi-ada
	r_dir='polyorb-hi-ada'; \
	d_dir='polyorb-hi-ada-dist'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) distdir "distdir=$${d_dir}" || exit 1; \
	cd .. && chmod -R go=u-w $${r_dir}/$${d_dir} || exit 1; \
	$(mkdir_p) $(distdir)/$${r_dir} || exit 1; \
	cp -pR $${r_dir}/$${d_dir}/* $(distdir)/$${r_dir}  || exit 1; \
	rm -rf $${r_dir}/$${d_dir}

maybe-dist-polyorb-hi-c:
@PO_HI_C_TRUE@maybe-dist-polyorb-hi-c: dist-polyorb-hi-c
287
dist-polyorb-hi-c: configure-polyorb-hi-c
288 289 290 291 292 293 294 295 296 297 298 299 300
	r_dir='polyorb-hi-c'; \
	d_dir='polyorb-hi-c-dist'; \
	test -f $${r_dir}/Makefile || exit 0; \
	cd $${r_dir} && $(MAKE) distdir "distdir=$${d_dir}" || exit 1; \
	cd .. && chmod -R go=u-w $${r_dir}/$${d_dir} || exit 1; \
	$(mkdir_p) $(distdir)/$${r_dir} || exit 1; \
	cp -pR $${r_dir}/$${d_dir}/* $(distdir)/$${r_dir}  || exit 1; \
	rm -rf $${r_dir}/$${d_dir}

################################################################################
# Soft dependenciy against runtimes

all-local: \
yoogx's avatar
yoogx committed
301
	maybe-all-aadlib \
302
	maybe-all-polyorb-hi-ada \
303
	maybe-all-polyorb-hi-c
304 305 306

dvi: \
	maybe-dvi-polyorb-hi-ada \
307
	maybe-dvi-polyorb-hi-c
308 309

install-data-local: \
yoogx's avatar
yoogx committed
310
	maybe-install-aadlib \
311
	maybe-install-polyorb-hi-ada \
312
	maybe-install-polyorb-hi-c
313 314

installcheck: \
yoogx's avatar
yoogx committed
315
	maybe-installcheck-aadlib \
316
	maybe-installcheck-polyorb-hi-ada \
317
	maybe-installcheck-polyorb-hi-c
318 319

uninstall-local: \
yoogx's avatar
yoogx committed
320
	maybe-uninstall-aadlib \
321
	maybe-uninstall-polyorb-hi-ada \
322
	maybe-uninstall-polyorb-hi-c
323 324

clean-local: \
yoogx's avatar
yoogx committed
325
	maybe-clean-aadlib \
326
	maybe-clean-polyorb-hi-ada \
327
	maybe-clean-polyorb-hi-c
328 329

distclean-local: \
yoogx's avatar
yoogx committed
330
	maybe-distclean-aadlib \
331
	maybe-distclean-polyorb-hi-ada \
332
	maybe-distclean-polyorb-hi-c
333 334 335

maybe-check-runtimes: \
	maybe-check-pok \
yoogx's avatar
yoogx committed
336
	maybe-check-aadlib \
337
	maybe-check-polyorb-hi-ada \
338
	maybe-check-polyorb-hi-c
339 340

dist-hook: \
yoogx's avatar
yoogx committed
341
	maybe-dist-aadlib \
342
	maybe-dist-polyorb-hi-ada \
yoogx's avatar
yoogx committed
343
	maybe-dist-polyorb-hi-c