X-Git-Url: http://git.tuebingen.mpg.de/?p=lopsub.git;a=blobdiff_plain;f=Makefile;h=c0057a38b89119897044caa0a1eaa705877989ca;hp=4fbc36b0d723b704ccbf1a1e4dd72fed2b201513;hb=7623e601612eb36cf86511b40fef3f5a20e8b834;hpb=76e953dde7347553b405863201dfb7859674206c diff --git a/Makefile b/Makefile index 4fbc36b..c0057a3 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,15 @@ INSTALL := install GZIP := gzip -fn9 ZCAT := zcat +dummy != $(M4) /dev/null || printf 'failed' +ifeq ($(dummy), failed) +$(error m4 is required to build this package) +endif +dummy != printf '%%%%\n' | $(LEX) -o /dev/null || printf 'failed' +ifeq ($(dummy), failed) +$(error (f)lex is required to build this package) +endif + DATE_FMT := +%B %Y # To get a reproducible build, we use $(SOURCE_DATE_EPOCH) instead of the # current time if this variable is set. @@ -83,7 +92,7 @@ $(lsg_objs) $(liblopsub_objs) $(lopsubex_objs): %.o: %.c lopsubgen.o config_file.o: $(CC) -g -c -fPIC -o $@ ${@:.o=.c} lsg1.o: lsg.c lsg.h - $(CC) -g -DSTAGE1 -Wall -g -c $< -o $@ + $(CC) -g -DSTAGE1 -Wall -c $< -o $@ %.o: %.c $(CC) -Wall -I. -g -c -fPIC -o $@ $< @@ -100,16 +109,13 @@ lopsubex: $(lopsubex_objs) $(REALNAME) # web html := $(addprefix web/, $(addsuffix .html, \ index lopsub-api lopsubgen.1 lopsubex.1 $(m4_man_pages:.gz=))) -$(html): $(addprefix web/, $(addsuffix .html, header footer)) - www: $(html) - -web/lopsub-api.html: lopsub.h.m4 +web/lopsub-api.html: lopsub.h.m4 web/header.html web/footer.html $(M4) -DOUTPUT_MODE=HTML web/header.html $(gendoc) \ $< web/footer.html > $@ web/index.html: web/lopsub.7.html $(LN) -s $(notdir $<) $@ -web/%.html: %.gz +web/%.html: %.gz web/header.html $(CP) web/header.html $@ $(ZCAT) $< | $(GROFF) -m man -Thtml | sed -e '1,/^/d' >> $@