[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PSWrap problems
From: |
Jay McCarthy |
Subject: |
PSWrap problems |
Date: |
08 Dec 2001 15:45:51 -0500 |
When you define the variable, (APP_NAME)_PSWRAP_FILES it generates the
.c and .h files in the main source directory.
so if APP_NAME_PSWRAP_FILES = Wraps.psw then in APP_NAME there will be:
Wraps.h
Wraps.c
Wraps.psw
The .c will not be compiled.
The .h will not be copied with other header files in the case of a
framework.
These two things can be battled by putting the resulting .h and .c files
in you APP_NAME_HEADER_FILES and APP_NAME_OBJC_FILES.
Another problem is that the resulting .c and .h files will not be
deleted on a 'clean' or 'distclean'.
I attempted to fix this problem by putting the following lines on line
635 of rules.make (which is copied a little bit for context):
PSWRAP_C_FILES = $(PSWRAP_FILES:.psw=.c)
PSWRAP_H_FILES = $(PSWRAP_FILES:.psw=.h)
PSWRAP_OBJS = $(PSWRAP_FILES:.psw=${OEXT})
PSWRAP_OBJ_FILES = $(addprefix $(GNUSTEP_OBJ_DIR)/,$(PSWRAP_OBJS))
HEADER_FILES += $(PSWRAP_H_FILES)
C_FILES += $(PSWRAP_C_FILES)
this did not work. Niether did
HEADER_FILES := $(PSWRAP_H_FILES) $(HEADER_FILES)
C_FILES := $(PSWRAP_C_FILES) $(C_FILES)
I dont know too much about how the GNUstep makefiles work but I think
that might not work because those lines fall AFTER the rules to build
everything with the second make (which sets the universal names for
HEADER_FILES and so forth rather then the APP_NAME_HEADER_FILES) -
however when I tried to define these variables before that it also did
not work, but I may have done it the wrong way.
The only project in the gnustep source that I could find that uses
pswrap files is xdps, and if you look in the Source directory you will
see:
drawingfuncs.c
drawingfuncs.h
drawingfuncs.psw
extensions.c
extensions.h
extensions.psw
fonts.c
fonts.h
fonts.psw
general.c
general.h
general.psw
After a build, and they do not go away after a 'make clean' or 'make
distclean' - which tells me that I am not doing something wrong in my
GNUmakefile.
So, I figured that rather than trying to fumble around and fix it for
any longer (I've already failed with most attempts.) I would report the
bug so that more knowledgable minds can figure it out.
On a side note, this may also effect .java files as their variables are
set in the same manor as the PSWRAP variables.
On a second side note, currently their are rules to build the .c file
for a .psw but not the .h file for a .psw (they ARE built together but
you can only get the header by buidling the c file), so I have following
small patch for rules.make
--- Makefiles.original/rules.make Fri Dec 7 17:44:19 2001
+++ Makefiles/rules.make Sat Dec 8 15:36:11 2001
@@ -391,6 +391,9 @@
%.c : %.psw
pswrap -h $*.h -o $@ $<
+%.h : %.psw
+ pswrap -h $@ -o $*.c $<
+
# Prevent make from trying to remove stuff like
# libcool.library.all.subprojects thinking that it is a temporary file
--
Jay McCarthy <jay@kenyamountain.com>
- PSWrap problems,
Jay McCarthy <=