Skip to content

Commit d0483a7

Browse files
committed
Fix another make issue with modules
Subprojects that weren't dependencies of other things - modules and doomgeneric (which should be among modules but whatever) - failed to trigger a rebuild of the ISO when modified. This dependency is handled by the main Makefile, which sees changes based on directory modification dates, which is itself updated through `touch` in the modules' Makefile and doom's.
1 parent 2eba0c9 commit d0483a7

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ build: $(PROJECTS)
7171

7272
# Copy headers before building anything
7373
$(PROJECTS): $(PROJECT_HEADERS) | $(TARGETROOT) $(LIBDIR)
74-
$(info [$@] building)
7574
@$(MAKE) -C $@ build
7675

7776
# Specify dependencies

doomgeneric/Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ clean:
2929
@rm -f $(OUTPUT).map
3030

3131
$(OUTPUT): $(OBJS) $(LIB_DEPS) | $(TARGETROOT)
32-
@echo [Linking $@]
32+
$(info [doom] linking)
33+
@touch $(CURDIR)
3334
$(VB)$(LD) $(LDFLAGS) $(OBJS) -o $(OUTPUT) $(LIBS) -Map=$(OUTPUT).map
3435

3536
$(OBJS): | $(OBJDIR)
@@ -41,7 +42,7 @@ $(TARGETROOT):
4142
@mkdir -p $(TARGETROOT)
4243

4344
$(OBJDIR)/%.o: %.c
44-
@echo [Compiling $<]
45+
$(info [doom] $(notdir $(basename $<)))
4546
$(VB)$(CC) $(CFLAGS) -c $< -o $@
4647

4748
$(OBJDIR)/start.o: start.S

modules/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ clean:
2020
$(info [modules] $@)
2121
@rm -f */*.o
2222

23-
$(MODS): $(TARGETROOT)/% : src/%.o src/start.o
23+
$(MODS): $(TARGETROOT)/% : src/%.o src/start.o $(LIB_DEPS)
24+
$(info [modules] $(notdir $(basename $@)))
25+
@touch $(CURDIR)
2426
@$(LD) src/start.o $< -o $@ $(LDFLAGS) $(LIBS)
2527

2628
%.o: %.c
27-
$(info [modules] $(notdir $(basename $@)))
2829
@$(CC) -c $< -o $@ $(CFLAGS)
2930

3031
%.o: %.S
31-
$(info [modules] $@)
3232
@$(AS) $(ASFLAGS) $< -o $@

snow/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $(LIBSNOW): $(OBJS)
1818
@$(CC) -c $< -o $@ $(CFLAGS)
1919

2020
clean:
21-
$(info [snow] cleaning up)
21+
$(info [snow] $@)
2222
@rm -f *.a $(OBJS)
2323

2424
build: $(LIBSNOW)

0 commit comments

Comments
 (0)