Fixes with awk and upper case
This commit is contained in:
parent
03f9884458
commit
4ee5af1e2e
@ -47,7 +47,7 @@ ${DIR_LIST}:
|
|||||||
|
|
||||||
-include ${DEPENDENCE_LIST}
|
-include ${DEPENDENCE_LIST}
|
||||||
|
|
||||||
${TG_OBJECTS} ${TGL_OBJECTS}: auto/constants.h
|
${TG_OBJECTS} ${TGL_OBJECTS}: ${AUTO}/constants.h
|
||||||
|
|
||||||
${TG_OBJECTS}: ${OBJ}/%.o: %.c | create_dirs_and_headers
|
${TG_OBJECTS}: ${OBJ}/%.o: %.c | create_dirs_and_headers
|
||||||
${CC} ${INCLUDE} ${COMPILE_FLAGS} -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
|
${CC} ${INCLUDE} ${COMPILE_FLAGS} -c -MP -MD -MF ${DEP}/$*.d -MQ ${OBJ}/$*.o -o $@ $<
|
||||||
@ -68,7 +68,6 @@ ${EXE}/generate: ${GENERATE_OBJECTS} ${COMMON_OBJECTS}
|
|||||||
${CC} ${GENERATE_OBJECTS} ${COMMON_OBJECTS} ${LINK_FLAGS} -o $@
|
${CC} ${GENERATE_OBJECTS} ${COMMON_OBJECTS} ${LINK_FLAGS} -o $@
|
||||||
|
|
||||||
${AUTO}/scheme.tlo: ${AUTO}/scheme.tl ${EXE}/tlc
|
${AUTO}/scheme.tlo: ${AUTO}/scheme.tl ${EXE}/tlc
|
||||||
|
|
||||||
${EXE}/tlc -e $@ ${AUTO}/scheme.tl
|
${EXE}/tlc -e $@ ${AUTO}/scheme.tl
|
||||||
|
|
||||||
${AUTO}/scheme.tl: ${srcdir}/scheme.tl ${srcdir}/binlog.tl ${srcdir}/append.tl
|
${AUTO}/scheme.tl: ${srcdir}/scheme.tl ${srcdir}/binlog.tl ${srcdir}/append.tl
|
||||||
@ -83,8 +82,8 @@ ${AUTO}/auto.c: ${AUTO}/scheme.tlo ${EXE}/generate
|
|||||||
${AUTO}/auto-header.h: ${AUTO}/scheme.tlo ${EXE}/generate
|
${AUTO}/auto-header.h: ${AUTO}/scheme.tlo ${EXE}/generate
|
||||||
${EXE}/generate -H ${AUTO}/scheme.tlo > $@
|
${EXE}/generate -H ${AUTO}/scheme.tlo > $@
|
||||||
|
|
||||||
${AUTO}/constants.h: ${AUTO}/scheme2.tl
|
${AUTO}/constants.h: ${AUTO}/scheme2.tl ${srcdir}/gen_constants_h.awk
|
||||||
awk -f ${srcdir}/gen_constants_h.awk < $^ > $@
|
awk -f ${srcdir}/gen_constants_h.awk < $< > $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf ${DIR_LIST} config.log config.status > /dev/null || echo "all clean"
|
rm -rf ${DIR_LIST} config.log config.status > /dev/null || echo "all clean"
|
||||||
|
@ -22,7 +22,7 @@ BEGIN {
|
|||||||
}
|
}
|
||||||
// {
|
// {
|
||||||
if (split ($1, a, "#") == 2) {
|
if (split ($1, a, "#") == 2) {
|
||||||
gsub (/[[:upper:]]/, "_&", a[1]);
|
gsub (/[ABCDEFGHIJKLMNOPQRSTUVWXYZ]/, "_&", a[1]);
|
||||||
gsub (/[.]/, "_", a[1]);
|
gsub (/[.]/, "_", a[1]);
|
||||||
if (a[2] in h) {
|
if (a[2] in h) {
|
||||||
print "ERROR: Duplicate magic " a[2] " for define " a[1] " and " h[a[2]] >"/dev/stderr/"
|
print "ERROR: Duplicate magic " a[2] " for define " a[1] " and " h[a[2]] >"/dev/stderr/"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user