Generate .x source files as .c source files
The generated .x source and .hx header files are plain C source files. Generate them as .c source files and avoid unnecessary file copying and special makefile rules. Change-Id: Ifc4bbe3c46dd357fdd642040ad964c7cfe1d395c
This commit is contained in:

committed by
Nicolas Williams

parent
4919daa7ab
commit
9427796f1a
@@ -303,19 +303,19 @@ nobase_include_HEADERS = \
|
||||
gssapidir = $(includedir)/gssapi
|
||||
nodist_gssapi_HEADERS = gkrb5_err.h negoex_err.h
|
||||
|
||||
gssapi_files = asn1_GSSAPIContextToken.x
|
||||
gssapi_files = asn1_GSSAPIContextToken.c
|
||||
|
||||
spnego_files = \
|
||||
asn1_ContextFlags.x \
|
||||
asn1_MechType.x \
|
||||
asn1_MechTypeList.x \
|
||||
asn1_NegotiationToken.x \
|
||||
asn1_NegotiationToken2.x \
|
||||
asn1_NegHints.x \
|
||||
asn1_NegTokenInit.x \
|
||||
asn1_NegTokenInit2.x \
|
||||
asn1_NegTokenResp.x \
|
||||
asn1_NegStateEnum.x
|
||||
asn1_ContextFlags.c \
|
||||
asn1_MechType.c \
|
||||
asn1_MechTypeList.c \
|
||||
asn1_NegotiationToken.c \
|
||||
asn1_NegotiationToken2.c \
|
||||
asn1_NegHints.c \
|
||||
asn1_NegTokenInit.c \
|
||||
asn1_NegTokenInit2.c \
|
||||
asn1_NegTokenResp.c \
|
||||
asn1_NegStateEnum.c
|
||||
|
||||
BUILTHEADERS = \
|
||||
$(srcdir)/krb5/gsskrb5-private.h \
|
||||
@@ -328,7 +328,7 @@ $(test_context_OBJECTS): $(BUILTHEADERS)
|
||||
|
||||
$(libgssapi_la_OBJECTS): $(srcdir)/version-script.map
|
||||
|
||||
BUILT_SOURCES = $(spnego_files:.x=.c) $(gssapi_files:.x=.c)
|
||||
BUILT_SOURCES = $(spnego_files) $(gssapi_files)
|
||||
|
||||
$(libgssapi_la_OBJECTS): gkrb5_err.h negoex_err.h
|
||||
gkrb5_err.h: $(srcdir)/krb5/gkrb5_err.et
|
||||
@@ -338,10 +338,12 @@ CLEANFILES = $(BUILT_SOURCES) \
|
||||
gkrb5_err.[ch] negoex_err.[ch] \
|
||||
$(spnego_files) spnego_asn1*.h* spnego_asn1_files spnego_asn1-template.[cx] \
|
||||
$(gssapi_files) gssapi_asn1*.h* gssapi_asn1_files gssapi_asn1-template.[cx] \
|
||||
gss-commands.h gss-commands.c
|
||||
gss-commands.h gss-commands.c \
|
||||
gssapi_asn1.json gssapi_asn1_oids.c gssapi_asn1_syms.c \
|
||||
spnego_asn1.json spnego_asn1_oids.c spnego_asn1_syms.c
|
||||
|
||||
$(spnego_files) spnego_asn1.hx spnego_asn1-priv.hx: spnego_asn1_files
|
||||
$(gssapi_files) gssapi_asn1.hx gssapi_asn1-priv.hx: gssapi_asn1_files
|
||||
$(spnego_files) spnego_asn1.h spnego_asn1-priv.h: spnego_asn1_files
|
||||
$(gssapi_files) gssapi_asn1.h gssapi_asn1-priv.h: gssapi_asn1_files
|
||||
|
||||
spnego_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/spnego/spnego.asn1 $(srcdir)/spnego/spnego.opt
|
||||
$(ASN1_COMPILE) --option-file=$(srcdir)/spnego/spnego.opt $(srcdir)/spnego/spnego.asn1 spnego_asn1
|
||||
@@ -445,7 +447,7 @@ $(srcdir)/gssapi/gssapi_oid.h $(srcdir)/mech/gss_oid.c:
|
||||
# NegoEx test mechanism, uses decode_GSSAPIContextToken
|
||||
#
|
||||
|
||||
test_negoex_mech_la_SOURCES = test_negoex_mech.c $(gssapi_files:.x=.c)
|
||||
test_negoex_mech_la_SOURCES = test_negoex_mech.c $(gssapi_files)
|
||||
test_negoex_mech_la_LDFLAGS = -module
|
||||
test_negoex_mech_la_LIBADD = \
|
||||
$(top_builddir)/lib/asn1/libasn1.la \
|
||||
|
@@ -277,22 +277,14 @@ $(OBJ)\spnego\spnego-private.h: $(spnegosrc)
|
||||
$(OBJ)\sanon\sanon-private.h: $(sanonsrc)
|
||||
$(PERL) ../../cf/make-proto.pl -q -P remove -p $@ $(sanonsrc)
|
||||
|
||||
gssapi_files = $(OBJ)\gssapi\asn1_gssapi_asn1.x
|
||||
|
||||
spnego_files = $(OBJ)\spnego\asn1_spnego_asn1.x
|
||||
|
||||
$(gssapi_files:.x=.c): $$(@R).x
|
||||
|
||||
$(spnego_files:.x=.c): $$(@R).x
|
||||
|
||||
$(gssapi_files) $(OBJ)\gssapi\gssapi_asn1.hx $(OBJ)\gssapi\gssapi_asn1-priv.hx: \
|
||||
$(OBJ)\gssapi\asn1_gssapi_asn1.c $(OBJ)\gssapi\gssapi_asn1.h $(OBJ)\gssapi\gssapi_asn1-priv.h: \
|
||||
$(BINDIR)\asn1_compile.exe mech\gssapi.asn1
|
||||
cd $(OBJ)\gssapi
|
||||
$(BINDIR)\asn1_compile.exe --one-code-file $(SRCDIR)\mech\gssapi.asn1 gssapi_asn1 \
|
||||
|| ( $(RM) $(OBJ)\gssapi\gssapi_asn1.h ; exit /b 1 )
|
||||
cd $(SRCDIR)
|
||||
|
||||
$(spnego_files) $(OBJ)\spnego\spnego_asn1.hx $(OBJ)\spnego\spnego_asn1-priv.hx: \
|
||||
$(OBJ)\spnego\asn1_spnego_asn1.c $(OBJ)\spnego\spnego_asn1.h $(OBJ)\spnego\spnego_asn1-priv.h: \
|
||||
$(BINDIR)\asn1_compile.exe spnego\spnego.asn1
|
||||
cd $(OBJ)\spnego
|
||||
$(BINDIR)\asn1_compile --one-code-file --sequence=MechTypeList \
|
||||
@@ -541,8 +533,8 @@ libgssapi_OBJs = \
|
||||
$(OBJ)\sanon/release_name.obj \
|
||||
$(OBJ)\gkrb5_err.obj \
|
||||
$(OBJ)\negoex_err.obj \
|
||||
$(spnego_files:.x=.obj) \
|
||||
$(gssapi_files:.x=.obj)
|
||||
$(OBJ)\spnego\asn1_spnego_asn1.obj \
|
||||
$(OBJ)\gssapi\asn1_gssapi_asn1.obj
|
||||
|
||||
GCOPTS=-I$(SRCDIR) -I$(OBJ) -Igssapi -DBUILD_GSSAPI_LIB
|
||||
|
||||
@@ -582,24 +574,12 @@ GCOPTS=-I$(SRCDIR) -I$(OBJ) -Igssapi -DBUILD_GSSAPI_LIB
|
||||
{$(OBJ)}.c{$(OBJ)}.obj::
|
||||
$(C2OBJ_P) $(GCOPTS)
|
||||
|
||||
{$(OBJ)\spnego}.x{$(OBJ)\spnego}.c:
|
||||
$(CP) $** $@
|
||||
|
||||
{$(OBJ)\gssapi}.x{$(OBJ)\gssapi}.c:
|
||||
$(CP) $** $@
|
||||
|
||||
{gssapi}.h{$(INCDIR)\gssapi}.h:
|
||||
$(CP) $** $@
|
||||
|
||||
{$(OBJ)}.h{$(INCDIR)\gssapi}.h:
|
||||
$(CP) $** $@
|
||||
|
||||
{$(OBJ)\gssapi}.hx{$(OBJ)\gssapi}.h:
|
||||
$(CP) $** $@
|
||||
|
||||
{$(OBJ)\spnego}.hx{$(OBJ)\spnego}.h:
|
||||
$(CP) $** $@
|
||||
|
||||
LIBGSSAPI_LIBS=\
|
||||
$(LIBHEIMBASE) \
|
||||
$(LIBROKEN) \
|
||||
@@ -694,8 +674,8 @@ $(OBJ)\gss-commands.c $(OBJ)\gss-commands.h: gss-commands.in
|
||||
(generate-obj-macro "libgssapi_OBJs"
|
||||
(concat "\t$(OBJ)\\gkrb5_err.obj \\\n"
|
||||
"\t$(OBJ)\\negoex_err.obj \\\n"
|
||||
"\t$(spnego_files:.x=.obj) \\\n"
|
||||
"\t$(gssapi_files:.x=.obj)")
|
||||
"\t$(OBJ)\\spnego\\asn1_spnego_asn1.obj \\\n"
|
||||
"\t$(OBJ)\\gssapi\\asn1_gssapi_asn1.obj")
|
||||
"krb5src" "mechsrc" "spnegosrc" "ntlmsrc")
|
||||
!endif
|
||||
|
||||
|
Reference in New Issue
Block a user