Skip to content

Commit

Permalink
[sb2] Clean correctly without breaking builds and keeping the tree dirty
Browse files Browse the repository at this point in the history
Previously config.status was also clean as part of the clean making
rebuilds impossible without calling configure again.
Clean isn't supposed to clean the generated build- or
distribution-system files.

Further somefiles that should be clean where not cleaned at all.
This change also aligns the name of the clean target which removes
the distribution to the one configure mentions when it fails.

Signed-off-by: Björn Bidar <[email protected]>
  • Loading branch information
Thaodan committed Nov 24, 2024
1 parent 4f228e6 commit 6e16218
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,15 @@ ifeq ($(OS),Linux)
$(Q)/sbin/ldconfig -n $(DESTDIR)$(libdir)/libsb2
endif

CLEAN_FILES += $(targets) config.status config.log
CLEAN_FILES += $(targets) \
$(OBJDIR)/include/scratchbox2_version.h
DISTCLEAN_FILES += $(DIST_FILES) \
$(OBJDIR)/config.log \
$(SRCDIR)/configure

superclean: clean
distclean: clean
$(P)CLEAN
$(Q)rm -rf include/config.h config.mak
$(Q)rm -rf $(DISTCLEAN_FILES)

clean:
$(P)CLEAN
Expand Down
12 changes: 9 additions & 3 deletions preload/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ $(OBJDIR)/preload/wrappers.c: preload/interface.master preload/gen-interface.pl
-E $(OBJDIR)/preload/exported.h \
-M $(OBJDIR)/preload/export.map \
-V $(PACKAGE_VERSION) \
-m preload/libsb2_interface.7 \
-m $(OBJDIR)/preload/libsb2_interface.7 \
<$(SRCDIR)/preload/interface.master

$(D)/privatewrappers.h: preload/privatewrappers.c
Expand All @@ -71,8 +71,14 @@ $(D)/privatewrappers.c: preload/interface.private preload/gen-interface.pl
-E $(OBJDIR)/preload/privatewrappers.h \
<$(SRCDIR)/preload/interface.private

generated := $(OBJDIR)/preload/wrappers.c $(OBJDIR)/preload/exported.h \
$(OBJDIR)/preload/ldexportlist
generated := $(OBJDIR)/preload/wrappers.c \
$(OBJDIR)/preload/exported.h \
$(OBJDIR)/preload/ldexportlist \
$(OBJDIR)/preload/export.map \
$(OBJDIR)/preload/privatewrappers.c \
$(OBJDIR)/preload/privatewrappers.h \
$(OBJDIR)/preload/libsb2_interface.7

.PRECIOUS: $(generated)

CLEAN_FILES += $(generated)

0 comments on commit 6e16218

Please sign in to comment.