Commit 88819c87 authored by Pekka Pessi's avatar Pekka Pessi

sofia.am, Makefile.am: fixed source generation with pmake

The % constructions and $< do not work with pmake (used on BSDs).

darcs-hash:20070228170315-55b16-ac51e4b5293462fc4f9891068995d7067f0b5682.gz
parent 175d0cd4
......@@ -69,26 +69,23 @@ include $(top_srcdir)/rules/sofia.am
TAG_DLL_FLAGS = DLLREF=1
MSG_PARSER_AWK = $(srcdir)/../msg/msg_parser.awk
MSG_PARSER_AWK = ${srcdir}/../msg/msg_parser.awk
AWK_HTTP_AWK = $(AWK) -f $(MSG_PARSER_AWK) module=http
AWK_HTTP_AWK = ${AWK} -f ${MSG_PARSER_AWK} module=http
sofia-sip/http_tag.h: sofia-sip/http_tag.h.in $(MSG_PARSER_AWK)
sofia-sip/http_protos.h: sofia-sip/http_protos.h.in $(MSG_PARSER_AWK)
http_tag.c: http_tag.c.in $(MSG_PARSER_AWK)
http_parser_table.c: http_parser_table.c.in $(MSG_PARSER_AWK)
SS_HTTP_H = ${srcdir}/sofia-sip/http.h
sofia-sip/http_protos.h: sofia-sip/http.h
sofia-sip/http_protos.h: ${SS_HTTP_H} ${srcdir}/$@.in ${MSG_PARSER_AWK}
@-mkdir sofia-sip 2>/dev/null || true
$(AWK_HTTP_AWK) PR=$@ TEMPLATE=$(srcdir)/sofia-sip/http_protos.h.in $<
${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_HTTP_H}
sofia-sip/http_tag.h: sofia-sip/http.h
sofia-sip/http_tag.h: ${SS_HTTP_H} ${srcdir}/$@.in ${MSG_PARSER_AWK}
@-mkdir sofia-sip 2>/dev/null || true
$(AWK_HTTP_AWK) PR=$@ TEMPLATE=$(srcdir)/sofia-sip/http_tag.h.in $<
${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_HTTP_H}
http_tag.c: sofia-sip/http.h
$(AWK_HTTP_AWK) PR=$@ TEMPLATE=$(srcdir)/http_tag.c.in $<
http_tag.c: ${SS_HTTP_H} ${srcdir}/$@.in ${MSG_PARSER_AWK}
${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_HTTP_H}
http_parser_table.c: sofia-sip/http.h
$(AWK_HTTP_AWK) PT=$@ TEMPLATE=$(srcdir)/http_parser_table.c.in \
MC_HASH_SIZE=127 $<
http_parser_table.c: ${SS_HTTP_H} ${srcdir}/$@.in ${MSG_PARSER_AWK}
${AWK_HTTP_AWK} PT=$@ TEMPLATE=${srcdir}/$@.in \
MC_HASH_SIZE=127 ${SS_HTTP_H}
......@@ -93,26 +93,30 @@ msg_mime_table.c: msg_mime_table.c.in $(MSG_PARSER_AWK)
sofia-sip/msg_mime_protos.h sofia-sip/msg_protos.h: $(MSG_PARSER_AWK)
test_protos.h: test_class.h
TEST_CLASS_H = ${srcdir}/test_class.h
test_protos.h: ${TEST_CLASS_H}
$(AWK_MSG_AWK) module=msg_test NO_MIDDLE=1 NO_LAST=1 \
PR=$@ TEMPLATE=$(srcdir)/test_protos.h.in $<
PR=$@ TEMPLATE=$(srcdir)/$@.in ${TEST_CLASS_H}
test_table.c: test_class.h
test_table.c: ${TEST_CLASS_H}
$(AWK_MSG_AWK) module=msg_test prefix=msg \
MC_HASH_SIZE=127 multipart=msg_multipart \
PT=$@ TEMPLATE=$(srcdir)/test_table.c.in $<
PT=$@ TEMPLATE=$(srcdir)/$@.in ${TEST_CLASS_H}
SS_MIME_H = ${srcdir}/sofia-sip/msg_mime.h
sofia-sip/msg_protos.h: sofia-sip/msg_mime.h
sofia-sip/msg_protos.h: ${SS_MIME_H}
@-mkdir sofia-sip 2>/dev/null || true
$(AWK_MSG_AWK) module=msg NO_FIRST=1 NO_MIDDLE=1 \
PR=$@ TEMPLATE=$(srcdir)/sofia-sip/msg_protos.h.in $<
PR=$@ TEMPLATE=$(srcdir)/$@.in ${SS_MIME_H}
sofia-sip/msg_mime_protos.h: sofia-sip/msg_mime.h
sofia-sip/msg_mime_protos.h: ${SS_MIME_H}
@-mkdir sofia-sip 2>/dev/null || true
$(AWK_MSG_AWK) module=msg NO_FIRST=1 NO_LAST=1 \
PR=$@ TEMPLATE=$(srcdir)/sofia-sip/msg_mime_protos.h.in $<
PR=$@ TEMPLATE=$(srcdir)/$@.in ${SS_MIME_H}
msg_mime_table.c: sofia-sip/msg_mime.h
msg_mime_table.c: ${SS_MIME_H}
$(AWK_MSG_AWK) module=msg_multipart \
tprefix=msg prefix=mp MC_HASH_SIZE=127 \
PT=$@ TEMPLATE=$(srcdir)/msg_mime_table.c.in $<
PT=$@ TEMPLATE=$(srcdir)/$@.in ${SS_MIME_H}
......@@ -116,40 +116,40 @@ sofia-sip/sip_hclasses.h: sofia-sip/sip_hclasses.h.in
sofia-sip/sip_protos.h: sofia-sip/sip_protos.h.in
sofia-sip/sip_tag.h: sofia-sip/sip_tag.h.in
$(GENERATED_H): $(MSG_PARSER_AWK)
${GENERATED_H}: ${MSG_PARSER_AWK}
sip_parser_table.c: sip_parser_table.c.in $(MSG_PARSER_AWK)
sip_tag.c: sip_tag.c.in $(MSG_PARSER_AWK)
sip_parser_table.c: sip_parser_table.c.in ${MSG_PARSER_AWK}
sip_tag.c: sip_tag.c.in ${MSG_PARSER_AWK}
EXTRA = $(srcdir)/sip_extra_headers.txt
SS_SIP_H = ${srcdir}/sofia-sip/sip.h
EXTRA = ${srcdir}/sip_extra_headers.txt
sofia-sip/sip_hclasses.h: sofia-sip/sip.h
sofia-sip/sip_hclasses.h: ${SS_SIP_H} ${srcdir}/$@.in
@-mkdir sofia-sip 2>/dev/null || true
$(AWK_SIP_AWK) PR=$@ TEMPLATE=$(srcdir)/sofia-sip/sip_hclasses.h.in $<
${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_SIP_H}
sofia-sip/sip_protos.h: sofia-sip/sip.h
sofia-sip/sip_protos.h: ${SS_SIP_H}
@-mkdir sofia-sip 2>/dev/null || true
$(AWK_SIP_AWK) PR=$@ TEMPLATE=$(srcdir)/sofia-sip/sip_protos.h.in $<
${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_SIP_H}
sofia-sip/sip_tag.h: sofia-sip/sip.h
sofia-sip/sip_tag.h: ${SS_SIP_H}
@-mkdir sofia-sip 2>/dev/null || true
$(AWK_SIP_AWK) PR=$@ TEMPLATE=$(srcdir)/sofia-sip/sip_tag.h.in $<
${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_SIP_H}
sip_tag.c: sofia-sip/sip.h sip_extra_headers.txt
$(AWK_SIP_AWK) PR=$@ TEMPLATE=$(srcdir)/sip_tag.c.in $< $(EXTRA)
sip_tag.c: ${SS_SIP_H} ${EXTRA}
${AWK_SIP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_SIP_H} ${EXTRA}
sip_parser_table.c: sip_extra_headers.txt
sip_parser_table.c: ${SS_SIP_H} ${EXTRA}
${AWK_SIP_AWK} PT=$@ TEMPLATE=${srcdir}/$@.in \
FLAGFILE=${srcdir}/sip_bad_mask \
MC_HASH_SIZE=127 MC_SHORT_SIZE=26 \
${SS_SIP_H} ${EXTRA}
sip_parser_table.c: sofia-sip/sip.h
$(AWK_SIP_AWK) PT=$@ TEMPLATE=$(srcdir)/sip_parser_table.c.in \
FLAGFILE=$(srcdir)/sip_bad_mask \
MC_HASH_SIZE=127 MC_SHORT_SIZE=26 $< $(EXTRA)
sofia-sip/sip_extra.h: sofia-sip/sip_extra.h.in sip_extra_headers.txt
sofia-sip/sip_extra.h: ${srcdir}/$@.in ${EXTRA}
@-mkdir -p sofia-sip 2>/dev/null
${AWK_SIP_AWK} PR=$@ NO_FIRST=1 NO_LAST=1 \
PACKAGE_NAME="${PACKAGE_NAME}" \
PACKAGE_VERSION="${PACKAGE_VERSION}" \
TEMPLATE1=${srcdir}/sofia-sip/sip_hclasses.h.in \
TEMPLATE2=${srcdir}/sofia-sip/sip_protos.h.in \
TEMPLATE=$< $(EXTRA)
TEMPLATE=${srcdir}/$@.in ${EXTRA}
......@@ -46,11 +46,18 @@ HEADER {
fn = FILENAME;
}
DLL = fn;
sub(/[.]c(at)?/, "_dll.c", DLL);
if (REF == "") {
REF = fn;
sub(/[.]c(at)?/, "_ref.c", REF);
}
if (NODLL) DLL = "/dev/null";
if (DLL == "") {
DLL = fn;
sub(/[.]c(at)?/, "_dll.c", DLL);
}
base = fn;
sub(/.*\//, "", base);
......@@ -73,9 +80,6 @@ HEADER {
"#include <sofia-sip/su_tag_class.h>\n\n" > DLL;
}
REF = fn;
sub(/[.]c(at)?/, "_ref.c", REF);
printf("/*\n" \
" * PLEASE NOTE: \n" \
" * \n" \
......
......@@ -21,8 +21,10 @@ TAG_AWK=$(top_srcdir)/libsofia-sip-ua/su/tag_dll.awk
*_tag_ref.c: $(TAG_AWK)
%_tag_ref.c: %_tag.c
$(AWK) -f $(TAG_AWK) NODLL=1 $(TAG_DLL_FLAGS) $<
SUFFIXES = _tag_ref.c _tag.c
_tag.c_tag_ref.c:
$(AWK) -f $(TAG_AWK) NODLL=1 $(TAG_DLL_FLAGS) REF=$@ $<
if ENABLE_COVERAGE
coverage:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment