alfred: Don't fail rebuild when header is removed
PATCH 1/4 alfred: Don't fail rebuild when header is removed
The *.d depends files for make just list the files used when building an object file. Removing a file listed in such a dependency file causes make to search for a way to recreate it. This usually cannot work because these files aren't autogenerated.
The gcc option -MP can be used to generate empty rule for these files. Removing a file in a dependency list will then execute this empty rule and continue with the execution of the creation of the object file. This compilation process will then automatically correct the dependency file.
--- Makefile | 2 +- vis/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile +1 -1
@@ -23,7 +23,7 @@ BINARY_NAME = alfred OBJ = main.o server.o client.o netsock.o send.o recv.o hash.o unix_sock.o util.o debugfs.o batadv_query.o # alfred flags and options -CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD +CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP LDLIBS += -lrt # disable verbose output
vis/Makefile +1 -1
@@ -23,7 +23,7 @@ BINARY_NAME = vis OBJ = vis.o debugfs.o # alfred flags and options -CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD +CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP LDLIBS += -lrt # disable verbose output
Signature · 1 line
1.8.4.rc3
PATCH 2/4 alfred: Fix version number for git builds of vis
--- vis/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
vis/Makefile +1 -1
@@ -49,7 +49,7 @@ PREFIX = /usr/local SBINDIR = $(PREFIX)/sbin # try to generate revision -REVISION= $(shell if [ -d .git ]; then \ +REVISION= $(shell if [ -d ../.git ]; then \ echo $$(git describe --always --dirty --match "v*" |sed 's/^v//' 2> /dev/null || echo "[unknown]"); \ fi) ifneq ($(REVISION),)
Signature · 1 line
1.8.4.rc3
PATCH 3/4 alfred: Rename vis to batadv-vis
In reply to Sven EckelmannThe name vis is to ambiguous and already taken by the batmand vis server. Distributions like Gentoo or OpenWrt would have a conflict between these packages just because they share a common name. This makes the situation unnecessary complex.
A better name may also help an user to find this tool.
--- README | 27 ++++++++++++++------------- vis/Makefile | 6 +++--- vis/vis.c | 2 +- 3 files changed, 18 insertions(+), 17 deletions(-)
README +14 -13
@@ -33,13 +33,13 @@ To compile alfred, simply type: $ make -This will compile both alfred and vis. To install, use +This will compile both alfred and batadv-vis. To install, use $ make install (with the right privileges). -If you don't want to compile vis, add the directive CONFIG_ALFRED_VIS=n: +If you don't want to compile batadv-vis, add the directive CONFIG_ALFRED_VIS=n: $ make CONFIG_ALFRED_VIS=n $ make CONFIG_ALFRED_VIS=n install
@@ -113,22 +113,23 @@ machines (slaves send information to masters). Vis --- -Vis can be used to visualize your batman-adv mesh network. It read the neighbor -information and local client table and distributes this information via alfred -in the network. By gathering this local information, any vis node can get the -whole picture of the network. +batadv-vis can be used to visualize your batman-adv mesh network. It read the +neighbor information and local client table and distributes this information via +alfred in the network. By gathering this local information, any vis node can get +the whole picture of the network. -Vis, similar to to alfred, combines server (daemon) and client functionality in -the 'vis' binary. The vis server must be started to let vis work: +batadv-vis, similar to to alfred, combines server (daemon) and client +functionality in the 'batadv-vis' binary. The batadv-vis server must be started +to let batadv-vis work: - $ vis -i bat0 -s + $ batadv-vis -i bat0 -s This server will read the neighbor and client information from batman-adv every 10 seconds and set it in alfred via unix socket. Obviously, the alfred server must run too to get this information set. To get a graphviz-compatible vis output, simply type: - $ vis + $ batadv-vis digraph { subgraph "cluster_fe:f0:00:00:04:01" { "fe:f0:00:00:04:01"
@@ -153,7 +154,7 @@ digraph { For a json formatted output, use: - $ vis -f json + $ batadv-vis -f json { "primary" : "fe:f0:00:00:04:01" } { "router" : "fe:f0:00:00:04:01", "neighbor" : "fe:f0:00:00:05:01", "label" : "1.000" } { "router" : "fe:f0:00:00:04:01", "neighbor" : "fe:f0:00:00:03:01", "label" : "1.008" }
@@ -171,8 +172,8 @@ For a json formatted output, use: License ------- -alfred and vis are licensed under the terms of version 2 of the GNU General -Public License (GPL). Please see the LICENSE file. +alfred and batadv-vis are licensed under the terms of version 2 of the GNU +General Public License (GPL). Please see the LICENSE file. The file "packet.h" is an exception and not licensed with the GPL. Instead, it is licensed using ISC license (see the head of this file). This allows
vis/Makefile +3 -3
@@ -18,11 +18,11 @@ # 02110-1301, USA # -# alfred build -BINARY_NAME = vis +# batadv-vis build +BINARY_NAME = batadv-vis OBJ = vis.o debugfs.o -# alfred flags and options +# batadv-vis flags and options CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP LDLIBS += -lrt
vis/vis.c +1 -1
@@ -608,7 +608,7 @@ static int vis_get_data(struct globals *globals)static void vis_usage (void ) { -printf ("Usage: vis [options]\n" ); +printf ("Usage: batadv-vis [options]\n" );printf (" -i, --interface specify the batman-adv interface configured on the system (default: bat0)\n" );printf (" -s, --server start up in server mode, which regularly updates vis data from batman-adv\n" );printf (" -f, --format <format> specify the output format for client mode (either \"json\" or \"dot\")\n" );
Signature · 1 line
1.8.4.rc3
PATCH 4/4 alfred: Add manpage stubs
In reply to Sven Eckelmannmanpages are a soft requirement for many distributions and it is a nice feature for the end users. The stubs are only the restructured version of the README but provides a start for more useful manpages.
--- Makefile | 4 ++ man/alfred.8 | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++ vis/Makefile | 4 ++ vis/man/batadv-vis.8 | 116 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 260 insertions(+) create mode 100644 man/alfred.8 create mode 100644 vis/man/batadv-vis.8
Makefile +4 -0
@@ -21,6 +21,7 @@ # alfred build BINARY_NAME = alfred OBJ = main.o server.o client.o netsock.o send.o recv.o hash.o unix_sock.o util.o debugfs.o batadv_query.o +MANPAGE = man/alfred.8 # alfred flags and options CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
@@ -47,6 +48,7 @@ LINK.o = $(Q_LD)$(CC) $(CFLAGS) $(LDFLAGS) $(TARGET_ARCH) # standard install paths PREFIX = /usr/local SBINDIR = $(PREFIX)/sbin +MANDIR = $(PREFIX)/share/man # try to generate revision REVISION= $(shell if [ -d .git ]; then \
@@ -79,7 +81,9 @@ clean: $(VIS_CLEAN) install: $(BINARY_NAME) $(VIS_INSTALL) $(MKDIR) $(DESTDIR)$(SBINDIR) + $(MKDIR) $(DESTDIR)$(MANDIR)/man8 $(INSTALL) -m 0755 $(BINARY_NAME) $(DESTDIR)$(SBINDIR) + $(INSTALL) -m 0644 $(MANPAGE) $(DESTDIR)$(MANDIR)/man8 vis-install: $(MAKE) -C vis install
man/alfred.8 new file +136 -0
136 lines not on this page · raw message
vis/Makefile +4 -0
@@ -21,6 +21,7 @@ # batadv-vis build BINARY_NAME = batadv-vis OBJ = vis.o debugfs.o +MANPAGE = man/batadv-vis.8 # batadv-vis flags and options CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
@@ -47,6 +48,7 @@ LINK.o = $(Q_LD)$(CC) $(CFLAGS) $(LDFLAGS) $(TARGET_ARCH) # standard install paths PREFIX = /usr/local SBINDIR = $(PREFIX)/sbin +MANDIR = $(PREFIX)/share/man # try to generate revision REVISION= $(shell if [ -d ../.git ]; then \
@@ -72,7 +74,9 @@ clean: install: $(BINARY_NAME) $(MKDIR) $(DESTDIR)$(SBINDIR) + $(MKDIR) $(DESTDIR)$(MANDIR)/man8 $(INSTALL) -m 0755 $(BINARY_NAME) $(DESTDIR)$(SBINDIR) + $(INSTALL) -m 0644 $(MANPAGE) $(DESTDIR)$(MANDIR)/man8 # load dependencies DEP = $(OBJ:.o=.d)
vis/man/batadv-vis.8 new file +116 -0
116 lines not on this page · raw message
Signature · 1 line
1.8.4.rc3
Quoted 11 lines · Sven Eckelmann
The *.d depends files for make just list the files used when building an object file. Removing a file listed in such a dependency file causes make to search for a way to recreate it. This usually cannot work because these files aren't autogenerated.
The gcc option -MP can be used to generate empty rule for these files. Removing a file in a dependency list will then execute this empty rule and continue with the execution of the creation of the object file. This compilation process will then automatically correct the dependency file.
Signed-off-by Sven Eckelmann <[email protected]>
Applied the whole series (133331a, add63f6, ada988e, ea03057). I was a little unsure about the renaming thing (I don't like long names), but it's probably the best thing to do.
Thanks!
Simon