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
|
############################ -*- Mode: Makefile -*- ###########################
## local.mk ---
## Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com )
## Created On : Sat Nov 15 10:42:10 2003
## Created On Node : glaurung.green-gryphon.com
## Last Modified By : Manoj Srivastava
## Last Modified On : Sat Mar 13 12:04:24 2004
## Last Machine Used: glaurung.internal.golden-gryphon.com
## Update Count : 40
## Status : Unknown, Use with caution!
## HISTORY :
## Description :
##
## arch-tag: b07b1015-30ba-4b46-915f-78c776a808f4
##
###############################################################################
testdir:
$(testdir)
CONFIG-common:: stamp-conf/flex
BUILD/flex:: build/flex
INST/flex:: install/flex
BIN/flex:: binary/flex
BUILD/flex-doc:: build/flex-doc
INST/flex-doc:: install/flex-doc
BIN/flex-doc:: binary/flex-doc
CLN-common::
$(REASON)
$(MAKE) clean -C po || true
CLEAN/flex::
-rm -rf $(TMPTOP)
$(CREATE_COMPATIBLE_TEMPLATE)
CLEAN/flex-doc::
-rm -rf $(TMPTOP)
stamp-conf/flex:
$(checkdir)
$(REASON)
if ! which flex >/dev/null 2>&1; then \
if [ scan.l -nt scan.c ] && [ -e debian/scan.l.md5sum ] && \
[ "`md5sum scan.l`" = "`cat debian/scan.l.md5sum`" ]; then \
touch scan.c; \
fi; \
fi
test -f stamp-conf || \
ac_cv_lib_util_getloadavg=no ./configure --verbose \
--prefix=$(PREFIX) $(confflags) && touch stamp-conf
STAMPS_TO_CLEAN += stamp-conf
build/flex:
$(checkdir)
$(REASON)
bash -n debian/doc.postinst
bash -n debian/doc.postrm
bash -n debian/doc.prerm
bash -n debian/postinst
bash -n debian/prerm
bash -n debian/preinst
bash -n debian/postrm
bash -n debian/config
test -f stamp-build-flex || $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
test -f stamp-build-flex || $(MAKE) -C po
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
test -f stamp-build-flex || $(MAKE) check
endif
touch stamp-build-flex
STAMPS_TO_CLEAN += stamp-build-flex
build/flex-doc:
$(checkdir)
$(REASON)
test -d debian/html || mkdir debian/html
(cd debian/html; \
texi2html -doctype html2 -expandinfo -glossary -menu \
-split_chapter -verbose \
../../doc/flex.texi)
touch stamp-build-flex-doc
STAMPS_TO_CLEAN += stamp-build-flex-doc
install/flex-doc: testroot
$(checkdir)
$(REASON)
rm -rf $(TMPTOP)
$(make_directory) $(TMPTOP)
$(make_directory) $(DOCDIR)
$(make_directory) $(DOCBASEDIR)
$(install_file) README $(DOCDIR)/README
$(install_file) NEWS $(DOCDIR)/NEWS
$(install_file) debian/changelog $(DOCDIR)/changelog.Debian
gzip -9fqr $(DOCDIR)/
# Make sure the copyright file is not compressed
$(install_file) debian/copyright $(DOCDIR)/copyright
$(install_file) debian/html/flex*.html $(DOCDIR)/
ln -s flex_toc.html $(DOCDIR)/index.html;
ln -s NEWS.gz $(DOCDIR)/changelog.gz
$(install_file) debian/docentry $(DOCBASEDIR)/$(package)
install/flex: testroot
$(checkdir)
$(REASON)
rm -rf $(TMPTOP)
$(make_directory) $(TMPTOP)
$(make_directory) $(BINDIR)
$(make_directory) $(LIBDIR)
$(make_directory) $(INFODIR)
$(make_directory) $(MAN1DIR)
$(make_directory) $(DOCDIR)
$(make_directory) $(LINTIANDIR)
echo 'flex: description-synopsis-might-not-be-phrased-properly'>> \
$(LINTIANDIR)/$(package)
echo 'flex: missing-debconf-dependency-for-preinst'>> \
$(LINTIANDIR)/$(package)
$(MAKE) $(INT_INSTALL_TARGET) prefix=$(TMPTOP)/usr \
infodir=$(INFODIR) mandir=$(MANDIR) \
INSTALL_PROGRAM="$(install_program)"
$(MAKE) install -C po prefix=$(TMPTOP)/usr
#(cd doc && makeinfo --no-split flex.texi;)
$(install_file) doc/flex.info $(INFODIR)
-$(install_file) doc/flex.info-* $(INFODIR)
-test -e $(INFODIR)/dir && rm -f $(INFODIR)/dir
-test -e $(INFODIR)/dir.old && rm -f $(INFODIR)/dir.old
$(install_file) README $(DOCDIR)/README
$(install_file) debian/NEWS.Debian $(DOCDIR)/NEWS.Debian
$(install_file) NEWS $(DOCDIR)/NEWS
$(install_file) debian/changelog $(DOCDIR)/changelog.Debian
gzip -9frq $(DOCDIR)/
# Make sure the copyright file is not compressed
$(install_file) debian/copyright $(DOCDIR)/copyright
gzip -9fqr $(MANDIR)/
gzip -9fq $(INFODIR)/flex.info*
-test -e $(INFODIR)/dir && rm -f $(INFODIR)/dir
-test -e $(INFODIR)/dir.old && rm -f $(INFODIR)/dir.old
if [ ! -e debian/scan.l.md5sum ] || \
[ "`md5sum scan.l`" != "`cat debian/scan.l.md5sum`" ]; then \
md5sum scan.l > debian/scan.l.md5sum; \
fi
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
find $(TMPTOP) -type f | while read i; do \
if file -b $$i | egrep -q "^ELF.*executable"; then \
strip --strip-all --remove-section=.comment --remove-section=.note $$i; \
fi; \
done
find $(TMPTOP) -type f | while read i; do \
if file -b $$i | egrep -q "^ELF.*shared object"; then \
strip --strip-unneeded --remove-section=.comment --remove-section=.note $$i; \
fi; \
done
endif
ln -s NEWS.gz $(DOCDIR)/changelog.gz
ln -s flex.1.gz $(MAN1DIR)/lex.1.gz
ln -s flex.1.gz $(MAN1DIR)/flex++.1.gz
ln -s flex $(BINDIR)/lex
ln -s libfl.a $(LIBDIR)/libl.a
binary/flex-doc: testroot
$(checkdir)
$(REASON)
$(make_directory) $(TMPTOP)/DEBIAN
$(install_script) debian/doc.postinst $(TMPTOP)/DEBIAN/postinst
$(install_script) debian/doc.postrm $(TMPTOP)/DEBIAN/postrm
$(install_script) debian/doc.prerm $(TMPTOP)/DEBIAN/prerm
dpkg-gencontrol -p$(package) -isp -P$(TMPTOP)
chown -R root:root $(TMPTOP)
chmod -R u+w,go=rX $(TMPTOP)
dpkg --build $(TMPTOP) ..
binary/flex: testroot
$(checkdir)
$(REASON)
$(make_directory) $(TMPTOP)/DEBIAN
$(install_script) debian/preinst $(TMPTOP)/DEBIAN/preinst
$(install_script) debian/postinst $(TMPTOP)/DEBIAN/postinst
$(install_script) debian/prerm $(TMPTOP)/DEBIAN/prerm
$(install_script) debian/postrm $(TMPTOP)/DEBIAN/postrm
$(install_script) debian/config $(TMPTOP)/DEBIAN/config
$(INSTALL_TEMPLATE)
$(install_file) debian/templates $(TMPTOP)/DEBIAN/templates
dpkg-shlibdeps $(BINDIR)/flex
dpkg-gencontrol -V'debconf-depends=debconf (>= $(MINDEBCONFVER))' \
-p$(package) -isp -P$(TMPTOP)
chown -R root:root $(TMPTOP)
chmod -R u+w,go=rX $(TMPTOP)
dpkg --build $(TMPTOP) ..
|