* [PATCH 1/1] Makefile: make distclean target work
@ 2016-09-28 21:40 Nicolas Iooss
2016-09-29 14:50 ` Stephen Smalley
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Iooss @ 2016-09-28 21:40 UTC (permalink / raw)
To: selinux
A mispelling in the Makefile in the root directory prevented "make
distclean" to go into subdirectories.
In libsemanage/src/, semanageswig_python_exception.i was not cleaned by
"make distclean" because the target did not use $(GENERATED) and this
variable was being redefined in the Makefile.
Fix these two bugs.
Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
Makefile | 2 +-
libsemanage/src/Makefile | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 93e10dee4820..bed16498d0e7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
SUBDIRS=libsepol libselinux libsemanage sepolgen checkpolicy secilc policycoreutils # policy
PYSUBDIRS=libselinux libsemanage
-DISTCLEANSUBIDRS=libselinux libsemanage
+DISTCLEANSUBDIRS=libselinux libsemanage
ifeq ($(DEBUG),1)
export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror
diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile
index 96ee652d06a9..68aab72cb619 100644
--- a/libsemanage/src/Makefile
+++ b/libsemanage/src/Makefile
@@ -51,7 +51,7 @@ SWIGFILES=$(SWIGSO) semanage.py
SWIGRUBYSO=$(RUBYPREFIX)_semanage.so
LIBSO=$(TARGET).$(LIBVERSION)
-GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) semanageswig_python_exception.i
+GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) semanageswig_python_exception.i $(wildcard conf-*.[ch])
SRCS= $(filter-out $(GENERATED),$(sort $(wildcard *.c)))
OBJS= $(patsubst %.c,%.o,$(SRCS)) conf-scan.o conf-parse.o
@@ -68,8 +68,6 @@ SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./
SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./
-GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) $(wildcard conf-*.[ch])
-
all: $(LIBA) $(LIBSO) $(LIBPC)
pywrap: all $(SWIGSO)
@@ -163,7 +161,7 @@ clean:
-rm -f $(LIBPC) $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) conf-parse.c conf-parse.h conf-scan.c *.o *.lo *~
distclean: clean
- rm -f $(SWIGCOUT) $(SWIGFILES)
+ rm -f $(GENERATED) $(SWIGFILES)
indent:
../../scripts/Lindent $(filter-out $(GENERATED),$(wildcard *.[ch]))
--
2.10.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] Makefile: make distclean target work
2016-09-28 21:40 [PATCH 1/1] Makefile: make distclean target work Nicolas Iooss
@ 2016-09-29 14:50 ` Stephen Smalley
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Smalley @ 2016-09-29 14:50 UTC (permalink / raw)
To: Nicolas Iooss, selinux
On 09/28/2016 05:40 PM, Nicolas Iooss wrote:
> A mispelling in the Makefile in the root directory prevented "make
> distclean" to go into subdirectories.
>
> In libsemanage/src/, semanageswig_python_exception.i was not cleaned by
> "make distclean" because the target did not use $(GENERATED) and this
> variable was being redefined in the Makefile.
>
> Fix these two bugs.
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
Thanks, applied
> ---
> Makefile | 2 +-
> libsemanage/src/Makefile | 6 ++----
> 2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 93e10dee4820..bed16498d0e7 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1,6 +1,6 @@
> SUBDIRS=libsepol libselinux libsemanage sepolgen checkpolicy secilc policycoreutils # policy
> PYSUBDIRS=libselinux libsemanage
> -DISTCLEANSUBIDRS=libselinux libsemanage
> +DISTCLEANSUBDIRS=libselinux libsemanage
>
> ifeq ($(DEBUG),1)
> export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror
> diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile
> index 96ee652d06a9..68aab72cb619 100644
> --- a/libsemanage/src/Makefile
> +++ b/libsemanage/src/Makefile
> @@ -51,7 +51,7 @@ SWIGFILES=$(SWIGSO) semanage.py
> SWIGRUBYSO=$(RUBYPREFIX)_semanage.so
> LIBSO=$(TARGET).$(LIBVERSION)
>
> -GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) semanageswig_python_exception.i
> +GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) semanageswig_python_exception.i $(wildcard conf-*.[ch])
> SRCS= $(filter-out $(GENERATED),$(sort $(wildcard *.c)))
>
> OBJS= $(patsubst %.c,%.o,$(SRCS)) conf-scan.o conf-parse.o
> @@ -68,8 +68,6 @@ SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./
>
> SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./
>
> -GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) $(wildcard conf-*.[ch])
> -
> all: $(LIBA) $(LIBSO) $(LIBPC)
>
> pywrap: all $(SWIGSO)
> @@ -163,7 +161,7 @@ clean:
> -rm -f $(LIBPC) $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) conf-parse.c conf-parse.h conf-scan.c *.o *.lo *~
>
> distclean: clean
> - rm -f $(SWIGCOUT) $(SWIGFILES)
> + rm -f $(GENERATED) $(SWIGFILES)
>
> indent:
> ../../scripts/Lindent $(filter-out $(GENERATED),$(wildcard *.[ch]))
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-29 14:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-28 21:40 [PATCH 1/1] Makefile: make distclean target work Nicolas Iooss
2016-09-29 14:50 ` Stephen Smalley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.