William Kyngesburye wrote:

> Looks like Glynn's r33038 messed it up.  I'll have to look at it to  
> get it working again.
> 
> Glynn: is OBJDIR not used now, or is there a different way of  
> specifying custom OBJDIR/targets?  I'll take a closer look later at  
> other parts of GRASS for examples.

I suspect the problem is that some of the files in $(MOD_OBJS) aren't
object files. If that ever worked, it was coincidence.

You need to add an rule which will force $(OBJDIR)/Info.plist to be
built, e.g.:

$(APPDIR)/Info.plist: $(OBJDIR)/Info.plist
        -$(INSTALL_DATA) $< $@

You also need to make $(APPDIR)/Info.plist as part of the top-level
macosxapp rule. One complication is the need to ensure that $(OBJDIR)
is created first, even in parallel builds, and it seems we can't rely
upon make (particularly the OSX version) supporting order-only
dependencies.

I suggest replacing the top-level macosxapp rule with the following:

NIBSRC := $(wildcard English.lproj/MainMenu.nib/*)
NIBDST := $(patsubst English.lproj/%,$(APPDIR)/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)

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)/English.lproj/MainMenu.nib
        $(MAKE) $(FILES)

${APPDIR}/Resources/app.icns: app.icns
        $(INSTALL_DATA) $< $@

$(APPDIR)/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) $< $@

BTW, is there a reason that main.m isn't called main.c?

-- 
Glynn Clements <gl...@gclements.plus.com>
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to