[GRASS-dev] mac error in GRASS 7 compiling

William Kyngesburye woklist at kyngchaos.com
Mon Dec 22 13:27:12 EST 2008


On Dec 22, 2008, at 12:30 PM, Glynn Clements wrote:

> 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.
>
Indeed, most are scripts of some sort.  But it wasn't coincidence that  
it worked:

> 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) $< $@
>
I had:

ARCH_OBJS := $(foreach obj,$(OBJS),$(OBJDIR)/$(obj))

which took care of this.

> 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/*)

Will this exclude CVS/SVN hidden files?  IOW, does it behave just like  
"ls" (without the -a flag)?

>
> 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) $< $@
>
I'll give this a go.  I assume keep my $(OBJDIR)/* targets?

> BTW, is there a reason that main.m isn't called main.c?
>
main.m is Objective-C.  Obj-C is needed to create the OSX application  
shell.

> -- 
> Glynn Clements <glynn at gclements.plus.com>

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

[Trillian]  What are you supposed to do WITH a maniacally depressed  
robot?

[Marvin]  You think you have problems?  What are you supposed to do if  
you ARE a maniacally depressed robot?  No, don't try and answer, I'm  
50,000 times more intelligent than you and even I don't know the  
answer...

- HitchHiker's Guide to the Galaxy




More information about the grass-dev mailing list