more portable makefile
Hi,
I've made the Makefile more portable.
-
GNU make is required, so every call of "make" was replaced by ${MAKE} to make it possible to call make as gmake.
-
GNU find was required, now it should work with every find out there
--- gajim-0.7/Makefile Mon May 23 20:22:10 2005 +++ gajim-0.7.new/Makefile Thu Jun 2 15:32:34 2005 @@ -4,12 +4,12 @@ PREFIX = /usr DESTDIR = / -FIND = find -regex '.*\.\(\(glade\)\|\(pyo\)\|\(xpm\)\|\(gif\)\|\(png\)\|\(mo\)\|\(wav\)\)' +FIND = find . \( -name '*.glade' -o -name '*.pyo' -o -name '*.xpm' -o -name '*.gif' -o -name '*.png' -o -name '*.mo' -o -name '*.wav' \) FILES = `$(FIND)` DIRS = `$(FIND) -exec dirname {} \; | sort -u` -FIND_LIB = find -regex '.*\.\(so\)' +FIND_LIB = find . -name '*.so' FILES_LIB = `$(FIND_LIB)` -FIND_PY = find -regex '.*\.\(py\)' +FIND_PY = find . -name '*.py' FILES_PY = `$(FIND_PY)` SCRIPTS = \ @@ -18,13 +18,13 @@ all: translation trayicon idle pyo translation: - make -C po all + ${MAKE} -C po all trayicon: - make -C src all; + ${MAKE} -C src all; idle: - make -C src/common all; + ${MAKE} -C src/common all; pyo: for f in $(FILES_PY) ; do \ @@ -32,10 +32,10 @@ done clean: - find -name *.pyc -exec rm {} \; - find -name *.pyo -exec rm {} \; - find -name *.mo -exec rm {} \; - $(foreach sdir, $(MODULES), make -C $(sdir) clean;) + find . -name *.pyc -exec rm {} \; + find . -name *.pyo -exec rm {} \; + find . -name *.mo -exec rm {} \; + $(foreach sdir, $(MODULES), ${MAKE} -C $(sdir) clean;) dist: -rm -rf gajim-$(VERSION) --- gajim-0.7/po/Makefile Mon May 23 20:22:09 2005 +++ gajim-0.7.new/po/Makefile Thu Jun 2 15:34:01 2005 @@ -7,4 +7,4 @@ msgfmt $\< -o $@ clean: - find -name '*.mo' -exec rm {} \; + find . -name '*.mo' -exec rm {} \;