[GRASS-SVN] r35000 - grass/trunk/macosx/app

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 22 21:42:38 EST 2008


Author: kyngchaos
Date: 2008-12-22 21:42:38 -0500 (Mon, 22 Dec 2008)
New Revision: 35000

Modified:
   grass/trunk/macosx/app/Makefile
Log:
cleanup targets

Modified: grass/trunk/macosx/app/Makefile
===================================================================
--- grass/trunk/macosx/app/Makefile	2008-12-23 00:43:10 UTC (rev 34999)
+++ grass/trunk/macosx/app/Makefile	2008-12-23 02:42:38 UTC (rev 35000)
@@ -3,7 +3,7 @@
 MODULE_TOPDIR = ../..
 
 include $(MODULE_TOPDIR)/include/Make/Vars.make
-MOD_OBJS = Info.plist GRASS.scpt grass.sh main.o
+MOD_OBJS = 
 
 EXTRA_INC = 
 EXTRA_CFLAGS = 
@@ -17,35 +17,65 @@
 
 # ugly hack - assume gdal prefix starts with -L flag
 ifndef GDAL_BIN
-GDAL_BIN = `echo "${GDALLIBS}" | sed -e "s,-L,," -e "s,/lib.*$$,/bin,"`
+GDAL_BIN = `echo "${GDALLIBS}" | sed -e "s,-L,," -e "s,/lib.*$$,/bin:,"`
 endif
 # ugly hack - extract path to PROJ bin from nad2bin
 ifndef PROJ_BIN
-PROJ_BIN = `echo "${NAD2BIN}" | sed -e "s,.=,," -e "s,/nad2bin,,"`
+PROJ_BIN = `echo "${NAD2BIN}" | sed -e "s,.=,," -e "s,/nad2bin,:,"`
 endif
 
+NIBSRC := $(wildcard English.lproj/MainMenu.nib/*)
+NIBDST := $(patsubst English.lproj/%,$(APPDIR)/Resources/English.lproj/%,$(NIBSRC))
+
+FILES = \
+	$(APPDIR)/MacOS/etc/build_html_user_index.sh \
+	$(APPDIR)/MacOS/etc/build_gui_user_menu.sh \
+	$(APPDIR)/Resources/app.icns \
+	$(APPDIR)/Info.plist \
+	$(APPDIR)/PkgInfo \
+	$(APPDIR)/Resources/Scripts/GRASS.scpt \
+	$(APPDIR)/MacOS/grass.sh \
+	$(APPDIR)/MacOS/GRASS \
+	$(NIBDST)
+
 default: macosxapp
 
-macosxapp: PkgInfo app.icns English.lproj/MainMenu.nib build_html_user_index.sh build_gui_user_menu.sh $(ARCH_OBJS) $(APPDIR)/MacOS/GRASS
-	-${MAKE_DIR_CMD} ${APPDIR}/Resources/Scripts
-	-${MAKE_DIR_CMD} ${APPDIR}/MacOS/scripts
-	-${MAKE_DIR_CMD} ${APPDIR}/MacOS/etc
-	-${INSTALL_DATA} app.icns ${APPDIR}/Resources
-	-tar cBf - English.lproj --exclude CVS | (cd ${APPDIR}/Resources ; tar xBf - ) 2>/dev/null
-	-${INSTALL_DATA} $(OBJDIR)/Info.plist ${APPDIR}
-	-${INSTALL_DATA} PkgInfo ${APPDIR}
-	-${INSTALL} $(OBJDIR)/grass.sh ${APPDIR}/MacOS
-	-${INSTALL_DATA} $(OBJDIR)/GRASS.scpt ${APPDIR}/Resources/Scripts
-	-${INSTALL} build_html_user_index.sh ${APPDIR}/MacOS/etc
-	-${INSTALL} build_gui_user_menu.sh ${APPDIR}/MacOS/etc
+macosxapp:
+	-$(MAKE_DIR_CMD) $(OBJDIR)
+	-$(MAKE_DIR_CMD) $(APPDIR)/Resources/Scripts
+	-$(MAKE_DIR_CMD) $(APPDIR)/MacOS/scripts
+	-$(MAKE_DIR_CMD) $(APPDIR)/MacOS/etc
+	-$(MAKE_DIR_CMD) $(APPDIR)/Resources/English.lproj/MainMenu.nib
+	$(MAKE) $(FILES)
 
+$(APPDIR)/Resources/app.icns: app.icns
+	$(INSTALL_DATA) $< $@
+
+$(APPDIR)/Resources/English.lproj/%: English.lproj/%
+	$(INSTALL_DATA) $< $@
+
+$(APPDIR)/Info.plist: $(OBJDIR)/Info.plist
+	$(INSTALL_DATA) $< $@
+
+$(APPDIR)/PkgInfo: PkgInfo
+	$(INSTALL_DATA) $< $@
+
+$(APPDIR)/Resources/Scripts/GRASS.scpt: $(OBJDIR)/GRASS.scpt
+	$(INSTALL_DATA) $< $@
+
+$(APPDIR)/MacOS/grass.sh: $(OBJDIR)/grass.sh
+	$(INSTALL) $< $@
+
+$(APPDIR)/MacOS/etc/%.sh: %.sh
+	$(INSTALL) $< $@
+
 $(OBJDIR)/main.o: main.m
 	$(MAKE_DIR_CMD) $(OBJDIR)
 	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(EXTRA_INC) -o $(OBJDIR)/main.o -c main.m
 
 $(APPDIR)/MacOS/GRASS: $(OBJDIR)/main.o
-	-$(MAKE_DIR_CMD) ${APPDIR}/MacOS
-	$(CC) $(LDFLAGS) -o ${APPDIR}/MacOS/GRASS $(OBJDIR)/main.o $(EXTRA_LDFLAGS)
+	-$(MAKE_DIR_CMD) $(APPDIR)/MacOS
+	$(CC) $(LDFLAGS) -o $(APPDIR)/MacOS/GRASS $(OBJDIR)/main.o $(EXTRA_LDFLAGS)
 
 $(OBJDIR)/Info.plist: Info.plist.in
 	$(MAKE_DIR_CMD) $(OBJDIR)
@@ -61,8 +91,8 @@
 
 $(OBJDIR)/grass.sh: grass.sh.in
 	$(MAKE_DIR_CMD) $(OBJDIR)
-	sed -e "s, at GDAL_BIN_PATH@,$(GDAL_BIN):," \
-	-e "s, at PROJ_BIN_PATH@,$(PROJ_BIN):," \
+	sed -e "s, at GDAL_BIN_PATH@,$(GDAL_BIN)," \
+	-e "s, at PROJ_BIN_PATH@,$(PROJ_BIN)," \
 	-e "s, at X11@,$(USE_X11),g" \
 	grass.sh.in > $(OBJDIR)/grass.sh
 



More information about the grass-commit mailing list