| 1 |
pippijn |
1.1 |
# Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team |
| 2 |
|
|
# Copyright © 2005 Atheme Development Group. |
| 3 |
pippijn |
1.2 |
# Rights to this code are documented in doc/pod/license.pod. |
| 4 |
pippijn |
1.1 |
# |
| 5 |
|
|
# This file contains build instructions. |
| 6 |
|
|
# |
| 7 |
pippijn |
1.5 |
# $Id: Makefile.in,v 1.4 2007-07-21 13:23:18 pippijn Exp $ |
| 8 |
pippijn |
1.1 |
# |
| 9 |
|
|
|
| 10 |
|
|
RM = @RM@ |
| 11 |
|
|
SHELL = /bin/sh |
| 12 |
|
|
DISTNAME = @PACKAGE_NAME@-@PACKAGE_VERSION@ |
| 13 |
|
|
|
| 14 |
|
|
# Silent builds |
| 15 |
|
|
SILENT = @SILENT@ |
| 16 |
|
|
|
| 17 |
|
|
# Want absolute paths? |
| 18 |
|
|
SRCDIR = . |
| 19 |
|
|
@ABSPATHS@SRCDIR= @SRCDIR@/src |
| 20 |
|
|
|
| 21 |
pippijn |
1.5 |
SUBDIRS = modules src test |
| 22 |
pippijn |
1.1 |
CLEANDIRS = ${SUBDIRS} po |
| 23 |
|
|
|
| 24 |
|
|
.PHONY: dist test |
| 25 |
|
|
|
| 26 |
|
|
all: build |
| 27 |
|
|
|
| 28 |
pippijn |
1.5 |
MANIFEST: |
| 29 |
|
|
find . -type f | grep -v CVS | sed -e 's|^\./||' | grep -v "^contrib" > $@ |
| 30 |
pippijn |
1.4 |
|
| 31 |
pippijn |
1.1 |
include/sysconf.h: |
| 32 |
|
|
@echo "Hmm...doesn't look like you've run configure..." |
| 33 |
|
|
@echo "Doing so now." |
| 34 |
|
|
@sh configure |
| 35 |
|
|
|
| 36 |
|
|
.build.stamp: |
| 37 |
|
|
@${MAKE} ${SILENT} build |
| 38 |
|
|
@touch .build.stamp |
| 39 |
|
|
|
| 40 |
|
|
.depend.stamp: |
| 41 |
|
|
@${MAKE} ${SILENT} depend |
| 42 |
|
|
@touch .depend.stamp |
| 43 |
|
|
|
| 44 |
|
|
build: include/sysconf.h .depend.stamp |
| 45 |
|
|
@for i in $(SUBDIRS); do \ |
| 46 |
|
|
echo "[$@] ==> $$i"; \ |
| 47 |
|
|
${MAKE} ${SILENT} -C $$i build || exit; \ |
| 48 |
|
|
done |
| 49 |
|
|
|
| 50 |
pippijn |
1.3 |
test: .build.stamp |
| 51 |
pippijn |
1.1 |
@echo "[build] ==> src" |
| 52 |
|
|
@${MAKE} ${SILENT} -C src build |
| 53 |
|
|
@echo "[build] ==> test" |
| 54 |
|
|
@${MAKE} ${SILENT} -C $@ $@ |
| 55 |
|
|
|
| 56 |
pippijn |
1.3 |
clean: .depend.stamp |
| 57 |
pippijn |
1.1 |
@for i in $(CLEANDIRS); do \ |
| 58 |
|
|
echo "[$@] ==> $$i"; \ |
| 59 |
|
|
${MAKE} ${SILENT} -C $$i $@; \ |
| 60 |
|
|
done |
| 61 |
|
|
-@if [ -f include/sysconf.h ] ; then \ |
| 62 |
|
|
echo ">>> To really restart installation, make distclean"; \ |
| 63 |
|
|
fi |
| 64 |
|
|
@${RM} -f *~ core atheme.core .build.stamp |
| 65 |
|
|
|
| 66 |
pippijn |
1.3 |
distclean: .depend.stamp |
| 67 |
pippijn |
1.1 |
@cd include; \ |
| 68 |
|
|
${RM} -f sysconf.h *~ *.orig; \ |
| 69 |
|
|
cd .. |
| 70 |
|
|
@for i in $(CLEANDIRS); do \ |
| 71 |
|
|
echo "[$@] ==> $$i"; \ |
| 72 |
|
|
${MAKE} ${SILENT} -C $$i $@; \ |
| 73 |
|
|
done |
| 74 |
|
|
@${RM} -f Makefile *~ *.orig core atheme.core .depend.stamp svs-dist.tgz |
| 75 |
|
|
@${RM} -f config.status config.cache config.log |
| 76 |
|
|
|
| 77 |
pippijn |
1.3 |
maintainer-clean: .depend.stamp |
| 78 |
pippijn |
1.1 |
@${RM} -rf autom4te.cache |
| 79 |
|
|
@${RM} -f configure aclocal.m4 |
| 80 |
pippijn |
1.3 |
@cd include; \ |
| 81 |
|
|
${RM} -f common/callback.h sysconf.h.in sysconf.h *~ *.orig; \ |
| 82 |
|
|
cd .. |
| 83 |
pippijn |
1.1 |
@for i in $(CLEANDIRS); do \ |
| 84 |
|
|
echo "[$@] ==> $$i"; \ |
| 85 |
|
|
${MAKE} ${SILENT} -C $$i $@; \ |
| 86 |
|
|
done |
| 87 |
pippijn |
1.3 |
@${RM} -f Makefile *~ *.orig core atheme.core .depend.stamp svs-dist.tgz |
| 88 |
|
|
@${RM} -f config.status config.cache config.log |
| 89 |
pippijn |
1.1 |
|
| 90 |
|
|
depend: |
| 91 |
|
|
@for i in $(SUBDIRS); do \ |
| 92 |
|
|
echo "[$@] ==> $$i"; \ |
| 93 |
|
|
touch $$i/.depend; \ |
| 94 |
|
|
${MAKE} ${SILENT} -C $$i $@; \ |
| 95 |
|
|
done |
| 96 |
|
|
|
| 97 |
|
|
install: .build.stamp |
| 98 |
|
|
@for i in $(SUBDIRS); do \ |
| 99 |
|
|
echo "[$@] ==> $$i"; \ |
| 100 |
|
|
${MAKE} ${SILENT} -C $$i install; \ |
| 101 |
|
|
done |
| 102 |
|
|
|
| 103 |
pippijn |
1.4 |
dist: MANIFEST |
| 104 |
pippijn |
1.1 |
@tar zcf svs-dist.tar.gz $$(cat MANIFEST) |
| 105 |
|
|
@mkdir ${DISTNAME} |
| 106 |
|
|
@tar zxf svs-dist.tar.gz -C ${DISTNAME} |
| 107 |
|
|
@${RM} -f svs-dist.tar.gz |
| 108 |
|
|
@tar zcf ${DISTNAME}.tar.gz ${DISTNAME} |
| 109 |
|
|
@${RM} -rf ${DISTNAME} |
| 110 |
|
|
|
| 111 |
|
|
upload: dist |
| 112 |
pippijn |
1.5 |
@scp ${DISTNAME}.tar.gz ruth:ermyth.schmorp.de/dist/ |
| 113 |
pippijn |
1.4 |
@${RM} -f ${DISTNAME}.tar.gz |
| 114 |
pippijn |
1.1 |
|
| 115 |
|
|
rz-test: dist |
| 116 |
|
|
@scp ${DISTNAME}.tar.gz rzstud:code/ |
| 117 |
|
|
@ssh rzstud "cd code && tar zxpf ${DISTNAME}.tar.gz && rm ${DISTNAME}.tar.gz" |
| 118 |
pippijn |
1.4 |
@${RM} -f ${DISTNAME}.tar.gz |