Skip to content

Commit 0aa2c08

Browse files
jared mauchjared mauch
authored andcommitted
Fix build dependencies for scripts copied to build directory
- Add dependencies in bin/Makefile.in and cron/Makefile.in so build directory files are rebuilt when source files change - Make install targets depend on all target to ensure build files are current - Ensure build directories exist before descending into subdirectories - This fixes the issue where changes to source scripts weren't reflected in the build directory until a clean rebuild
1 parent 66d0d74 commit 0aa2c08

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

Makefile.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,13 @@ EXCLUDES = --exclude=CVS --exclude=.cvsignore --exclude=Makefile* --exclude=*.fi
7575

7676
all: subdirs
7777

78-
subdirs: $(SUBDIRS)
78+
# Ensure build directory scripts are built before descending into subdirectories.
79+
# The actual rules for individual files are generated by configure from the SCRIPTS variable.
80+
# We depend on the directories and let the individual file rules handle the rest.
81+
build/bin build/cron:
82+
@mkdir -p $@
83+
84+
subdirs: build/bin build/cron $(SUBDIRS)
7985
for d in $(SUBDIRS); \
8086
do \
8187
(cd $$d; $(MAKE)); \

bin/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
6464

6565
# Rules
6666

67-
all:
67+
all: $(SCRIPTS:%=$(BUILDDIR)/%)
6868

69-
install:
69+
install: all
7070
for f in $(SCRIPTS); \
7171
do \
7272
$(INSTALL) -m $(EXEMODE) $(BUILDDIR)/$$f $(DESTDIR)$(SCRIPTSDIR); \

cron/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ FILEMODE= 644
5656

5757
# Rules
5858

59-
all:
59+
all: $(PROGRAMS:%=$(BUILDDIR)/%)
6060

61-
install:
61+
install: all
6262
for f in $(FILES); \
6363
do \
6464
$(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(CRONDIR); \

0 commit comments

Comments
 (0)