Skip to content

Commit

Permalink
Dynamic subdirs in Makefile (#887)
Browse files Browse the repository at this point in the history
* add Makefile at root

* get subdirs dynamically

* add Makefile

* add Makefile

* add Makefile

* reuse subdir filter
  • Loading branch information
ninsbl committed Apr 19, 2023
1 parent fcbb27b commit 0d52912
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 10 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

MODULE_TOPDIR = ..

SUBDIRS = src

include $(MODULE_TOPDIR)/include/Make/Dir.make

default: parsubdirs
11 changes: 1 addition & 10 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@

MODULE_TOPDIR = ..

# display gui misc
SUBDIRS = \
db \
display \
general \
imagery \
raster \
raster3d \
vector \
temporal
SUBDIRS := ${sort ${dir ${wildcard */Makefile}}}

include $(MODULE_TOPDIR)/include/Make/Dir.make

Expand Down
9 changes: 9 additions & 0 deletions src/gui/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MODULE_TOPDIR = ..

ALL_SUBDIRS := ${sort ${dir ${wildcard */.}}}
DEPRECATED_SUBDIRS := ${sort ${dir ${wildcard */DEPRECATED}}}
SUBDIRS := $(filter-out $(DEPRECATED_SUBDIRS), $(ALL_SUBDIRS))

include $(MODULE_TOPDIR)/include/Make/Dir.make

default: subdirs
9 changes: 9 additions & 0 deletions src/gui/wxpython/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MODULE_TOPDIR = ..

ALL_SUBDIRS := ${sort ${dir ${wildcard */.}}}
DEPRECATED_SUBDIRS := ${sort ${dir ${wildcard */DEPRECATED}}}
SUBDIRS := $(filter-out $(DEPRECATED_SUBDIRS), $(ALL_SUBDIRS))

include $(MODULE_TOPDIR)/include/Make/Dir.make

default: subdirs
9 changes: 9 additions & 0 deletions src/hadoop/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MODULE_TOPDIR = ..

ALL_SUBDIRS := ${sort ${dir ${wildcard */.}}}
DEPRECATED_SUBDIRS := ${sort ${dir ${wildcard */DEPRECATED}}}
SUBDIRS := $(filter-out $(DEPRECATED_SUBDIRS), $(ALL_SUBDIRS))

include $(MODULE_TOPDIR)/include/Make/Dir.make

default: subdirs

0 comments on commit 0d52912

Please sign in to comment.