Makefile revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye/*
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye * NOTE: this provides ast enhanced versions of INIT executables
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye */
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye:PACKAGE: ast
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
38115c792a2142d264ca2617b11962301f079c0aTrond NorbyeLICENSE = since=1990,author=gsf
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye.SOURCE.c : ../INIT ../../lib/libpp
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
38115c792a2142d264ca2617b11962301f079c0aTrond Norbyeproto :: RELEASE PROMO.mm proto.c
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
38115c792a2142d264ca2617b11962301f079c0aTrond Norbyemamake :: mamake.c LICENSE=since=1999,author=gsf
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
38115c792a2142d264ca2617b11962301f079c0aTrond Norbyeratz :: ratz.c
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
38115c792a2142d264ca2617b11962301f079c0aTrond Norbyerelease :: release.c LICENSE=since=1999,author=gsf
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
38115c792a2142d264ca2617b11962301f079c0aTrond Norbyesear :: sear.sh LICENSE=since=2001,author=dgk+gsf
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
fcb68bae47907ba23c545e379c81c3ee6e19f778Lubos Koscochanges :: changes.sh LICENSE=since=2005,author=gsf
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye$(LIBDIR)/sear :INSTALLDIR: ratz.c sear.ico sear32.ico sear64.ico
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco:TEST: proto
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco/*
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye * ../INIT/proto.c is snarfed from the standalone src
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye * this is a gross hack to allow only one copy of the source
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye */
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
38115c792a2142d264ca2617b11962301f079c0aTrond Norbyeif ! "$(-mam)"
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye../INIT/proto.c :INSTALL: .SCAN.NULL proto.c
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye if grep '^#pragma prototyped' $(*) >/dev/null 2>/dev/null
5e0ccd8bb84a766f65680b4cc1e43b356d1d78b8Trond Norbye then {
b6e48c95305391ca75f99817def61159230969faTrond Norbye echo "#define __PROTO__(x) x"
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye echo "#define __MANGLE__"
cd1fe74964370b3f6b4ae79635fd1074f7a94d3dSven-Kristofer Pilz $(SED) \
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye -e '/\/\*DELAY_CONTROL\*\//,/\/\*NODELAY_CONTROL\*\//s/^#/DELAY_CONTROL /' \
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye -e '/\/\*DELAY_CONTROL\*\//s/^/#define DELAY_CONTROL # \
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye #undef __STDC__/' \
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye -e '/\/\*NODELAY_CONTROL\*\//s/^/#undef DELAY_CONTROL /' \
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye $(*)
cd1fe74964370b3f6b4ae79635fd1074f7a94d3dSven-Kristofer Pilz } > a.$(tmp).c
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco $(CPP) $(CPPFLAGS) -I$(INSTALLROOT)/include/ast -DPROTO_STANDALONE -D-F$(*) -D-L -I-D -E a.$(tmp).c |
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye $(SED) -e 's%".*/src/cmd/proto/%"%' -e 's%".*/src/cmd/%"../%' -e 's%".*/src/lib/%"../../lib/%' |
760369283613b2d5c2449cdc5b7a74e16d929750Trond Norbye $(PROTO) $(PROTOFLAGS:N!=-s) -f > b.$(tmp).c
9f5a7adefcd3e07345b92f0deb1ed1c30df6eec2Trond Norbye if test '' != '$(<:P=L*:O=N)' && $(CMP) -s b.$(tmp).c $(<:P=L*:O=N)
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco then : no changes for $(<) :
eb32a77fdb57f20c042b7b79b28a4fb4060cb949Lubos Kosco elif $(CC) -o b.$(tmp).x b.$(tmp).c
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye then $(CP) b.$(tmp).c $(<)
9f5a7adefcd3e07345b92f0deb1ed1c30df6eec2Trond Norbye else : retain original $(<) :
a90c307564052f582357f820eadec4390e6a86c6Trond Norbye fi
760369283613b2d5c2449cdc5b7a74e16d929750Trond Norbye $(RM) -f ?.$(tmp).?
cd1fe74964370b3f6b4ae79635fd1074f7a94d3dSven-Kristofer Pilz fi
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye
38115c792a2142d264ca2617b11962301f079c0aTrond Norbyeend
38115c792a2142d264ca2617b11962301f079c0aTrond Norbye