diff options
-rwxr-xr-x | move.sh | 4 | ||||
-rw-r--r-- | src/libbasic/Makefile | 14 |
2 files changed, 9 insertions, 9 deletions
@@ -140,7 +140,7 @@ fixup_includes() ( fixup_makefile() { sed -r \ - -e '/^[^#]*:/ { s|^(\s*)\S+/|\1$(outdir)/| }' \ + -e '/^[^# ]*:/ { s|^(\s*)\S+/|\1$(outdir)/| }' \ -e 's|^if (.*)|ifneq ($(\1),)|' } @@ -149,7 +149,7 @@ fixup_makefiles() ( -e '/^ \$\(AM_V_at\)\$\(MKDIR_P\) \$\(dir \$@\)/d' \ -e 's/ \$\(CFLAGS\) / /g' \ -e 's/ \$\(CPPFLAGS\) / /g' \ - -e '/^[^#]*:/ { s|\S+/|$(outdir)/| }' \ + -e '/^[^# ]*:/ { s|\S+/|$(outdir)/|g }' \ src/libbasic/Makefile ) diff --git a/src/libbasic/Makefile b/src/libbasic/Makefile index f93f8607ea..a5884de6e1 100644 --- a/src/libbasic/Makefile +++ b/src/libbasic/Makefile @@ -244,37 +244,37 @@ libbasic_la_LIBADD = \ $(outdir)/errno-list.txt: $(AM_V_GEN)$(CPP) $(AM_CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@ -$(outdir)/errno-to-name.h: src/basic/errno-list.txt +$(outdir)/errno-to-name.h: $(outdir)/errno-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@ $(outdir)/af-list.txt: $(AM_V_GEN)$(CPP) $(AM_CPPFLAGS) -dM -include sys/socket.h - </dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' >$@ -$(outdir)/af-to-name.h: src/basic/af-list.txt +$(outdir)/af-to-name.h: $(outdir)/af-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@ $(outdir)/arphrd-list.txt: $(AM_V_GEN)$(CPP) $(AM_CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@ -$(outdir)/arphrd-to-name.h: src/basic/arphrd-list.txt +$(outdir)/arphrd-to-name.h: $(outdir)/arphrd-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@ -$(outdir)/arphrd-from-name.gperf: src/basic/arphrd-list.txt +$(outdir)/arphrd-from-name.gperf: $(outdir)/arphrd-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@ $(outdir)/cap-list.txt: $(AM_V_GEN)$(CPP) $(AM_CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@ -$(outdir)/cap-to-name.h: src/basic/cap-list.txt +$(outdir)/cap-to-name.h: $(outdir)/cap-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@ -$(outdir)/cap-from-name.gperf: src/basic/cap-list.txt +$(outdir)/cap-from-name.gperf: $(outdir)/cap-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@ -$(outdir)/cap-from-name.h: src/basic/cap-from-name.gperf +$(outdir)/cap-from-name.h: $(outdir)/cap-from-name.gperf $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@ include $(topsrcdir)/build-aux/Makefile.tail.mk |