Added rule to generate a %.plist from a %.cplist

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@16465 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2003-04-14 10:52:35 +00:00
parent c919731a6d
commit bff8a61465

View file

@ -255,6 +255,35 @@ ALL_LIB_DIRS = $(ADDITIONAL_FRAMEWORK_DIRS) $(AUXILIARY_FRAMEWORK_DIRS) \
$(GNUSTEP_LIBRARIES_FLAGS) \
$(SYSTEM_LIB_DIR)
# We use .plist (property-list files, see gnustep-base) in quite a few
# cases. Whenever a .plist file is required, you can/will be allowed
# to provide a .cplist file instead (at the moment, it is only
# implemented for applications' xxxInfo.plist). A .cplist file is a
# property-list file with C preprocessor conditionals. gnustep-make
# will automatically generate the .plist file from the .cplist file by
# running the C preprocessor.
# The CPLISTFLAGS are the flags used when running the C preprocessor
# to generate a .plist file from a .cplist file.
ALL_CPLISTFLAGS = -P -x c
ifeq ($(FOUNDATION_LIB), gnu)
ALL_CPLISTFLAGS += -DGNUSTEP
else
ifeq ($(FOUNDATION_LIB), apple)
ALL_CPLISTFLAGS += -DAPPLE
else
ifeq ($(FOUNDATION_LIB), nx)
ALL_CPLISTFLAGS += -DNEXT
else
ALL_CPLISTFLAGS += -DUNKNOWN
endif
endif
endif
ALL_CPLISTFLAGS += $(ADDITIONAL_CPLISTFLAGS) $(AUXILIARY_CPLISTFLAGS)
# If we are using Windows32 DLLs, we pass -DGNUSTEP_WITH_DLL to the
# compiler. This preprocessor define might be used by library header
# files to know they are included from external code needing to use
@ -400,6 +429,19 @@ $(GNUSTEP_OBJ_DIR)/%${OEXT} : %.cp
%.h : %.psw
pswrap -h $@ -o $*.c $<
# Rule to generate a .plist file (a property list file) by running the
# preprocessor on a .cplist file (a property list file with embedded C
# preprocessor conditionals). Useful in order to have a single
# xxxInfo.plist file for multiple platforms (read GNUstep and Apple)
# for the same application (to make portability easier). You can have
# a single xxxInfo.cplist file, and xxxInfo.plist will automatically
# be generated by gnustep-make from xxxInfo.cplist by running the
# preprocessor.
%.plist : %.cplist
$(ECHO_PREPROCESSING)$(CPP) \
$(filter-out $($<_FILE_FILTER_OUT_FLAGS),$(ALL_CPLISTFLAGS))\
$($<_FILE_FLAGS) $< -o $@$(END_ECHO)
# The following dummy rules are needed for performance - we need to
# prevent make from spending time trying to compute how/if to rebuild
# the system makefiles! the following rules tell him that these files