Welcome to little lamb

Code » limb » commit ca4f538

parseopt: Fix header issues

author Olivier Brunel
2023-04-22 11:31:06 UTC
committer Olivier Brunel
2023-05-20 18:06:37 UTC
parent d09a941ec1816236e947d82da368bc12308059c4

parseopt: Fix header issues

Internal header should *not* include the public one, and anything that
requires both should include both. Otherwise the (automatic) dependencies
only see a dependency for the object on the internal header and not the
public one, so so rebuild is triggered when it is updated.

src/include/parseopt.h +0 -1
src/liblimb/parseopt.h/parseopt.c +1 -0
src/liblimb/parseopt.h/parseopt_warn.c +1 -0

diff --git a/src/include/parseopt.h b/src/include/parseopt.h
index 5e0a058..c77d533 100644
--- a/src/include/parseopt.h
+++ b/src/include/parseopt.h
@@ -5,7 +5,6 @@
 #define LIMB_LIMB_PARSEOPT_H
 
 #include <limb/gccattributes.h>
-#include <limb/parseopt.h>
 
 void parseopt_warn(const char **argv, const struct option *options,
                    const struct parseopt *ctx) gccattr_hidden;
diff --git a/src/liblimb/parseopt.h/parseopt.c b/src/liblimb/parseopt.h/parseopt.c
index 668a68f..4a04b34 100644
--- a/src/liblimb/parseopt.h/parseopt.c
+++ b/src/liblimb/parseopt.h/parseopt.c
@@ -4,6 +4,7 @@
 #include <errno.h>
 #include <stddef.h> /* offsetof() */
 #include <limb/bytestr.h>
+#include <limb/parseopt.h>
 #include "parseopt.h"
 
 static int
diff --git a/src/liblimb/parseopt.h/parseopt_warn.c b/src/liblimb/parseopt.h/parseopt_warn.c
index 891ff38..ecad301 100644
--- a/src/liblimb/parseopt.h/parseopt_warn.c
+++ b/src/liblimb/parseopt.h/parseopt_warn.c
@@ -4,6 +4,7 @@
 #include <errno.h>
 #include <limb/bytestr.h>
 #include <limb/output.h>
+#include <limb/parseopt.h>
 #include "parseopt.h"
 
 void