makefile uses curly brackets

157 views
Skip to first unread message

Peter Burka

unread,
Apr 11, 2017, 10:48:36 AM4/11/17
to fastutil
While testing the current version, I noticed that make clean wasn't working for me. I believe that this is because it uses curly brackets in globs (e.g. {c,h,j}). This isn't POSIX compliant, and doesn't work on my Debian system. 


A more portable solution would be to use foreach, as you do in other parts of the makefile. Or, where the set is single characters, use square brackets instead. e.g.

clean: 
-@find build -name \*.class -exec rm {} \;
-@find . -name \*.java~ -exec rm {} \;
-@find . -name \*.html~ -exec rm {} \;
-@rm -f $(foreach k, $(sort $(TYPE)), $(GEN_SRCDIR)/$(PKG_PATH)/$(PACKAGE_$(k))/*.java)
-@rm -f $(GEN_SRCDIR)/$(PKG_PATH)/io/*IO.java
-@rm -f $(GEN_SRCDIR)/$(PKG_PATH)/*.[chj] $(GEN_SRCDIR)/$(PKG_PATH)/*/*.[chj]
-@rm -fr $(DOCSDIR)/*

I believe this notation is also used in the source and format targets.

Sebastiano Vigna

unread,
Apr 11, 2017, 12:48:20 PM4/11/17
to fastutil


Il giorno martedì 11 aprile 2017 16:48:36 UTC+2, Peter Burka ha scritto:
While testing the current version, I noticed that make clean wasn't working for me. I believe that this is because it uses curly brackets in globs (e.g. {c,h,j}). This isn't POSIX compliant, and doesn't work on my Debian system. 


Point taken. Thanks! 
Reply all
Reply to author
Forward
0 new messages