Skip to content

Commit

Permalink
[sb2] Make sure config.h is updated and cleaned
Browse files Browse the repository at this point in the history
Signed-off-by: Björn Bidar <[email protected]>
  • Loading branch information
Thaodan committed Nov 24, 2024
1 parent 6e16218 commit 53b9268
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ include $(LLBUILD)/Makefile.include
# while configure is running when any of these or their
# dependencies change
DIST_FILES = $(OBJDIR)/config.status \
$(OBJDIR)/config.mak
$(OBJDIR)/config.mak \
$(SRCDIR)/include/config.h.in


all: $(DIST_FILES) .WAIT do-all
Expand All @@ -76,13 +77,16 @@ do-all: $(targets)

# Don't erase these files if make is interrupted while refreshing them.
.PRECIOUS: $(OBJDIR)/config.status
$(OBJDIR)/config.status $(OBJDIR)/config.mak: $(SRCDIR)/configure $(SRCDIR)/config.mak.in
$(DIST_FILES): $(SRCDIR)/configure $(SRCDIR)/config.mak.in
$(OBJDIR)/config.status --recheck

$(SRCDIR)/configure: $(SRCDIR)/configure.ac
cd $(SRCDIR); \
./autogen.sh

$(OBJDDIR)/include/config.h: $(OBJDIR)/config.h.in $(OBJDIR)/config.status
$(OBJDIR)/config.status config.h

$(OBJDIR)/include/scratchbox2_version.h: $(OBJDIR)/config.mak
mkdir -p $(OBJDIR)/include
echo "/* Automatically generated file. Do not edit. */" >$(OBJDIR)/include/scratchbox2_version.h
Expand Down Expand Up @@ -207,10 +211,12 @@ ifeq ($(OS),Linux)
endif

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

distclean: clean
$(P)CLEAN
Expand Down

0 comments on commit 53b9268

Please sign in to comment.