Skip to content

Commit

Permalink
Remove unnecessary _SUBDIRUSE
Browse files Browse the repository at this point in the history
This was already being added in subdir.mk
Also, remove SUBDIR from realbuild. If we want to build a subdir, we can use DPADD.
  • Loading branch information
VexedUXR committed Apr 28, 2024
1 parent e24279b commit 99be9c5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PROG= bmake

SUBDIR+= tre
DPADD+= tre
LDADD+= user32.lib tre.lib
LDFLAGS+= /libpath:tre

Expand Down
8 changes: 4 additions & 4 deletions mk/lib.mk
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ _LIBS=
.endif

.if !defined(_SKIP_BUILD)
realbuild: ${SUBDIR} ${_LIBS}
realbuild: ${_LIBS}
.endif

OBJS_SRCS = ${SRCS:${OBJS_SRCS_FILTER}}
Expand Down Expand Up @@ -103,10 +103,10 @@ cleanlib: .PHONY
${RM} ${SHLIB_LINKS}
.endif

clean: _SUBDIRUSE cleanlib
cleandir: _SUBDIRUSE cleanlib
clean: cleanlib
cleandir: cleanlib
.else
cleandir: _SUBDIRUSE clean
cleandir: clean
.endif
.include <subdir.mk>
.endif
8 changes: 4 additions & 4 deletions mk/prog.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ ${PROG}.exe: ${OBJS} ${DPADD}
.endif # defined(PROG)

.if !defined(_SKIP_BUILD)
realbuild: ${SUBDIR} ${PROG}.exe
realbuild: ${PROG}.exe
.endif

.if !target(clean)
cleanprog:
${RM} ${PROG}.exe ${OBJS} ${CLEANFILES}

clean: _SUBDIRUSE cleanprog
cleandir: _SUBDIRUSE cleanprog
clean: cleanprog
cleandir: cleanprog
.else
cleandir: _SUBDIRUSE clean
cleandir: clean
.endif
.include <subdir.mk>
.endif

0 comments on commit 99be9c5

Please sign in to comment.