discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Makefile Question


From: Andrew Ruder
Subject: Re: Makefile Question
Date: Sat, 19 Feb 2005 11:29:03 -0600
User-agent: Mozilla Thunderbird 1.0RC1 (X11/20041201)

Matt Rice wrote:

before-all::
     mkdir -p shared_obj/source

to a GNUmakefile.preamble, though theres probably a
better way

First off, this should probably be the .postamble.

But in TalkSoup, I do something like this

before-all::
    $(MKDIRS) $(GNUSTEP_OBJ_DIR)/Controllers/Preferences
    $(MKDIRS) $(GNUSTEP_OBJ_DIR)/Controllers/ConnectionController

and for the other 10 or so directories too.  Then in your GNUmakefile,
after you include application.make, put in a line like

include GNUmakefile.postamble

In case you want to see further how it works, I have attached the 2 pertinent makefiles from TalkSoup.

- Andy
include $(GNUSTEP_MAKEFILES)/common.make

BUNDLE_NAME = GNUstepOutput

ifeq ($(OBJC_RUNTIME_LIB), apple)
BUNDLE_INSTALL_DIR = $(GNUSTEP_INSTALLATION_DIR)/Library/Application\ 
Support/TalkSoup/Output
else
BUNDLE_INSTALL_DIR = 
$(GNUSTEP_INSTALLATION_DIR)/Library/ApplicationSupport/TalkSoup/Output
endif

BUNDLE_EXTENSION =

Pref_Nibs = Preferences.nib \
FontPreferences.nib \
GeneralPreferences.nib \
ColorPreferences.nib \
BundlePreferences.nib

All_Localized_Nibs = $(Pref_Nibs) \
ServerEditor.nib \
ServerList.nib \
NamePrompt.nib \
GroupEditor.nib \
ServerEditor.nib \
TopicInspector.nib \
GNUstepOutput.nib

ifeq ($(OBJC_RUNTIME_LIB), apple)
GNUstepOutput_LOCALIZED_RESOURCE_FILES = Localizable.strings \
$(All_Localized_Nibs)
else
GNUstepOutput_LOCALIZED_RESOURCE_FILES = Localizable.strings \
$(shell \
echo "$(All_Localized_Nibs)" | \
sed -e 's/\.nib/\.gorm/g')
endif

Pref_Images = Images/bundle_prefs.tiff \
Images/color_prefs.tiff \
Images/font_prefs.tiff \
Images/general_prefs.tiff

GNUstepOutput_RESOURCE_FILES = Images/common_ret.tiff Images/common_retH.tiff \
 AllLanguages/Defaults.plist $(Pref_Images)

All_NonLocalized_Nibs = \
AllLanguages/StandardChannel.nib \
AllLanguages/StandardQuery.nib \
AllLanguages/TabContent.nib

ifeq ($(OBJC_RUNTIME_LIB), apple)
Extra_Resources = $(All_NonLocalized_Nibs)
else
Extra_Resources = $(shell \
  echo "$(All_NonLocalized_Nibs)" | \
  sed -e 's/\.nib/\.gorm/g')
endif

GNUstepOutput_RESOURCE_FILES += $(Extra_Resources)
        
GNUstepOutput_LANGUAGES = English

GNUstepOutput_PRINCIPAL_CLASS = GNUstepOutput

ifeq ($(OBJC_RUNTIME_LIB), apple)
GNUstepOutput_BUNDLE_LIBS = -framework TalkSoupBundles 
$(ADDITIONAL_FRAMEWORK_DIRS)
else
GNUstepOutput_BUNDLE_LIBS = -lTalkSoupBundles $(GUI_LIBS)
endif

ConnectionController = Controllers/ConnectionController/ConnectionController.m \
Controllers/ConnectionController/ConnectionControllerCtcp.m \
Controllers/ConnectionController/ConnectionControllerDelegate.m \
Controllers/ConnectionController/ConnectionControllerInFilter.m \
Controllers/ConnectionController/ConnectionControllerNumericCommands.m \
Controllers/ConnectionController/ConnectionControllerOutFilter.m

ContentController = Controllers/ContentControllers/StandardContentController.m \
Controllers/ContentControllers/ContentController.m \
Controllers/ContentControllers/Tab/TabContentController.m \
Controllers/ContentControllers/Tab/TabMasterController.m \
Controllers/ContentControllers/StandardChannelController.m \
Controllers/ContentControllers/StandardQueryController.m

Preferences = Controllers/Preferences/GeneralPreferencesController.m \
Controllers/Preferences/BundlePreferencesController.m \
Controllers/Preferences/ColorPreferencesController.m \
Controllers/Preferences/FontPreferencesController.m \
Controllers/Preferences/PreferencesController.m

Controllers = \
Controllers/NamePromptController.m \
Controllers/ServerListController.m \
Controllers/InputController.m \
Controllers/GroupEditorController.m \
Controllers/ServerEditorController.m \
Controllers/ServerListConnectionController.m \
Controllers/TopicInspectorController.m \
$(Preferences) \
$(ConnectionController) \
$(ContentController)

Views = Views/AttributedTabViewItem.m \
Views/ScrollingTextView.m \
Views/KeyTextView.m

Misc = Misc/NSColorAdditions.m \
Misc/NSObjectAdditions.m \
Misc/NSAttributedStringAdditions.m

Models = Models/Channel.m

GNUstepOutput_OBJC_FILES = GNUstepOutput.m $(Controllers) $(Views) $(Misc)\
                           $(Models)
                                                   
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/bundle.make
-include GNUmakefile.postamble
before-all::
        $(MKDIRS) $(GNUSTEP_OBJ_DIR)/Controllers/Preferences
        $(MKDIRS) $(GNUSTEP_OBJ_DIR)/Controllers/ConnectionController
        $(MKDIRS) $(GNUSTEP_OBJ_DIR)/Controllers/ContentControllers
        $(MKDIRS) $(GNUSTEP_OBJ_DIR)/Controllers/ContentControllers/Tab
        $(MKDIRS) $(GNUSTEP_OBJ_DIR)/Views
        $(MKDIRS) $(GNUSTEP_OBJ_DIR)/Misc
        $(MKDIRS) $(GNUSTEP_OBJ_DIR)/Models

reply via email to

[Prev in Thread] Current Thread [Next in Thread]